ascot diagnostics

A8820

Error: SET $VECTOR needs its third argument, the type

The statement Set $VECTOR(vector, position) = value leaves out the type. Assigning vector data takes three arguments, in the form Set $VECTOR(vector, position, type) = value, even when the vector already exists. IRIS refuses to compile the statement (ERROR #1009: Expected comma). Give the type as the third argument, "integer" for example.

IRIS rejects the example.

Class Demo.SetVectorWithoutType
{

ClassMethod Sum() As %Integer
{
    Set $VECTOR(scores, 1, "integer") = 3
    Set $VECTOR(scores, 2) = 4 //! A8820
    Quit $VECTOR(scores, 1) + $VECTOR(scores, 2)
}

}

All diagnostics