Re: do_set

From: Mike Breuer (
Date: 09/09/01

----- Original Message -----
From: "Phillip Ames" <grathol@HOTPOP.COM>

> ...level stored as a 'byte'.  Now, my question is, why? :)  Why not use an
> integer for the characters level, and an int for the set_struct?  If
> could explain to me why this is, I'd be most appreciative.  Thanks,

In the stock code, there are only 34 levels max, which easily fits into the
range of a byte, which is -128 to 127.  I would imagine that the original
coders felt that it would be wasteful to use say, a short integer which has
a range of -16384 to 16383 when they are storing numbers in the range of 1
to 34.  Using the smallest variable that supports your desired range keeps
disk files and memory footprints small.  Such concerns are less important on
newer hardware, but they are still worth some consideration.


   | FAQ: |
   | Archives: |

This archive was generated by hypermail 2b30 : 12/06/01 PST