On Oct 17, 3:00pm, Kishore Kumar.M wrote:
> Subject: Is there an equivalent of `system()' function of C in MODCAL?
> As the subject says it all, I am looking for a MODCAL routine
> to which I can pass a command line (probably 300 chars long)
> for it to execute it at the CI prompt.
>
> In C:
> main()
> {
> char cmd[] = "ls";
> system(cmd);
> }
>
In Modcal or Pascal you can call the COMMAND or HPCICOMMAND intrinsics
directly to execute a CI command.
The main difference between COMMAND and HPCICOMMAND is that HPCICOMMAND
can execute UDCs and command files; whereas COMMAND cannot. This means
that if you need to simply have a system service performed (like
building a file) then chose COMMAND, since you don't need to worry if
the BUILD command has been overridden by a UDC of the same name. OTOH,
if you want to provide a "window" into the CI where the user is allowed
to enter CI commands (like the "!" feature of vi) then chose the
HPCICOMMAND intrinsic. Stan may followup with the CSEQ calling sequence
for these two intrinsics :).
Jeff Vance, CSY
--