Methods

defining methods


define proc   <module_name>  ::  <method_name>


proc   <module_name>  ::  <method_name>

<statement>

endproc


proc   <module_name>  ::  <method_name>  (  <arg0>  ,   <arg1>  ,   <arg2>  ,   <argN>  )

<statement>

endproc


Methods are defined in exactly the same way as functions. However methods are normally scoped with a module name.

invoking methods

a . func()

a . func(x, y)

invoking indirect methods

foo = "fred"

a . (foo)()

a . (foo)(x, y)

N.B. paramters are passed by reference not by value results are passed by value

call by value must be done exlicitly as:

a . func(value(x), value(y))
see also
generators
functions
modules
external functions