Object Initializers

IMLPlus supports the use of object initializers. This technique allows you to define an object-reference variable that refers to a new object containing specific values.

Examples:

declare String sTitle = "1990 Census Results";
declare double[] adValues = { 1.1, 2.1, 3.1 };

Note that the statement

declare double[] adValues = { 1.1, 2.1, 3.1 };

is not exactly equivalent to the statements

declare double[] adValues;
adValues = { 1.1, 2.1, 3.1 };

The difference is that in the first case the initializer is created as a Java array of type double whereas in the second case the initializer is created as a matrix that is subsequently converted to a Java array of type double. For efficiency, the first solution is preferred.