<var-ref> ( var -- var-ref )
Factor handbook » The language » Collections » References » Reference implementations

Prev:var-ref
Next:global-var-ref


Vocabulary
refs

Inputs
varan object


Outputs
var-refa var-ref


Word description
Creates a reference to the given variable. Note that this reference behaves just like any variable when it comes to dynamic scope. For example, if you use set-ref in an inner scope and then leave that scope, then calling get-ref may not return the expected value. If this is not what you want, try using an obj-ref instead.

See also
<obj-ref>, <global-var-ref>, <slot-ref>, <key-ref>, <value-ref>

Definition