Posted by Mike Saunders on June 04, 2007 at 13:49:26:
When does EXCP get reset to 0?
Have a program that...
Opens a file (which happens to be empty)
Does a Read and gets and EXCP 02 end of file
Closes the File
Opens a different file, which am pretty sure opens okay.
I was checking EXCP immediately after the open.
and EXCP was still set at 2
Was surprised that it appears that the successful OPEN
did not set EXCP to 0
I was attempting to do inline error handling which maybe is a bad idea.
Code Snippet
CLOSE (49) & OPEN(49) '#PVIEDIT',DIR='COS' ,EXCP=RP.ABORT.OPEN
RP.ABORT.OPEN:
IF EXCP NE 0 THEN
MSGBOX "DISPLAY ERROR"
ENDIF
I have since changed the EXCP= to EXCPSUB=