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

REBOL 3 Functions: does

does  body

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

Arguments:

body [block!] - The body block of the function

See also:

closure   exit   func   function   has   return   use  

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
2

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


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