Re: [hackers-il] Common Abbreviations in Variable Names
- mulix <mulix@...> writes:
> On Tue, 18 Sep 2001, Shlomi Fish wrote:In the old Fortrans (the default is carried over to the newer ones,
> istr something about the i coming from fortran, where the first letter
> (only letter?) of the variable stood for its type. any of the old timers
> care to enlighten us?
for compatibility) variables starting with i,j,k,l,m,n were integers,
the rest - floats, unless explicitly declared. If you program Fortran,
I strongly suggest explicitly declaring all variables and not relying
on the defaults.
>Also src, dst, err, addr, incr, decr, del, rem, cpy, etc [this last
> > iter - iteration (also: iters == iterations
> also 'it'.
> > num - number
> > obj - object
> > prod - product
> > ptr - pointer
> > ref - reference
> > str - string
> you forgot the great catch all variable, 'tmp'.
one deserves a smiley]. There is any number of these "generally
understandable" algorithms. Note btw [:-)] that some, such as ptr, are
better off in comments than in code.
Oleg Goldshmidt | ogoldshmidt@...
"If it ain't broken, it has not got enough features yet."