1/2 =0

Blitz3D Forums/Blitz3D Programming/1/2 =0

slenkar(Posted 2004) [#1]
Graphics 800,600
SetBuffer BackBuffer()

While Not KeyDown(1)
var#=1/2
text 50,60,var#
Text 50,50,1/2
Flip
Wend
End



Nordvall(Posted 2004) [#2]
var#=Float 1/2


Warren(Posted 2004) [#3]
1 and 2 are integers. Try:

Graphics 800,600
SetBuffer BackBuffer()

While Not KeyDown(1)
var#=1/2.0
Text 50,60,var#
Text 50,50,1/2.0
Flip
Wend
End


If you want a float result, some part of the equation needs to be a float.


slenkar(Posted 2004) [#4]
thanks it works now