Rebol Programming/if

From Wikibooks, open books for an open world
Jump to navigation Jump to search

USAGE:

[edit | edit source]
IF condition then-block /else else-block 

DESCRIPTION:

[edit | edit source]

If condition is TRUE, evaluates the block.

IF is a native value.

ARGUMENTS:

[edit | edit source]
  • condition -- (Type: any)
  • then-block -- (Type: block)

REFINEMENTS:

[edit | edit source]
  • /else -- If not true, evaluate this block
    • else-block -- (Type: block)

SOURCE CODE

[edit | edit source]
if: native[
    "If condition is TRUE, evaluates the block." 
    condition 
    then-block [block!] 
    /else "If not true, evaluate this block" 
    else-block [block!]
]