Reference(S)

boolean.spad line 1 [edit on github]

Reference is for making a changeable instance of something.

= : (%, %) -> Boolean

a=b tests if a and b are the same pointer/reference.

coerce : % -> OutputForm if S has SetCategory
from CoercibleTo(OutputForm)
deref : % -> S

deref(n) is equivalent to elt(n).

elt : % -> S

elt(n) returns the object n.

latex : % -> String if S has SetCategory
from SetCategory
ref : S -> %

ref(n) creates a pointer (reference) to the object n.

setelt! : (%, S) -> S

setelt!(n, m) changes the value of the object n to m.

setref : (%, S) -> S

setref(n, m) same as setelt!(n, m).

~= : (%, %) -> Boolean if S has SetCategory
from BasicType

CoercibleTo(OutputForm)

SetCategory

BasicType