Difference between revisions of "Use of $QUIT to handle Cache'-isms"

From VistApedia
Jump to: navigation, search
(Created page with "In Cache', a QUIT 1 (i.e. quit with an argument) work just fine if the call was with a DO rather than via SET Y=$$MyFun(). In GT.M, this will cause an error: >Quit does not ...")
 
 
Line 3: Line 3:
 
In GT.M, this will cause an error:
 
In GT.M, this will cause an error:
  
>Quit does not return to an extrinsic function:
+
    >Quit does not return to an extrinsic function:
> argument not allowed,150374450,-%GTM-E-NOTEXTRINSIC
+
    > argument not allowed,150374450,-%GTM-E-NOTEXTRINSIC
  
 
Here is a solution that will work in either case:
 
Here is a solution that will work in either case:
  
QUIT:$QUIT <arg>
+
    QUIT:$QUIT <arg>
QUIT
+
    QUIT
  
 
If code was called as an extrinsic, then $QUIT will equal 1
 
If code was called as an extrinsic, then $QUIT will equal 1

Latest revision as of 21:45, 12 July 2015

In Cache', a QUIT 1 (i.e. quit with an argument) work just fine if the call was with a DO rather than via SET Y=$$MyFun().

In GT.M, this will cause an error:

   >Quit does not return to an extrinsic function:
   > argument not allowed,150374450,-%GTM-E-NOTEXTRINSIC

Here is a solution that will work in either case:

   QUIT:$QUIT <arg>
   QUIT

If code was called as an extrinsic, then $QUIT will equal 1