formated output

BlitzMax Forums/BlitzMax Beginners Area/formated output

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.

Unfortunately, none, so you have to write your own functions to achieve this. Something like this should work...

Function FormatNumber$(num#,places)
  Local output$
  output$=num:*(10^places)
  Return Left(output,output.length()-places)+"."+Right(output,places)
End Function


Untested, as I'm at work. Some of that uses the 'old' Blitz way of doing things, but should still work in BlitzMax. There may be a better way of doing it to, but that was the first that entered my head.