Vanguard Software
Forecasting & Planning Solutions
Home Products Solutions Services Customers Partners Company
 
Applying science to business management

contents.gifindex.gifprev1.gifnext1.gif

Assign

Format: x = y

Arguments: (node) x Name of an existing node, variable, object property, or list element

[any] y Value to be assigned to x

Returns: [any] The value of y

Description: The assign operator is used assign a value to an existing node, variable, object property, or list element.

The Define operator (:=) creates a new node named x; but, because evaluation of y is delayed, no value is immediately assigned to x. In contrast, the Assign operator (=) does not create a new node, but simply assigns a value to the existing node x while leaving its definition unchanged.

Examples: var x; = declares the variable x

x=2+3 = assigns the value 5 to x

x=dim(10) = x = [0,0,0,0,0,0,0,0,0,0]

x[2]=5 = x = [0,0,5,0,0,0,0,0,0,0]

x=dim(10,5) = x is a 10 by 5 array

x[1][2]=9 = assigns 9 to the 3rd element of the 2nd list in the array x

See Also: Compound Assignment, var, Define, Equal, dim

  Demand Planning  |  Financial Forecasting
Forecasting Software  |  Strategic Planning Software  |  Decision Tree Software
Decision Support Software  |  Expert System Software  |  Online Surveys

Contact Us  |  Terms of Use  |  Privacy Policy  |  Site Map
Vanguard Software
© 2011 Vanguard Software Corporation
Print this page   Email this page to a friend