• 🏆 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!

I64api

Status
Not open for further replies.

MindWorX

Tool Moderator
Level 20
Joined
Aug 3, 2004
Messages
709
JASS:
native CreateI64 	takes integer baseHigh, integer baseLow returns integer
native DestroyI64 	takes integer id	 		returns nothing
native AddIntToI64 	takes integer id, integer addme 	returns nothing
native SubIntFromI64 	takes integer id, integer subme 	returns nothing
native AddI64ToI64 	takes integer id, integer addid 	returns nothing
native SubI64FromI64 	takes integer id, integer subid 	returns nothing
native MulI64 		takes integer id, integer mul	 	returns nothing
native DivI64 		takes integer id, integer div	 	returns nothing
native I64AsString	takes integer id		 	returns string
native I64AsHex		takes integer id		 	returns string
native I64AsIntHigh 	takes integer id 			returns integer
native I64AsIntLow 	takes integer id 			returns integer
native I64Compare 	takes integer id1, integer id2		returns integer

Tutorial: N/A
Download: N/A
Native Set Type: Single Player, Multi Player or WarSoc
Release: 0.10
Other: N/A

This is an API for making 8byte/64bit variables.
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
It's probably confusing to call them "integer" as well... How are you going to know if you want to use 32bit integer or 64 bit?

If it's possible (but I honestly don't know): replace "AddIntToI64" by a "+" operator?

And maybe you should find a way to make I64AsString use a similar identifier as "I2S"... Which could be done by e.g. calling I64 "long" (L2S)

Are there also plans of adding 64 bit reals?
 

MindWorX

Tool Moderator
Level 20
Joined
Aug 3, 2004
Messages
709
So this makes it compatable with 64bit Windows Vista?
Nope, that's not it, this is natives for using variables bigger than what wc3 uses already, which is 4 bytes, and these are 8 bytes.
WC3 Int = −2,147,483,648 to +2,147,483,647
I64 Int = −9,223,372,036,854,775,808 to +9,223,372,036,854,775,807
As you can see, it's only in rare cases it's going to be needed.

It's probably confusing to call them "integer" as well... How are you going to know if you want to use 32bit integer or 64 bit?

If it's possible (but I honestly don't know): replace "AddIntToI64" by a "+" operator?

And maybe you should find a way to make I64AsString use a similar identifier as "I2S"... Which could be done by e.g. calling I64 "long" (L2S)

Are there also plans of adding 64 bit reals?
Well, if someone made a parser like Vexorians vJass, then it shouldn't be a problem. Making a parser isn't the hardest thing to do, it just takes alot of time and debugging. But it's on the suggestion list, along with adding the common symbols for bit manipulation, like << and >> and other bit operators. If you know any sort of programming, like JAVA or C/C++, you could try and make a tool that does it. I could guide you on how to do it if you're interested.
 
Status
Not open for further replies.
Top