floating point print function

BlitzMax Forums/BlitzMax Programming/floating point print function

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.

The simpler version is a print with

left(string(float_number),instr(".",string(float_number)) + dec)

where dec is the amount of decimal places you want.

Cutting of all zeros is a little problem because in reality the computer will "never" have only zeros there ... (number representation can't be precise enough with float, not even double can ...)