Re: [newbie] changing from int to long

From: Sammy (Samedi@cris.com)
Date: 12/24/96


On Tue, 24 Dec 1996, Nic Suzor wrote:

- i have changed my exp to a long, and i am wondering wether i have to change
- these:
- 
- (titles[(int) GET_CLASS(victim)][newlevel].exp)
- 
- to something like this: (titles[(long) GET_CLASS(victim)][newlevel].exp) ?

Sorry I don't have the thinking capacity to answer your question, but I
just wanted to comment that on most 32 bit operating systems, ints and
longs are the same size.  Here's a quick test:

#include <stdio.h>

int main(void)
{
  int x;
  long y;

  if(sizeof(x) == sizeof(y))
    printf("int and long are equal\r\n");
  else
    printf("int and long are not equal\r\n");

  exit(0);
}

Sam

+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/18/00 PST