Guardian Programmer's Guide

Table Of Contents
Using DEFINEs
Guardian Programmer’s Guide 421922-014
7 - 18
Using DEFINEs: An Example
To add another class of DEFINE, you need to add a procedure, similar to the
SET^TAPE procedure, that prompts the user to enter attribute values for the new
DEFINE CLASS. You will also need to make changes to the GET^DEFINE^CLASS
and CREATE^DEFINES procedures as indicated in the following pages.
?INSPECT,SYMBOLS,NOMAP,NOCODE
?NOLIST, SOURCE $SYSTEM.ZSYSDEFS.ZSYSTAL
?LIST
LITERAL MAXFLEN = ZSYS^VAL^LEN^FILENAME; !maximum file-name
! length
LITERAL BUFSIZE = 512;
LITERAL ABEND = 1;
STRING .SBUFFER[0:BUFSIZE]; !I/O buffer (one extra char)
STRING .S^PTR; !pointer to end of string
INT LOGNUM; !log file number
INT TERMNUM; !terminal file number
?NOLIST, SOURCE $SYSTEM.SYSTEM.EXTDECS0 (INITIALIZER,
? PROCESS_GETINFO_,FILE_OPEN_,WRITEREADX,WRITEX,
? PROCESS_STOP_,READX,POSITION,DNUMOUT,FILE_GETINFO_,
? READUPDATEX,WRITEUPDATEX,DNUMIN,DEFINESETATTR,DEFINEADD,
? DEFINEVALIDATEWORK,PROCESS_CREATE_)
?LIST