To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 3467
3466  |  3468
Subject: 
Re: INT_MAX in BrickOS
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Wed, 8 Oct 2003 21:20:54 GMT
Viewed: 
3093 times
  
In lugnet.robotics.rcx.legos, Mark Riley wrote:
In lugnet.robotics.rcx.legos, Steve Hassenplug wrote:
What's the max value for an INT in BrickOS?

Is it +/- 2,147,483,647?

Hi Steve,

Here's a handy table:

TYPE          BITS         MIN         MAX
==========================================
int            16       -32768       32767
long           32  -2147483648  2147483647

Yes, very much, thank you.

That explains why I was getting odd results when I set an int to 65535.

Now, I know what to do.

Thanks
Steve



Message is in Reply To:
  Re: INT_MAX in BrickOS
 
(...) Hi Steve, Here's a handy table: TYPE BITS MIN MAX ===...=== char 8 0 255 unsigned char 8 0 255 signed char 8 -128 127 int 16 -32768 32767 unsigned int 16 0 65535 unsigned 16 0 65535 long 32 -2147483648 2147483647 unsigned long 32 0 4294967295 (...) (21 years ago, 8-Oct-03, to lugnet.robotics.rcx.legos)

3 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR