Posted: Mon Sep 15, 2008 5:14 pm Post subject: Re: Some help with real varibles...
I you really want to "get rid" of extra numbers you can convert to a string, find the decimal position then cut off anything past 2 places after the decimal then convert back to real.
An easier method would be
num:= round( num*100)/100
lordroba
Posted: Mon Sep 15, 2008 6:40 pm Post subject: Re: Some help with real varibles...
Or perhaps you mean something like this...
Turing:
var a :=12554.562342534 put a :6:2
The first number is the width of the string, the second number is how many decimals you want.