[TriLUG] names of parameters passed down a chain of functions

Joseph Mack NA3T jmack at wm7d.net
Fri Jul 3 16:33:05 EDT 2009

When I learned programming, I was told that a variable 
should have a different name when it arrives in a function 
(as a parameter). When the new variable is passed to the 
next function, it should have yet another name. It would be 
nice if the names were related, so that the reader would 
connected the various names for the parameters (eg 
image->pixels->my_pixels). However I don't have a sensible 
consistent naming scheme if I do this.

The alternative is to use the same name at all levels and 
let scoping rules handle it for you. This sounds the 
simplest way of handling it.

What do you do?

Thanks Joe

Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!

More information about the TriLUG mailing list