From: | Frederic Laboureur |
Date: | 4 Aug 2000 at 16:03:20 |
Subject: | Re: String Constants |
Hello Tony,
> I understand what it is doing (now that you've explained it), but it
> still seems a pretty inefficient way of doing things. I discovered
> that you can set up a string constant
>
> Fred dc.b "A Constant",0
>
> and then reference it with Peek.s(?Fred), but it doesn't seem
> worthwhile.
>
> Pity Blitz doesn't use null terminated strings directly. How about
>
> DEFTYPE.0 Fred ; zero defines a null-terminated string
>
> or DEFTYPE.15 Fred2 ; non-zero number defines a fixed-length string
>
> An idea for Pure Basic Fred??
PureBasic use normal string formats, with no size or anything. For
now.... The drawback is string operations which are much slower than Blitz2
one.. But you don't need to use any tricks to declare strings in PB.
Fred.s = "Hello" is like:
Fred.s = PeekS(@Fred)
Fred: DC.b "Hello",0
See you,
Fred.
--------------------------------------------------------------------------
/\/\/\/\/\ Frederic 'AlphaSND' Laboureur
__/ \_ e-mail : alphasnd@free.fr
/^ ^ u^ ^n ^ ^\
(o o_ /(o o)\ _o o) Quality software for the Amiga
_/_ /// | | \\\ _\_
(o_o)// (o o) \\(o_o) � 2000 - Fantaisie Software
`---' `---' `---'
F-Base TheBoss F-Bench http://www.fantaisie-software.fr.fm
PureBasic: R.E.L.E.A.S.E.D - Feel the Power !
--------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list-help@netsoc.ucd.ie