-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, Jun 17, 2003 at 02:56:36AM +0900, F. GEIGER wrote: > > "tmp" is always a temporary variable. > > There's almost never any point in using any name containing "tmp". Most > variables are temporary... A tmp variable is one that is so temporary that it's use doesn't span more than a few lines. Certainly never more than a screenful of code. Other variables are used over longer stretches of code. The name tmp helps make a distinction. For example: /* C code: * Switch two values. */ tmp = a; a = b; b = tmp; Of course, this is mute in Ruby where you can do "a, b = b, a". So the "tmp" syntax is more of a C tradition (or Fortran). > I prefer using "aux" if I need an ad-hoc variable and cannot come up with a > better name. The purpose of tmp is not to be an ad-hoc variable. Just like i and j are not ad-hock. They have particular meanings, expemplified above. - -- Daniel Carrera | OpenPGP fingerprint: Graduate TA, Math Dept | 6643 8C8B 3522 66CB D16C D779 2FDD 7DAC 9AF7 7A88 UMD (301) 405-5137 | http://www.math.umd.edu/~dcarrera/pgp.html -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (SunOS) iD8DBQE+7ooxnxE8DWHf+OcRAlBPAKCuD2Fz9QnPsVt5Zs/2sxVg4EY7KACfdJc0 B5HnMdXDOupD4cQdiOMbcFg= =jTVm -----END PGP SIGNATURE-----