Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!pacbell.com!pacbell!sactoh0!jak From: jak@sactoh0.SAC.CA.US (Jay A. Konigsberg) Newsgroups: comp.lang.c Subject: Re: a style question Message-ID: <4093@sactoh0.SAC.CA.US> Date: 2 Oct 90 01:37:25 GMT References: <7341@darkstar.ucsc.edu> <8660@ncar.ucar.edu> <1990Sep30.220839.20183@nntp-server.caltech.edu> Organization: Sacramento Public Access Unix, Sacramento, Ca. Lines: 29 In article <1990Sep30.220839.20183@nntp-server.caltech.edu> manning@nntp-server.caltech.edu (Evan Marshall Manning) writes: > >Well, if the issue really is style... > >Don't ever use single-character variable names. I use 'ix' for >loop index variables for which I can come up with no better name, Using single letter variable names was somethiing I used to do for simple loops and character at a time reading. e.g: c = getchar() for(i=1; i<10; ++i) (i, j, k & l for small loops) While I have been "cured" of this, I'm still not convinced. As long as the use of single chararacter variables are used in limited ways, there really isn't any loss. Still, I now code like this: e.g: inpchar = getchar() for (loopinx=1; loopinx < 10; ++loopinx) It keeps me from getting flamed for unreadable code ?!? -- ------------------------------------------------------------- Jay @ SAC-UNIX, Sacramento, Ca. UUCP=...pacbell!sactoh0!jak If something is worth doing, it's worth doing correctly.