HP3000-L Archives

October 1996, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Jeff Vance <[log in to unmask]>
Reply To:
Jeff Vance <[log in to unmask]>
Date:
Thu, 24 Oct 1996 14:15:30 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (31 lines)
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

--

ATOM RSS1 RSS2