FromDouble ? How ?

BlitzMax Forums/BlitzMax Programming/FromDouble ? How ?

Hi
How does FromDouble work? I get either an empty String or a message: Identifier 'FromDouble' not found...

EDIT: I figured it out ... but still wonder if this is the best method ...
Besides the fact that it works correct.

Function NumForm:String(x:Double,NachKomma=2,Tok:String="'")
	Local y:String,posit,count
	y=y.FromDouble(x)
	posit=y.Find(".")
	If posit=-1 Return y
	y=Left(y, posit+1+NachKomma)
	count=3
	While posit>count
		y=Left(y,posit-count)+Tok+Mid(y,posit-count+1)
		count:+3
	Wend
	Return y
End Function


y = string(x) would be the correct usage. BM has no consistent naming convention like C# and others.

FromDouble is a function, so it doesn't need an instance of string; it makes one.

y=String.FromDouble(x)