this prints "103" in the debug console, is there any way i can convert 103.88 to a string which reads "103.88" without rounding it?
Code: Select all
Debug Str(103.88)
Code: Select all
Debug Str(103.88)
Code: Select all
; Procedure originally by Don.
;
Procedure.s StrFloat(number.f, places.l)
r=Pow(10,places) : vf.f=number*r : vs.s=Str(vf)
rs.s=Left(vs,Len(vs)-places)+"."+Right(vs,places)
ProcedureReturn rs
EndProcedure
;
Debug StrFloat(103.88, 2) ; 2 = # of decimal places.
