Does - Function Summary

Summary:

A shortcut to define a function that has no arguments or locals.

Usage:

does body

Arguments:

body - The body block of the function (must be: block)

Description:

DOES provides a shortcut for defining functions that have no arguments or local variables.

rand10: does [random 10]
print rand10
5
this-month: does [now/month]
print this-month
3

This function is provided as a coding convenience and it is otherwise identical to using FUNC or FUNCTION.

exit - Exits a function, returning no value. func - Defines a user function with given spec and body. function - Defines a user function with local words. has - A shortcut to define a function that has local variables but no arguments. return - Returns a value from a function. use - Defines words local to a block.

results matching ""

    No results matching ""