Flags with more than one letter

Doug Gwyn gwyn at smoke.brl.mil
Tue Apr 16 11:22:38 AEST 1991


In article <1991Apr10.132106.4122 at fmrco> harold at fmrco (Harold Naparst) writes:
>How do you pass flags to main() with more than one letter?
>I am using getopt, and it only allows flags with one letter.
>Is there another option parsing program I should know 
>about ?

There are three parts to the answer:
	(1) getopt() implements the official Command Syntax Standard,
	to which your applications should conform if at all feasible.
	(2) There have been more elaborate argument parsers posted to
	the net from time to time.
	(3) Any C program can examine its arguments directly; consult
	any decent C textbook for examples.



More information about the Comp.unix.questions mailing list