[INHERIT('sys$library:starlet')] PROGRAM Use_Putmsg(OUTPUT); VAR Message_Vector : ARRAY [1..2] OF INTEGER; { Use the [CLASS_S] attribute on the parameter of the Putmsg_Action_Routine } { since the $putmsg system service will pass the parameter using a CLASS_S } { descriptor instead of the CLASS_A descriptor that is normally used for } { conformant array parameters. } FUNCTION Putmsg_Action_Routine( Message_Text : [CLASS_S] PACKED ARRAY [L..U:INTEGER] OF CHAR ):INTEGER; BEGIN WRITELN('Inside action routine with: ',message_text); { Return 1 to cause $PUTMSG to output the string. Returning 0 } { will cause $PUTMSG not to output the string to SYS$OUTPUT. } Putmsg_Action_Routine := 1; END; BEGIN Message_Vector[1] := 1; {Set argument count and default options } Message_Vector[2] := SS$_Abort; { Use a foreign mechanism specifier on the Putmsg_Action_Routine } { actual parameter to override the type checking between the } { actual and formal parameters. The formal parameter for $putmsg} { in STARLET.PAS doesn't list the single parameter that is used } { with the Putmsg_Action_Routine function. } $putmsg(Message_Vector,%IMMED Putmsg_Action_Routine); END.