Big Integer handling in Blitz Basic 2D?

Miscellaneous Forums/General Discussion/Big Integer handling in Blitz Basic 2D?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Floats in BB2D do not give the right result.


cash# = 10000000000 ; 10 million

Print currency$ ( cash# )

;@currency function
Function Currency$(value)
    curr$ = Str(value)
	p=0
	For i=Len(curr$) To 1 Step -1
	        If p = 3 Then
            curr$ = Left(curr$,i)+","+Right(curr$,Len(curr$)-i)
            p = 0
        End If
        p = p + 1
	Next
    Return curr$
End Function



This gives an output of 1,410,065,408. Turning "value" to "value#" gives an output that's even wierder.

It doesn't work, neither does using the ^ operator. You have to use a big int function, which I'm reading up upon (doesn't exist as yet), or make the computer work out sums like in binary, or program a chinese abacus system (which goes up to 10 trillion).

OR.... just learn Blitz Max, which I don't like; but I guess it's the only way.