Project

General

Profile

Var » History » Revision 2

Revision 1 (Per Amundsen, 02/28/2014 01:02 PM) → Revision 2/21 (Per Amundsen, 02/28/2014 01:02 PM)

_Added in 1.8.8_ 

 */var [-sg] <%var> [[= ]value]* 

 Sets the value of local variable %var to the specified value. 

 *Switches* 

 -s - Display variable assignment value. 
 -g - Creates a global variable instead. 

 *Parameters* 

 <%var> - The variable to set. 
 [[= ]value] - Value to set the variable to. (can be a single arithmetic expression, see [[Arithmetic Operators]]) 

 *Example* 

 <pre> 
 alias example { 
   var %result = 1, %x = $1 
   while (%x) { 
     var %result = %result * $v1 
     dec %x 
   } 
   return %result 
 } 
 </pre>