Page 1 of 1

Modifying of Debug [Ceased]

Posted: Wed Oct 22, 2008 7:02 pm
by Lubos
I tried to use Debug command for instant express calculation.
It works fine even for relatively complicated expression. If express contains integer number only, the result is integer too. A float number must stand as first. I can solve it by multiplying by 1.0, but I don’t like it. Instant calculation is useful, so I suggest modify behavior of Debug.

Code: Select all

Debug 5/2 + 1/3
Debug 5/2 +  1/3*1.0
Debug 5/2  + 1.0 *(1/3)
Debug (5/2  + 1/3)*1.0 
Debug 1.0* (5/2  + 1/3)
Debug (5/2+5/2+5/2+5/2)*1.0
Debug 1.0*(5/2+5/2+5/2+5/2)
Debug 1.0*5/2 + (5/2+5/2+5/2)
Debug -5/3 + Log(2) 
Debug  Log(2) - 5/3

Posted: Wed Oct 22, 2008 7:10 pm
by Kaeru Gaman
don't get it....
you want to be the result of a debug be FLOAT in every case, even when you enter only Integers?

Posted: Wed Oct 22, 2008 7:20 pm
by Psychophanta
No need to multiply by 1.0, just need to add '.' after, like that:

Code: Select all

Debug 5./2. + 1./3.
:)

Posted: Wed Oct 22, 2008 7:22 pm
by Lubos
Kaeru Gaman wrote:don't get it....
you want to be the result of a debug be FLOAT in every case, even when you enter only Integers?
Yes. But, it was already only suggestion. Maybe, permanent float brings other disadvantages. Probably better sugestion is Debug.f

Posted: Wed Oct 22, 2008 7:27 pm
by Lubos
Psychophanta wrote:No need to multiply by 1.0, just need to add '.' after, like that:

Code: Select all

Debug 5./2. + 1./3.
:)
Oh. So simple. :shock: I drive my sugggestion back. I was a rash.

Posted: Wed Oct 22, 2008 7:29 pm
by Kaeru Gaman
Maybe, permanent float brings other disadvantages.
it surely does. Float has an incertaincy.

If I want to debug my code, I need to see the integer values that resulted as Integers.

being able to execute instant calculations is just a kind of "bonus".

ever thought about using CALC.EXE?
windows HAS a build-in calculator, you know?