initialize( dest, source )


Parameters

  Type Description
dest lvalue user variable
source expression value to copy 

_result

Not set.

Descriptions

Fills both the root value and all existing array and property elements of the user defined variable specified by dest with the value of source. In the example below, the user defined variable var is assigned a root value of 10, a property named test with a value of 20, and one array element with a value of 5. After the initialize call, all three of these will have a value of 99. Initialize performs a deep initialization, meaning nested array and property elements are also initialized.

var = 10
var.test = 20
var[0] = 5
initialize( var, 99 )
printdeep( "var", var )


If a user variable has only a root value, initialize has the same affect as the assignment command. If the dest user variable does not exist, it is automatically created by using it as the first parameter to the initialize command. For more information see the user variables topic.

See Also

assignment (=), copy, clear, isequal, cleararray, countarray, setarraycount, clearprops, hasprop, countprops, getpropname, user variables