ARGV parsing -- The Recommended way

Hallett German hhg1 at GTE.COM
Fri Jul 14 01:59:43 AEST 1989


This is my first and probably last note for this group. My question 
is concerning argv manipulation. There appears to be 2 general ways to 
do this:
    1. Pointer manipulation and use a switch on what appears after the
       -. An example appears on K&R 2 page 117.

    2. Use strcmp and compare -F with argv[1].
    And use other functions like getopt.

My questions are: 1. Which do most people use and why?
                  2. Is there a good reference just on this subject?

I am sorry if this is a basic question but I haven't seen an answer
to it the three months I've been reading this generally insightful
group.

Hal German
GTE Labs
Waltham, Ma 02254
NESUG BBS: 617-263-1499 M&Tu 7:00 -6:30 pm 1200 or 2400 8N1    



More information about the Comp.lang.c mailing list