ascot diagnostics

A7139

Error: Only $CASE’s last argument may omit the value before its colon

A case:value pair or a second :default follows the :default of this $CASE. The :default, the pair with no value before its colon, must be the last argument. IRIS refuses to compile the $CASE (ERROR #1010: Missing right parenthesis). Move the :default to the end, and keep only one.

IRIS rejects the example.

Class Demo.CaseDefaultNotLast
{

ClassMethod Name(code As %Integer) As %String
{
    Quit $CASE(code, 1:"one", :"many", 2:"two") //! A7139
}

}

All diagnostics