Fixed # of decimal places after the point

Blitz3D Forums/Blitz3D Beginners Area/Fixed # of decimal places after the point

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.

Hi,

Probably a really simple answer but I'm a bit stuck on it:

I want to create a floating point number to 2 decimal places, but creating a value thus:

myvar# = 0.0

prints out to varying decimal places from 0-4:

25.0
12.3333

etc..

I even tried converting it to a string value and truncating the string like so:

stat$=Str$(saccuracy#)+"00"
stat$=Left$(stat$,Len(stat$)-2)

But it still wont print correctly.. =/

Any help appreciated.

Cheers