PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → IIF()  function
IIF() function
Débuté par John Marrone, 22 juil. 2004 18:46 - 3 réponses
Posté le 22 juillet 2004 - 18:46
I assume WD doed not have an immedate IF statement < IIF( True, Return this, else return this) >. My question is: Is there an alternative command to do this that I don't know about. Also, I have WD8 beta 312. Does anybody know what is in 315 that I don't have in 312. Just couriouse. If you have time. Thanks
Thanks
John Marrone
Posté le 22 juillet 2004 - 19:04
Hi John,
1)
IF Summer = hot and water = fine THEN GoHaveASwim()
No ELSE clause allowed here, like in most BASICs
2) Download 315ku from PC Soft's web site NOW!
Read the differences between 312 and 315 there ...
Best regards,
Guenter


I assume WD doed not have an immedate IF statement < IIF( True, Return this, else return this) >. My question is: Is there an alternative command to do this that I don't know about. Also, I have WD8 beta 312. Does anybody know what is in 315 that I don't have in 312. Just couriouse. If you have time. Thanks
Thanks
John Marrone
Posté le 22 juillet 2004 - 19:25
var = condition ? then-result else else-result

I assume WD doed not have an immedate IF statement < IIF( True, Return this, else return this) >. My question is: Is there an alternative command to do this that I don't know about. Also, I have WD8 beta 312. Does anybody know what is in 315 that I don't have in 312. Just couriouse. If you have time. Thanks
Thanks
John Marrone



http://www.invitec.com
Posté le 22 juillet 2004 - 20:26
>var = condition ? then-result else else-result
Exactly what I was thinking when I read it. John, there is an new added syntax in 815, here is a cut and paste from the help file.
-------
Single line conditional instructions
You can also use the following syntax:
Result = Condition ? Expression 1 ELSE Expression 2
Detailed syntax:
Result
..Variable to assign with the condition's result

Condition
.. Condition to test.

Expression 1
.. Value assigned to Result if the condition is True.

Expression 2
.. Value assigned to Result if the condition is False.

Equivalence:
IF Condition THEN
..Result = Expression 1
ELSE
..Result = Expression 2
END
Note: The single line conditional expression can be used directly in an expression.
-----
HTH,
Art