Modern Arguments to main()
david at ztivax.UUCP
david at ztivax.UUCP
Thu Mar 6 00:26:00 AEST 1986
Modern Command Line Arguments
Soon, I hope, none of us will be working with command line oriented
systems. The Mac (or more accurately, Xerox Star/Tajo/Viewpoint) user
interface is clearly preferable, in many ways.
^^^^
The current C argument "standard" for the entry point:
main(argc,argv)
int argc;
char **argv;
{ ...
is fine for command line oriented systems. It is intuitive, and
therefore easy for programmers to quickly spec (in the mind) and
implement some tool. All those neat UNIX tools we use came into being
because 1) they were easy to think of, and 2) they were easy to
implement.
As icon oriented systems become more widely used, perhaps the
main(argv,argc) standard should be re-thought.
Example: You have an icon representing a program, and a window with
some text in it. You want some part of the info to be passed to the
program. Pass it as a) args in argv/argc (parse text with window
shell), B) pass as stdin, C) some new method.
David Smyth
seismo!unido!ztivax!david
More information about the Comp.lang.c
mailing list