Darwin Help

Back to Index

assign

Function assign - assign a variable as a function call

Calling Sequence  assign(a,v)
Parameters
NameTypeDescription

a name 
v anything 
Return Type  NULL
Synopsis This function assigns the value v to the name a. The assign function ignores the built-in scoping rules. Therefore, an assign call inside of a procedure persists after it is finished executing. A variable name can not be assigned a value from within a procedure if a global variable of the same name has already been assigned a value.
Examples
> z := proc() assign(t, 100); end:

> z();

> t;
100


See also assigned,   eval,   names,   parse,   symbol