Class assign defines
an assignment statement for a var
object. An assign is an executable object that, when executed, evaluates
its
assign<-value
and assigns its assign<-var
with this value. See class var
for a discussion on variables and assignments (var->assign).
Class assign is first of all introduced for syntactical cosmetical reasons. The following two code objects perform the same function:
assign(Var, Value). message(Var, assign, Value).
An assign object demands its first argument to be an instance of class var. This implies that named variables can be referred to much more elegant. Executing
assign(x, 10)
Will assign 10 to the variable named x, while the
message variant would be:
message(?(@variables, member, x), assign, 10)
See also code<-convert.
->assign
for the interpretation of the scope names. The default is local.|function->_execute’d.<-value
and var->assign.
<-value
if this is a function
object.
->assign
the assign<-var
with the result of 1).
|function, scope=[{local,outer,global}]<-var, assign<-value
and assign<-scope.