Toggle navigation
PxPlus User Forum
PxPlus User Forum
»
Main Board
»
Discussions
»
Language
»
'DROP' mnemonic with ERR= clause
Likes
« previous
next »
Print
Pages: [
1
]
Author
Topic: 'DROP' mnemonic with ERR= clause (Read 193 times)
James Zukowski
Diamond Member
Posts: 275
'DROP' mnemonic with ERR= clause
«
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?
Logged
James Zukowski
Sr. Developer - J&E
BRAND
>
SAFWAY
Brand Industrial Services
PxPlus
Administrator
Diamond Member
Posts: 1079
Re: 'DROP' mnemonic with ERR= clause
«
Reply #1 on:
September 05, 2023, 02:32:56 PM »
The ERR= should be on the print, not on the mnemonic.
e.g.
PRINT (0,ERR-*next) 'DROP'(Win_num),
Logged
James Zukowski
Diamond Member
Posts: 275
Re: 'DROP' mnemonic with ERR= clause
«
Reply #2 on:
September 05, 2023, 03:16:45 PM »
Thanks. Just surprised it's not a syntax error.
Logged
James Zukowski
Sr. Developer - J&E
BRAND
>
SAFWAY
Brand Industrial Services
PxPlus
Administrator
Diamond Member
Posts: 1079
Re: 'DROP' mnemonic with ERR= clause
«
Reply #3 on:
September 05, 2023, 03:22:31 PM »
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)
Logged
Print
Pages: [
1
]
« previous
next »
PxPlus User Forum
»
Main Board
»
Discussions
»
Language
»
'DROP' mnemonic with ERR= clause