Passing arguments to C programs
Martin Minow
minow at decvax.UUCP
Thu Feb 13 09:13:56 AEST 1986
In <814 at brl-smoke.ARPA>, gwyn at brl-smoke.ARPA (Doug Gwyn) writes:
>In a hosted (as opposed to stand-alone) environment, yes, C requires
>that programs be able to obtain arguments specified at the time they
>are run.
There is nothing in the C language that requires command line argument
passing. This is solely a feature of the Unix shell. It can be
quite difficult to do on some operating systems which have different
assumptions about the way in which programs interact with their users.
(I speak from the experience of implementing command line argument
passing on at least 5 non-Unix operating systems.)
Other features of the shell (such as I/O redirection, filename wildcard
expansion, and the particular syntax of arguments) are equally not
a part of the language.
That developers have chosen to implement these features of the Unix
command language speaks more for the desire to be compatibile with
existing program usage -- it is not necessarily a good thing.
(Please note that these are my opinions only, and not necessarily
those of Digital.)
Martin Minow
decvax!minow
More information about the Comp.lang.c
mailing list