a style question

Henry Spencer henry at zoo.toronto.edu
Tue Oct 2 03:46:25 AEST 1990


In article <1990Sep30.220839.20183 at nntp-server.caltech.edu> manning at nntp-server.caltech.edu (Evan Marshall Manning) writes:
>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...

In what way is "ix" superior to "i"?  Both are meaningless names in
this context.  If the name is not going to be meaningful -- and in the
context of a short loop, it's not clear that making it meaningful is
either possible or particularly important -- then at least keep it short.

There is an old prejudice against using "I" or "O" for a variable name,
arising from confusion with "1" and "0", but the lowercase letters don't
have that problem.
-- 
Imagine life with OS/360 the standard  | Henry Spencer at U of Toronto Zoology
operating system.  Now think about X.  |  henry at zoo.toronto.edu   utzoo!henry



More information about the Comp.lang.c mailing list