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

Forum - Forum
iziBasic - iziBasic


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

active  Topic # 1354  A problem with IF END IF block?

30/01/2006 @ 17:18
by C.M. Rouleau

Anonymous



This works:

IF A=B IF A>C THEN C=D

But try this:

IF A=B IF A>C THEN
C=D
ELSE
D=E
END IF

When I try it, only the first condition (A=B) matters. The second (A>C) has no effect. Is this a bug?

-CMR

  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/01/2006 @ 21:41
by aldweb

Anonymous

visitor
IF A=B IF A>C THEN C=D

In the iziBasic user manual is written:
The Statement can be any single statement or multiple statements (separated by
the “:” character) but a non completed “block statement” (like IF THEN [ELSE]
END IF, SELECT CASE / END SELECT statement, REPEAT / UNTIL, …).
Indeed this syntax of the IF statement is equivalent to this one:
IF test THEN Statement : ENDIF (see below), so there is a risk of bad indentation
of the quiet ENDIF of this syntax.


So the right syntax is:
IF A=B IF A>C LET C=D
Otherwise, your THEN will miss an ending END IF...

IF A=B IF A>C THEN
C=D
ELSE
D=E
END IF

Same rule applies, here is the right syntax:
IF A=B THEN
IF A>C THEN
C=D
ELSE
D=E
END IF
END IF


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° 2
--------
30/01/2006 @ 21:49
by aldweb

Anonymous

visitor
I have to admit that this thing is a little bit tricky...

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° 3
--------
31/01/2006 @ 15:59
by C.M. Rouleau

Anonymous

visitor
Ah yes, now I see what you meant by a silent END IF.
  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 ^