Re: NEWBIE: Change levels (not the normal stuff)

From: Ole Gjerde (gjerde@plains.nodak.edu)
Date: 05/19/96


On Sat, 18 May 1996, Corey Hoitsma wrote:

> class.c:712: warning: integer constant out of range
> class.c:712: warning: decimal constant is so large that it is unsigned
> class.c:713: warning: integer constant out of range
> class.c:713: warning: decimal constant is so large that it is unsigned
> 	forever and ever. SO, I went into stucts.h and changed the
> 		int exp;
> 	lines to:
> 		long exp;
> 	That's what I've been told anyways... and then I went thru all the
> 	code and changed all the %d's for GET_EXP to %ld. and that works..
> 	but when I recompile, class.c STILL gives me all thoughs warnings..
> 	any idea why?

That's because you're probably on a 32-bit os, which means your int is 
the same as your long (32-bits).  You'll have to make it unsigned long 
exp; to use a bigger number (or long long if you feel brave).

---
Ole Gjerde
Homepage: http://www.winternet.com/~gjerde
Email: gjerde@plains.nodak.edu, gjerde@winternet.com, jander@fix.bbs.no
Studying Computer Science at North Dakota State University
"Unix _IS_ user friendly... It's just selective about who its friends are."
                                                  -- Unknown/Nem Schlecht



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