Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!hplabs!hp-sdd!ncr-sd!se-sd!rns From: rns@se-sd.sandiego.ncr.com (Rick Schubert) Newsgroups: comp.lang.c Subject: Re: programming challenge (silly) Message-ID: <1866@se-sd.sandiego.ncr.com> Date: 27 Mar 89 16:19:16 GMT References: <37433@think.UUCP> <4412@ingr.com> <1859@se-sd.sandiego.ncr.com> <12145@haddock.ima.isc.com> Reply-To: rns@se-sd.sandiego.NCR.COM (Rick Schubert(AEP)) Organization: NCR Corp. Systems Engineering, San Diego Lines: 19 In article <12145@haddock.ima.isc.com> karl@haddock.ima.isc.com (Karl Heuer) writes: >In article <1859@se-sd.sandiego.ncr.com> rns@se-sd.sandiego.NCR.COM (Rick Schubert(AEP)) writes: >>A value [for argc] of 0 indicates that the program name is not available. >>This is allowed by the soon-to-be ANSI Standard. >Actually, the sentence that includes "program name is not available" in the >pANS refers to the case argc > 0 && argv[0] == "". It's true that the pANS >also allows argc == 0 && argv[0] == NULL, but it doesn't say what this is >intended to mean. I believe that argc == 0 && argv[0] == NULL is intended for the case where the implementation has no access to the command line (or there is no command line), whereas argc > 0 && argv[0] == "" is intended for the case where the implementation has access to the command line but not to the program name. -- Rick Schubert (rns@se-sd.sandiego.NCR.COM)