IonicWind Software

IWBasic => General Questions => Topic started by: JoaoAfonso on January 11, 2010, 04:07:54 PM

Title: ISTRING or CHAR?
Post by: JoaoAfonso on January 11, 2010, 04:07:54 PM
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]
Title: Re: ISTRING or CHAR?
Post by: LarryMc on January 11, 2010, 05:36:50 PM
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