IB Statements/noexcp

From CometWiki

< IB Statements
Revision as of 18:07, 4 June 2016 by Jim (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.

Personal tools