Skip to main content

Ternary Operation

Syntax


IF(  expression, true_expr, false_expr )

Description


Ternary operations allow a shorthand for doing conditional calculations

IF ch
>=
"a"
THEN ch =
ch AND &H5F


can be written as:

ch = IF(ch > = "a", ch AND
&H5F, ch) ' this is a crude
upshift

Differences from other BASICs

\

  • No equivalent in PBASIC
  • None from VB

See also

\