REBOL Programming/forever

From Wikibooks, open books for an open world
< REBOL Programming
Jump to: navigation, search

USAGE:[edit]

FOREVER body 

DESCRIPTION:[edit]

Evaluates a block endlessly.

FOREVER is a function value.

ARGUMENTS[edit]

  • body -- Block to evaluate each time (Type: block)

(SPECIAL ATTRIBUTES)[edit]

  • throw

SOURCE CODE[edit]

forever: func [
    "Evaluates a block endlessly." 
    [throw] 
    body [block!] "Block to evaluate each time"
][
    while [on] body
]