IB Statements/noexcp
From CometWiki
< IB Statements(Difference between revisions)
		
		
 (explained use of noexcp better)  | 
		|||
| (15 intermediate revisions not shown) | |||
| Line 1: | Line 1: | ||
| - | '''  | + | '''NOEXCP option on file system statements'''  | 
| - | + | Parameter:  NOEXCP  | |
| - | + | Discussion:  | |
| + | Introduced with Comet32 this parameter may be used in file system statements to specify that if a non-fatal runtime exception occurs it should be ignored.<br> This option is available for:   | ||
| + |  ERASE,  | ||
| + |  ENTER,  | ||
| + |  EXTRACT,  | ||
| + |  CREATE,  | ||
| + |  CREATEKEY,  | ||
| + |  DELETE,  | ||
| + |  INPUT,  | ||
| + |  INPUTFILE,  | ||
| + |  INQUIRE,  | ||
| + |  INSERT,  | ||
| + |  POSITION,  | ||
| + |  PRINTFILE,  | ||
| + |  PRINT,  | ||
| + |  OPEN,  | ||
| + |  UPDATE,  | ||
| + |  READ,  | ||
| + |  RENAME,  | ||
| + |  REWRITE,  | ||
| + |  RUN,  | ||
| + |  LOCK,  | ||
| + |  UNLOCK,  | ||
| + |  WRITE.  | ||
| + | |||
| + | For information about handling specific exceptions, see Exception Handling.   | ||
| - | + | Note that the EXCP variable will still contain the last exception encountered, and will not be set to zero. This allows a form of "goto less programming"  | |
| - | + | Also see [[IB_Statements/excpsub|ExcpSub]]  | |
| - | + | ||
| - | + | '''Example:'''  | |
| - | + | ||
| - | + |  EXCP=0  | |
| - | + |  ERASE file$ dir=dir$ NOEXCP  | |
| - | + |  CREATE file$ dir=dir$ NOEXCP  | |
| - | + |  Close(LUN) & OPEN(LUN)file$ dir=dir$ NOEXCP  | |
| - | + |  if EXCP ne 0 print 'got an error ';EXCP;' creating ';file$  | |
| - | + | ||
| - | + | ||
| - | + | See [[System_Variables|System Variables]] and [[IB_Statements/EXCP|Excp]] for more information.  | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
Latest revision as of 18:07, 4 June 2016
NOEXCP option on file system statements
Parameter: NOEXCP
Discussion:
Introduced with Comet32 this parameter may be used in file system statements to specify that if a non-fatal runtime exception occurs it should be ignored.
 This option is available for: 
ERASE, ENTER, EXTRACT, CREATE, CREATEKEY, DELETE, INPUT, INPUTFILE, INQUIRE, INSERT, POSITION, PRINTFILE, PRINT, OPEN, UPDATE, READ, RENAME, REWRITE, RUN, LOCK, UNLOCK, WRITE.
For information about handling specific exceptions, see Exception Handling.
Note that the EXCP variable will still contain the last exception encountered, and will not be set to zero. This allows a form of "goto less programming"
Also see ExcpSub
Example:
EXCP=0 ERASE file$ dir=dir$ NOEXCP CREATE file$ dir=dir$ NOEXCP Close(LUN) & OPEN(LUN)file$ dir=dir$ NOEXCP if EXCP ne 0 print 'got an error ';EXCP;' creating ';file$
See System Variables and Excp for more information.