aldweb

Fermer I. aldweb

Fermer II. Gratuitiels PC

Fermer III. Gratuitiels Palm

Fermer IV. Partagiciels Palm

Fermer V. iziBasic Palm

Fermer VI. Connaissance Palm

Fermer VII. Ordinateur Poche

Fermer VIII. miniPortail

Spécial !



Version mobile
de l'aldweb Site

m.aldweb.com


Ni Français, ni Anglais ?

Essayez donc l'un de ces drapeaux :
[de] [es] [it] [pt]
Recherche




Météo / Spam / www

Météo Lyon


aldweb contre le SPAM


Newsletter
Pour avoir des nouvelles de ce site, inscrivez-vous à notre Newsletter.
S'abonner
Se désabonner
298 Abonnés
Sites web de la famille

Webmaster - Infos
News Amis
Visites

   visiteurs

   visiteurs en ligne

Sondage
Comment trouve-tu le nouvel habillage de l'aldweb Site ?
 
Superbe !
Joli
Moyen
Moche...
Résultats
forum.gifForum - iziBasic - Sujet n°1354

Forum - Forum
iziBasic - iziBasic


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

actif  Sujet n° 1354  A problem with IF END IF block?

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

Anonyme



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

  Poster une réponse  Haut

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 1
--------
le 30/01/2006 @ 21:41
par aldweb

Anonyme

visiteur
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
Ecrire à aldweb   Poster une réponse  Haut

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 2
--------
le 30/01/2006 @ 21:49
par aldweb

Anonyme

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

Cheers,

@+
aldweb
Ecrire à aldweb   Poster une réponse  Haut

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 3
--------
le 31/01/2006 @ 15:59
par C.M. Rouleau

Anonyme

visiteur
Ah yes, now I see what you meant by a silent END IF.
  Poster une réponse  Haut
actif sujet actif   clos sujet clos   Important! Important!   Nouveau Nouveau message   -   Rectifier Rectifier message   Clôturer Clôturer sujet   Remonter Remonter
[]
Catégories de discussion  Forum 



 
^ Haut ^