converting a float to a string

BlitzMax Forums/BlitzMax Beginners Area/converting a float to a string

How would you convert a float to a string with a fixed number after the decimal point? I have tried different things, but none of them works.

you would have to write an own parse function that uses string () and left ()

You could do it that way:


Global Number:Float = 34.65783344
Global fixed:Int = 5
Global String_number:String 

String_number = String_number.FromFloat(Number)
Global Point:Int = String_number.Find(".")

String_number = String_number[..Point + fixed+1]

Print Number
Print String_number 



@klepto2, thats exactly what I was looking for, thanks :)