• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Max/Min integer values?

Status
Not open for further replies.
Level 15
Joined
Sep 3, 2006
Messages
1,738
Hola, I was wondering if anyone knew what the Max integer value/min integer value was?

In Delphi it's something like

Code:
writeln(maxint);
writeln(minint);

and it would display the maximuim and minimum value it can compile on your PC.

Can you do this in WC3? And if so, what is the max/minint?
 
Level 9
Joined
Nov 28, 2008
Messages
704
Things are if I recall 4 bytes for integers. I could be wrong, but I am positive I heard that somewhere.

2^(4*8-1) = 2147483648, and it can also go to negative that.

Perhaps someone will know better, but that should help. Because WC3 has no useful MAX_INT or something like it, it might be the best you can do unless you want to make a loop with timeses a number by two 32ish times, and see if it has some stack overflow from that.
 
Level 15
Joined
Aug 11, 2009
Messages
1,606
This is what i found in my search
PHP:
char Character or small integer. 1byte
signed: -128 to 127
unsigned: 0 to 255
short int
(short)
Short Integer. 2bytes
signed: -32768 to 32767
unsigned: 0 to 65535
int Integer. 4bytes
signed: -2147483648 to
2147483647
unsigned: 0 to 4294967295
long int (long) Long integer. 4bytes
signed: -2147483648 to
2147483647
unsigned: 0 to 4294967295
bool
Boolean value. It can take one of two values: true
or false.
1byte true or false
float Floating point number. 4bytes +/- 3.4e +/- 38 (~7 digits)
double Double precision floating point number. 8bytes +/- 1.7e +/- 308 (~15 digits)
long double Long double precision floating point number. 8bytes +/- 1.7e +/- 308 (~15 digits)
wchar_t Wide character.
2 or 4
bytes
1 wide char
 
Level 9
Joined
Nov 28, 2008
Messages
704
There is only one type of int in WC3, and it appears to be a long signed. You cannot choose or modify that as far as I can tell.

Anyone know what floats are?
 
Status
Not open for further replies.
Top