October 30, 2025, 07:01:33 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


LEN and strings

Started by dossic, February 14, 2008, 11:27:54 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dossic

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

Ionic Wind Support Team

def a[100] as int
print len(a)
print baselen(a)

Ionic Wind Support Team

dossic

Thanks!

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

Yours  Carlo

Ionic Wind Support Team

No.  Strings are NULL terminated so LEN will return the number of characters currently in the string.

Paul.
Ionic Wind Support Team