Dear Richard:
Richard Maine wrote:
> Tim Prince writes:
> > CALL SYSTEM is a standard thing, although the contents are highly OS-dependent.
>
> I'd say something more like "widespread" or "common" instead of
> "standard" unless you are referring to some standard other than the
> ones I know of. Details do vary, not only in the contents, but
> also in the exact interface. Sometimes its a function. Sometimes its
> a subroutine. Sometimes its a module procedure. Sometimes there is
> one argument; other times two. And every once in a while its
> "spelled" differently (I forget the name on VMS, but I don't think
> it was "system". Admit I could be confusing it with command line
> arguments, where I distinctly recall VMS having a much different
> spelling hat iargc/getarg.)
>
> --
> Richard Maine
> [log in to unmask]
Actually, both of these routines are spelled very differently on VMS.
System Calls: LIB$SPAWN (scalar-char-expr)
Called that because VMS spawns a subprocess in order to execute the DCL
command that is in the argument.
Command Line: LIB$GET_FOREIGN (scalar-char-expr)
Called that because the program has to be defined as a "foreign command". The
(unparsed) command line is returned in the argument. Under VMS, C programs also have
to be defined as a "foreign command" so that the user can get access to argc and
argv[].
In both cases, as well as other Run Time Library (LIB$) routines, the procedure can be
called either as a subroutine or as an INTEGER(4) function. Usually it is called as a
function, because the return value is a standard OpenVMS condition code, so you can
see what, if any, problems occurred.
--
----------
Sincerely,
Craig T. Dedo Internet: [log in to unmask]
Elmbrook Computer Services, Inc. Voice Phone: (262) 783-5869
17130 W. Burleigh Place Fax Phone: (262) 783-5928
Brookfield, WI 53005-2759
USA
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety." -- Benjamin Franklin (1759)
|