[Info-vax] How to detect ^Y from an inner command procedure
Craig A. Berry
craigberry at nospam.mac.com
Thu May 18 20:39:42 EDT 2023
On 5/18/23 7:28 PM, Dave Froble wrote:
> On 5/18/2023 8:15 PM, alanfe... at gmail.com wrote:
>> Suppose you're running a command procedure from a command procedure.
>>
>> $ TYPE 1.COM
>> $ @2.COM
>> $ EXIT
>>
>> $ TYPE 2.COM
>> $ WAIT 0:00:04
>> $ EXIT
>>
>> So 1.com runs 2.com.
>>
>> Suppose you run 1.com and press ^ Y while 2.com is running. The
>> command interpreter then exits 2.com and resumes running 1.com. Is
>> there any way to tell from 1.com if 2.com was aborted via ^Y or just
>> finished normally?
>>
>> I thought $STATUS might help, but sometimes I get
>> $STATUS == "%X10000001"
>> and sometimes I get
>> $STATUS == "%X10010001"
>> So I guess that's not the way to go.
>> Is there a way to do this?
>> TIA.
>>
>
> I would start with "on error ..."
>
You might benefit from the following in 2.com:
$ On Control_Y Then Goto Control_Y_exit
. . .
$ Control_Y_exit:
$ $status = 1552 ! %SYSTEM-W-CONTROLY
More information about the Info-vax
mailing list