>
> Also, take a look to SET DECIMALS. Basically, it's the same thing as your
> rounding setting.
>
> Vlad
I don't think so. The DECIMALS setting affects the default display only,
i.e. if you write ? 23/77, with how many decimals will it be written.
Still, if you write x=23/77, x has all the possible decimals it can have
(some 15, I think).
I'm wrong - it behaved like that in 2.x, 1.x and neolyth. It really
works now, but not always - you better check it. I've tried several
versions of assigning a value to a variable before and after setting
decimals to something (looped 1 to 15 decimals) and... well, only sure
thing is that you set the decimals in advance, before you start
calculating. For example,
x=0.1234567890123456789
Set Deci To 4
? x
prints 0.1234567890123456789, but
For j=1 to 15
set decimals to j
x=0.1234567890123456789
? x
endfor
gives
0,123456789012346000
0,123456789012346000
0,123456789012346000
0,123456789012346000
0,123456789012346000
0,123456789012346000 ... etc.
In the help it says that Set Decimals affects the results of
calculations, i.e. arithmetics and aggregate functions (like sum ... for
and the such), but it obviously doesn't check for constants. I've tried
even to print ?x+0.00 but it invariably printed all the decimals,
regardless of the setting. So, I'd stick to Round(), just in case.