Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Line read from csv file with fgets has two characters before the terminating one Date: Thu, 15 Dec 2016 11:51:45 -0800 Organization: None to speak of Lines: 25 Message-ID: References: <457d2715-2a7a-4131-8083-637dc0919fb3@googlegroups.com> <616cc4c3-d560-4146-8f03-93e76bedf1fd@googlegroups.com> <94c39458-6789-4eaa-b773-36bc4d2d9976@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="d13fb784dfa5b4f5223d68f3ab06c5fb"; logging-data="11406"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/zSsZD7vPbx/yc9SOliSIF" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:qSS0TBwyouyriWF7MHX0i916CZM= sha1:pY0U98q8+2RK4I9AcIkKtuswt7o= Xref: csiph.com comp.lang.c:99554 BartC writes: > On 15/12/2016 17:49, Keith Thompson wrote: >> BartC writes: >>> int main (int nparams, char** params) { >> I'll restrict myself to just one question. >> >> Why did you decide to call the parameters to main "nparams" and >> "params", rather than the universally conventional "argc" and "argv"? > > I keep getting them mixed up, when I can remember them. argc is "argument count". argv is "argument vector". > Also, from 5.1.2.2.1p1: "...referred to here as argc and argv, though > any names may be used, as they are local to the function in which they > are declared..." Yes, you *can* use any names you like. I recommend sticking to the convention that all C programmers will recognize. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"