PxPlus User Forum
Main Board => Discussions => Language => Topic started by: James Zukowski on September 05, 2023, 12:04:38 PM
-
Is including an ERR= clause in the 'DROP' mnemonic a valid construct? e.g.:
print 'drop'(Win_Num,err=*next),
It doesn't generate an error, but it also doesn't seem to trap error #57 if the specified (non-zero) window# doesn't exist.
Any insights?
-
The ERR= should be on the print, not on the mnemonic.
e.g. PRINT (0,ERR-*next) 'DROP'(Win_num),
-
Thanks. Just surprised it's not a syntax error.
-
Technically the 'DROP' mnemonic is really just a function that returns the escape sequence required to drop the specified window.
For example its perfectly legal to code:
X$ = 'DROP'(win_num)
This will result in an escape sequence that can be output to console (channel 0). Any/all mnemonics are really just escape sequences that can be output to a device.
As for the ERR= clause, it would have been triggered if the window number was invalid (such as a negative number or non-integer)