iIf( boolean logicExp, ** trueVal, ** falseVal ) return **

** = all data types

This function is the PowerScript equivalent of the Datawindow iIF fonction.
It allows to replace the usual conditional variable value assignation codes like :

integer li_version
string ls_gen
...
if li_version < 7 then
ls_gen = "G1"
else
ls_gen = "G2"
end if

by a more concise code:

integer li_version
string  ls_gen
...
ls_gen = #.iIf( li_version < 7, "G1", "G2" )


Last edited Aug 25, 2015 at 3:35 PM by domangep, version 8