[comp.os.msdos.programmer] A small programming challenge.

bhoughto@pima.intel.com (Blair P. Houghton) (05/16/91)

In article <1499@loki.une.oz.au> kevin@loki.une.oz.au (Kevin Pollard) writes:
>The task is:
>   allow up to 4 parameters to be entered on the command line
>   (that is, progname [ p1 [ p2 [ p3 [ p4 ] ] ] ] if you know what I mean) 

See if you can find the getopt() or parseargs() packages.
getopt has a dozen or so versions from various people and
places, and I forget who wrote parseargs...

In short, it's a very simple, well-researched, and elegantly
solved problem to allow simple specification of the probable
calling arguments to a C program.

>This is really an algorithm problem, but since there is no algorithm
>newsgroup, and I program in C on an IBM-type machine, this would be
>a relevant newsgroup.

comp.sys.ibm.pc.programmer I'd believe.  comp.lang.c, even.
However, comp.std.c was absolutely not the correct place to put it.

				--Blair
				  "Yuck!  There's gum on the floor."