IB Statements/noexcp

From CometWiki

< IB Statements(Difference between revisions)
Jump to: navigation, search
(New page: '''Noexcp''' CREATE 'file',dir='dir',noexcp You can use noexcp on any of the following: Input Print InputFile PrintFile Create Erase Open Read Write Extract Update Delete Input Print Re...)
(explained use of noexcp better)
 
(16 intermediate revisions not shown)
Line 1: Line 1:
-
'''Noexcp'''
+
'''NOEXCP option on file system statements'''
-
CREATE 'file',dir='dir',noexcp
+
Parameter:  NOEXCP
-
You can use noexcp on any of the following:
+
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.
-
Input
+
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"
-
Print
+
 
-
InputFile
+
Also see [[IB_Statements/excpsub|ExcpSub]]
-
PrintFile
+
 
-
Create
+
'''Example:'''
-
Erase
+
-
Open
+
EXCP=0
-
Read
+
ERASE file$ dir=dir$ NOEXCP
-
Write
+
CREATE file$ dir=dir$ NOEXCP
-
Extract
+
Close(LUN) & OPEN(LUN)file$ dir=dir$ NOEXCP
-
Update
+
if EXCP ne 0 print 'got an error ';EXCP;' creating ';file$
-
Delete
+
 
-
Input
+
 
-
Print
+
See [[System_Variables|System Variables]] and [[IB_Statements/EXCP|Excp]] for more information.
-
Rename
+
-
Lock
+
-
Unlock
+
-
Run
+
-
Insert
+
-
Rewrite
+
-
Enter
+
-
Inquire
+
-
CreateKey
+
-
Position
+

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.

Personal tools