IonicWind Software

IWBasic => General Questions => Topic started by: dossic on February 14, 2008, 11:27:54 AM

Title: LEN and strings
Post by: dossic on February 14, 2008, 11:27:54 AM
Hi!
In users guide, I found that it is possible to use LEN with arrays, stating that "For arrays this returns the total size of the array.".
I tried, but EBASIC does not like (or I'm making an error) the "]" character in array.
I tried searching on forum, but I wasn't able to get any help.

Does anybody have an example of using LEN with arrays? 

Thanks so much

carlo
Title: Re: LEN and strings
Post by: Ionic Wind Support Team on February 14, 2008, 11:38:49 AM
def a[100] as int
print len(a)
print baselen(a)

Title: Re: LEN and strings
Post by: dossic on February 14, 2008, 11:44:35 AM
Thanks!

However, does it work for an array of string, too?

Yours  Carlo
Title: Re: LEN and strings
Post by: Ionic Wind Support Team on February 14, 2008, 11:47:06 AM
No.  Strings are NULL terminated so LEN will return the number of characters currently in the string.

Paul.