Main Board > Language

'DROP' mnemonic with ERR= clause

(1/1)

James Zukowski:
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?

PxPlus:
The ERR= should be on the print, not on the mnemonic.

e.g.  PRINT (0,ERR-*next) 'DROP'(Win_num),

James Zukowski:
Thanks. Just surprised it's not a syntax error.

PxPlus:
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)

Navigation

[0] Message Index

Go to full version