Loading ...
Sorry, an error occurred while loading the content.
 

Re: [hackers-il] Common Abbreviations in Variable Names

Expand Messages
  • Oleg Goldshmidt
    ... In the old Fortrans (the default is carried over to the newer ones, for compatibility) variables starting with i,j,k,l,m,n were integers, the rest -
    Message 1 of 16 , Sep 20, 2001
      mulix <mulix@...> writes:

      > On Tue, 18 Sep 2001, Shlomi Fish wrote:
      >
      > 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?

      In the old Fortrans (the default is carried over to the newer ones,
      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.

      >
      > > 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'.

      Also src, dst, err, addr, incr, decr, del, rem, cpy, etc [this last
      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."
    Your message has been successfully submitted and would be delivered to recipients shortly.