convert float to int

Blitz3D Forums/Blitz3D Beginners Area/convert float to int

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.

a#=3.14159

ba=createbank(4)
pokefloat ba,0,a#
a2%=peekint(ba,0)

print a2%

pokeint ba,0,a2%
a#=peekfloat(ba,0)
print a#


To get the numeric equivelant, why not just read it out as a float and convert it to an int, like this:
a#=3.14159

ba=CreateBank(4)
PokeFloat ba,0,a#
a2%=PeekFloat(ba,0)

Print a2%

... or am I misunderstanding the question?