Contents Previous Next Subchapters

Defining Functions
Syntax function name()block
See Also function arguments , local functions , multiple return values

Defines the function name, which executes the commands in block .

A function is a set of commands that can be executed by entering the function name. Entering
     function f() begin
          print "Hello World!"
will define the function f. If you continue this example by entering
O-Matrix will respond
     Hello World!