Ref class in Global context

Reference objects. Useful for returning things from functions.

Example:
var x=111;
square(&x);// '&' creates the Reference object
Simulator.print(x);//x is now 12321

function square(r)
{r.value=r.value*r.value;}
//square receives the Reference objects and changes its 'value' field

5 members:

string toString
string

textual form

field value
untyped

value

function copyFrom
doesn't return a value

copy the reference

function copyFrom(Ref)

make the reference point to the same target,

function newO

create new reference

function newO()

(for internal use only) use &variablename to create Ref objects.

function newS

create new reference

function newS()

(for internal use only) use &variablename to create Ref objects.


Global context