REBOL 3 Docs Guide Concepts Functions Datatypes Errors
  TOC < Back Next >   Updated: 3-Aug-2010 Edit History  

REBOL 3 Functions: return

return  value  /redo

Returns a value from a function.

Arguments:

value [any-type!]

Refinements:

/redo - Upon return, re-evaluate the returned result. (Used for DO)

See also:

break   exit   catch  

Description

Exits the current function immediately, returning a value as the result of the function. To return no value, use the EXIT function.

fun: make function! [this-time] [
    return either this-time >= 12:00 ["after noon"][
        "before noon"]
]
print fun 9:00

print fun 18:00


  TOC < Back Next > REBOL.com - WIP Wiki Feedback Admin