aldweb

Close I. aldweb

Close II. PC Freeware

Close III. Palm Freeware

Close IV. Palm Shareware

Close V. iziBasic Palm

Close VI. Palm Knowledge

Close VII. Pocket Computer

Close VIII. miniPortail

Special !



Mobile version of
the aldweb Site

m.aldweb.com


Neither French, nor English?

Try one of these flags then:
[de] [es] [it] [pt]
Search




Weather / Spam / www

Lyon Weather


aldweb against spam


Newsletter
To receive news about this website, consider subscribing to our Newsletter.
Subscribe
Unsubscribe
298 Subscribers
Family's web sites

Webmaster - Infos
Friends News
Visits

   visitors

   visitors online

Poll
What do you think of the new design of the aldweb Site?
 
Great !
Beautiful
Average
So ugly...
Results
forum.gifForum - iziBasic - Topic #1568

Forum - Forum
iziBasic - iziBasic


Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257

active  Topic # 1568  What's with the LEN(c|t) command?

05/08/2007 @ 19:13
by Roy Sommers

Anonymous



In some cases it returns the string itself, instead of the length of the string. This is what happens with the following test program(ie. the Messagebox returns:"A TEST OF LEN").

'lentest.ibas
{CREATORID "LENT"}
BEGIN
A$="A TEST OF LEN"
L=LEN(A$)
M=MESSAGEBOX(L,0)
END

Also what is the proper way to carry a long text line over to next line, I'm used to an underline symbol?
Thanks Roy.
Write to Roy Sommers   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 1
--------
05/08/2007 @ 22:04
by aldweb

Anonymous

visitor
Hello Roy,

I think that the issue does not come from the LEN() function, but from an improper use of MESSAGEBOX(), which does not complain at compilation time (which is something I don't understand, I will have to investigate...). Indeed, only strings or string variables should be passed as the first argument of this function and you pass it a numerical variable.

Try the following code, and you will get the right answer:
'lentest.ibas
{CREATORID "LENT"}
BEGIN
A$="A TEST OF LEN"
L=LEN(A$)
'M=MESSAGEBOX(L,0)
PRINT L USING 0 : WAIT
END



There is not (yet?) a way to carry a long text line over to the next line in iziBasic, sorry.


Cheers,
aldweb
Write to aldweb   Post an answer  Top
active topic active   closed topic closed   Sticky Sticky   New New message   -   Correct Correct message   Close Close topic   Make sticky Make sticky
[]
Forum Topic  Forum 



 
^ Top ^