HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

The challenge -BIGINTS-

08-01-2003, 06:02 PM#1
Aiursrage2k
Someone has asked me a question, one that it quite difficult. It is the ability to use Bigints, and all of its apporiate opeartors, plus, minus, multiply and divide, constructor (easy enough to do).

Since we can not use integer pointers, we have elected to store big ints in an integer array, with the first element representing the size of the array, and the other digits representing there number.

//x, is an integer array where it represents 100
x[0] = 3
x[1] = 1
x[2] = 0
x[3] = 0

Now we will begin developemnent of the four other function opeartors, if you are able to do one of these functions please post it here. Given time I will eventually figure it out, but if someone is able to do it before me, then all the better.

-Aiursrage2k
08-01-2003, 10:41 PM#2
gurubvin
wats a bigint exactly?
08-01-2003, 11:18 PM#3
Nozdormu
No clue...the JASS version of Long?
08-02-2003, 04:36 AM#4
gurubvin
yea, if it's a long all that stuff he's talking about makes sense now.

ummm... interesting concept. i can't see right now wer this would be useful yet. it seems like the current int size is big enough. good luck with it though
08-03-2003, 01:21 AM#5
piRo-piOn
i believe whaty he is talking about is that there is no way to find when an array has ended so you go on untill the value in array[0], for those of you who know SQL he is looking for an "eof" type value (End Of File). Scince there is no EOF in Jass this is the only way you can do it, sorry... but i think that this is pretty efficient as is. I don't understand why we need to change it.

and if that's not what hes talking about he is talking about integers not being able to support long integers... but in my experience they do. if you set udg_INTEGER = 100 it will work...
08-06-2003, 12:05 PM#6
jmoritz
I replied to the same question at CampaignCreations here. Made a little start with the solution. Take a look here .