REBOL Document

Return - Function Summary


Returns a value from a function.


return value


value - The value argument. (must be: any-type)


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
    before noon

    print fun 18:00
    after noon


break - Breaks out of a loop, while, until, repeat, foreach, etc.
catch - Catches a throw from a block and returns its value.
exit - Exits a function, returning no value.

<Back | Index | Next>

Copyright 2004 REBOL Technologies