PreviousNext
Help > EXTREME PROGRAMMING WITH RITTLE > Function Variables > Declaring Function Variables
Declaring Function Variables

Function variables are declared in the normal way for declaring variables. They are of type “func”.

var func myvar = @foo;

This example declares a function variable “myvar” and assigns it the address of the function foo(). Note the character ‘@’ in the assignment. It tells the RSC that the word is about the address of the function foo().

Without the leading ‘@’ character, the function will be simply executed during the initialisation phase, and its result (if any) will be assigned to myvar thus resulting it pointing to a completely different address.