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 / 3466
3465  |  3467
Subject: 
Re: INT_MAX in BrickOS
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Wed, 8 Oct 2003 21:05:35 GMT
Viewed: 
2966 times
  
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
==========================================
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

HTH,

Mark



Message has 1 Reply:
  Re: INT_MAX in BrickOS
 
(...) 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 (21 years ago, 8-Oct-03, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  INT_MAX in BrickOS
 
What's the max value for an INT in BrickOS? Is it +/- 2,147,483,647? (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

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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