Re: Adding Levels with bpl17

From: Peter Ajamian (peter@pajamian.dhs.org)
Date: 07/21/00


Juliano Ravasi Ferraz wrote:
>
> It's data type is 'byte', that is a typedef to 'char'. 'char' (or
> 'signed char') is a data type of 8 bits, that goes from -127 (10000000)
> to 126 (01111111). This means that ANY value of 'level' will be less
> than 201.

Not really relevent to the question at hand, but probably should be
corrected nonetheless...

The data type char might be signed, or unsigned, depending on the
implementation.  It is even possible for it to not be 8 bits (on some
platforms it might be 7 bits wide).  As a general rule of thumb, never
assume that a char can contain a number higher than 127 or lower than
0.  If you specifically want a signed or unsigned char, then define it
as such.

If you want to you can check limits.h to see what the ranges are for
your particular implementation, macros to check are CHAR_BIT, CHAR_MAX,
and CHAR_MIN.

Regards, Peter


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/10/01 PDT