Hello Ross, Tuesday, September 14, 2004, 5:18:55 PM, you wrote:
> I've tended to use ShortInt and SmallInt rather than Integer to > not waste�memory when values are never going to exceed�their > maximum, but I read somewhere that Integer should be used when > possible for speed purposes. > � > I've�found it slightly useful when reading the source to know > that a particular�variable doesn't ever exceed 127 or 32767. > � > What sort of speed differences are we talking about?� Is it worth doing a global > find/replace? > � > Cheers, > Ross Levis. I tend to use integer in most places for the simplicity of it, and use documentation and assertions to validate values where applicable. If you've written your code with the correct variable types passed to define ranges etc then you are probably following a "more correct" path of self-documenting code (as long as range checking is turned on). I wouldn't bother changing your good practice to eek out a nano-second here and there. -- Best regards, Kyley mailto:[EMAIL PROTECTED] _______________________________________________ Delphi mailing list [EMAIL PROTECTED] http://ns3.123.co.nz/mailman/listinfo/delphi
