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 #1397

Forum - Forum
iziBasic - iziBasic


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

active  Topic # 1397  WHILE Y>X AND S

30/04/2006 @ 06:58
by bh77a

Anonymous



Hi,

This is probably a foolish question on my behalf, but trying to enter into a WHILE/WEND loop with the WHILE set up as:

WHILE Y>X AND S<=5

results in a syntax error at compilation. Is this not possible or should it be nested? See below:

WHILE Y>X
WHILE S<=5

Thanks for any clarification that one could provide.

bh77a
Write to bh77a   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
--------
30/04/2006 @ 18:09
by aldweb

Anonymous

visitor
Hi bh77a,

Here is how to proceed:

A=(Y>X) AND (S<=5)
WHILE A=TRUE
...
A=(Y>X) AND (S<=5)
WEND


This is because the math parser is not fully implemented (yet?) except for real variables affectations, i.e. A=something.
In all other statements, you need to have only one active boolean test (i.e. [=,<=,>=,<>,<,>]. This should be written somewhere in the faq, apart from being clearly stated in the WHILE statement's syntax.

Cheers,
aldweb


@+
aldweb
Write to aldweb   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 2
--------
30/04/2006 @ 23:15
by bh77a

Anonymous

visitor
Hi Aldweb,

Your explanation makes good sense.

I also solved it by:

WHILE S<=5
IF Y>X
...
ENDIF
WEND

Regards,
bh77a
Write to bh77a   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 3
--------
01/05/2006 @ 20:37
by aldweb

Anonymous

visitor
Hi,

This will also work of course. You just have to be careful that the S value can be set to a new condition value not only in the IF Y>X / ENDIF loop, otherwise you shall never exit the WHILE loop!

Cheers

@+
aldweb
Write to aldweb   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 4
--------
02/05/2006 @ 04:23
by bh77a

Anonymous

visitor
Hi,

Very true. Fortunately this doesn't occur in my test loop.

Regards,
bh77a
Write to bh77a   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 ^