Re: DELETE excp - C32

[ Follow Ups ] [ Post Followup ] [ Forum ]

Posted by jim guerber on August 18, 2016 at 12:47:36:

In Reply to: Re: DELETE excp - C32 posted by Carl Haaser on August 18, 2016 at 11:12:33:

Carl, There are 2 ways to do exception processing.

The traditional way is to branch on an exception....
erase 'xxx',dir='yyy' excp= aaa
create 'xxx',dir='yyy' excp=bbb
open(x) 'xxx',dir='yyy' excp=ccc

In Comet32 the EXCP variable is only set when an error occurs. This is to allow "goto less programming", for example:

do while excp = 0
erase 'xxx',dir='yyy' noexcp
create 'xxx',dir='yyy' noexcp
open(x) 'xxx',dir='yyy' noexcp
if excp ne 0 .....


That way, if an exception happens in any one of those statements, the variable would be set.
If an error does not occur, the excp variable is left unchanged.

My guess is that you are testing the excp variable and expecting it to be reset on every io statement.

Follow Ups:

Post a Followup



What is the name of the main Signature System's Product?  


Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):

Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.

[ Follow Ups ] [ Post Followup ] [ Forum ]