a style question

VanZandt jrv at sdimax2.mitre.org
Sat Oct 6 05:40:33 AEST 1990


In article <1990Oct2.163853.17004 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...

[if you do a text search for 'i'...] 
>you find that a lower case 'i' appears an average of about
>four times per comment line.  'ix' appears in the comments only when
>the comments are about variable 'ix'.  Or, similarly, you 'grep' 'i'.

What you need is a "whole word mode" for the search command in your
text editor.  I came to the same conclusion, bought the source code for
my editor, and implemented it myself.  Very helpful.

BTW, if you have regular expression search, you can fake it by searching for 
<non alphanumeric character>i<non alphanumeric character>.  

                       - Jim Van Zandt



More information about the Comp.lang.c mailing list