exponential-underflow??

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Hardware_Tester
Pro Scripter
Posts: 58
Joined: Mon Jun 27, 2005 7:03 am
Location: Switzerland

exponential-underflow??

Post by Hardware_Tester » Thu Mar 23, 2006 8:47 am

Hello, I'm back again :-)

I've a bit a strange problem: Somewhat like a variable underflow :?
This is when writing something like 9e-6 in a variable. It would'n bother me, if it's handled like a string or a number. But it has to be correct!


Check it out yourself:

//Initialisation of global variables
//Set the delay between sending characters in milliseconds
Let>SK_DELAY=20
//Start all programs maximised
Let>RP_WINDOWMODE=3
//Wait after starting a program until it is idle
Let>RP_WAIT=2

//Test exponential write
RUN>C:\winnt\system32\notepad.exe
SetFocus>Untitled - Notepad
Let>BER=9e-6
Send>%BER%

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Mar 23, 2006 9:17 am

I think you mean either:

Let>BER=9e1-6

Answer = 84

Or, if you want to force it to be a string:

Let>BER={"9e-6"}

Answer 9e-6
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Hardware_Tester
Pro Scripter
Posts: 58
Joined: Mon Jun 27, 2005 7:03 am
Location: Switzerland

Post by Hardware_Tester » Thu Mar 23, 2006 9:31 am

What I mean is:

9E-6=9*10^-6=0.000009

And this isn't invented by me, in LabView this is the usual form, also in pocket calculators.

But the second solution could work, as LabView can convert the string into a number.

Thanks for the fast support.

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts