How can I change the precision of a floating number. For example I'm trying to convert 23.3455 to 23.34 & this's what I'm doing:
'y' is now a symbol. HOw can this be converted to a floating number?
In order to get the value of a string, you can use function evalstring.
Eg: x = 23.3255
sprintf(y "%5.2f" x) ; this will return y="23.33"
evalstring(y) ; evaluate string value, you will get your answer here
How about this? : )
y=evalstring(sprintf(nil "%5.2f" x))
In reply to Quek:
In reply to Andrew Beckett: