SourceForge.net Pass by reference

Pass by reference
Table of Contents


You can pass variables by reference to functions and procedures. This means that any modifications to the variable's value within the routine will be reflected in other parts of the code. To declare a parameter as pass by reference, it must by preceded by an asterisk ('*'):
ex:
    procedure foo( integer * bar )
        bar += bar
    end procedure

    integer baz
    baz = 1
    foo( baz )
    ? baz
Pass by reference only works with direct calls. You cannot use call_proc() or call_func() with pass by reference.

 
 
Parent Topics:
  • RDS Incompatible Features