IIf in Other Programming Languages
$iif
is also present in mIRC script, with similar syntax.
calling /testiif
will print out "testing $iif: 1 execution(s). mIRC's $iif
acts more like C's ?:
than IIf
in VB since it won't pre-evaluate both.
IIF
is a function in dBase and xBase. (1992 and before.)
iif
is also a compiler magic function of Oxygene. It is not a real function and is at compile time unrolled to conditional statements.
In this example a new strong type string named "someString" is created (using Type inference) and the iif
function will fill it depending on the outcome of the boolean expression.
New 2012 year's release of SQL Server also includes implementation of IIF function:
DECLARE @a INT = 45; DECLARE @b INT = 40; SELECT IIF ( @a > @b, 'TRUE', 'FALSE' ) AS RESULT;IIF in C:
printf("number %d is%s even", num, num % 2 ? " not" : "");Read more about this topic: IIF
Famous quotes containing the words programming and/or languages:
“If there is a price to pay for the privilege of spending the early years of child rearing in the drivers seat, it is our reluctance, our inability, to tolerate being demoted to the backseat. Spurred by our success in programming our children during the preschool years, we may find it difficult to forgo in later states the level of control that once afforded us so much satisfaction.”
—Melinda M. Marshall (20th century)
“It is time for dead languages to be quiet.”
—Natalie Clifford Barney (18761972)