Brian Beffa wrote:
>
> I cant seem to get why this code doesnt work starting at line 452. It looks
> the same as all the other code. Here is the segment, Line 452 is case 6,
> where eveything after goes bad.
>
> case '5':
> return (1 << 31);
> break;
> case '6':
> return (1 << 32);
> break;
You've exceeded the range of the return type (probably long). A long is
32 bits wide, so you can set or clear bits numbered from 0 to 31, 32 and
up is out of range.
Side note: An int is usually 32 bits wide also, but on some platforms an
int will be 16 bits wide.
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/11/01 PDT