Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!apple!usc!cs.utexas.edu!husc6!bunny!hhg1 From: hhg1@GTE.COM (Hallett German) Newsgroups: comp.lang.c Subject: ARGV parsing -- The Recommended way Message-ID: <7292@bunny.GTE.COM> Date: 13 Jul 89 15:59:43 GMT Distribution: na Organization: GTE Laboratories, Inc., Waltham, MA Lines: 20 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