October 31, 2025, 05:28:32 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


ISTRING or CHAR?

Started by JoaoAfonso, January 11, 2010, 04:07:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JoaoAfonso

How much memory takes an ISTRING? It is supposed to use this type of variable for strings bigger than 256 bytes, but if we set for a small string, would it take just that space?
In other words, are those senteces correct?
CHAR exp<ISTRING exp[5]<STRING exp
CHAR exp=ISTRING exp[1]
JoÃÆ'ƒÂÃ,£o Afonso
Viriato
-----------------
Iberia MUD
www.iberiamud.com
iberiamud.com:5900

LarryMc

A string takes 255 characters regardless of how long a string you enter.
"A" takes 255 just as "asdasdadfffdsfsf" does.

an istring takes how ever much space you dim it to have regardless of how long a string you put in it.

the easiest way to see it is put some strings and istrings in a UDT and do a len on the udt variable.

Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library