[Info-vax] /END=label
John Reagan
xyzzy1959 at gmail.com
Mon Aug 27 13:26:18 EDT 2018
On Monday, August 27, 2018 at 1:11:01 PM UTC-4, Bill Gunshannon wrote:
> On 08/27/2018 12:54 PM, Dave Froble wrote:
> > On 8/27/2018 8:18 AM, Marc Van Dyck wrote:
> >> abrsvc used his keyboard to write :
> >>>> The best you have it write a program that uses LIB$GET_SYMBOL,
> >>>> LIB$SET_SYMBOL, and/or return something via $STATUS and then have the
> >>>> DCL query the symbol and branch as desired. A program cannot control
> >>>> DCL's command processing flow from inside the program.
> >>>
> >>> I would agree with the above, but the OP indicated setting up a DCL
> >>> command and I am assuming using the command tables. So the question
> >>> becomes:
> >>>
> >>> Can a user mimic the behavior by properly setting up the command
> >>> tables rather than just using a DCL symbol?
> >>
> >> For the moment, I just set exit with ss$_endoffile in $status. I can
> >> then test that in the next line and branch if needed. But I find the
> >> /END=label method much more elegant...
> >
> > What you're doing, as I understand it, is invoking a program from DCL,
> > and then exiting the program. Personally, I find testing the result of
> > the program exit, and taking appropriate action, rather elegant. Guess
> > this is a reason some like VMS, and some hate VMS, why some like Unix,
> > and some hate Unix. Different people have different expectations.
> >
> >
>
> Well, you can definitely do that in Unix. I always thought the
> same was true of VMS. (Something about "eels"?)
>
> bill
Can you give an example? I can't figure out how you'd do that. I'll let you choose the shell.
#!/bin/bash
./a.out # C program that does something and then jumps to label
l1:
l2:
l3:
bash doesn't even have a 'goto' and people have to resort to using case statements to case on the result (no different than looking at $STATUS and IF/THEN/ELSE'ing on the result)
More information about the Info-vax
mailing list