Why Let>I={Round(%I%)} returns invalid messages ?

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
cr2578b3
Newbie
Posts: 4
Joined: Fri Apr 22, 2005 11:07 pm

Why Let>I={Round(%I%)} returns invalid messages ?

Post by cr2578b3 » Sat Apr 23, 2005 12:15 am

Hi,

I don't understand why

Let>I={Round(50/3)}
Send>%I%

returns: 17
this is ok, but

Let>I=50/3
Let>I={Round(%I%)}
Send>%I%

returns "Invalid parameters to ROUND" and "Cannot read String as Float" messages !

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Sat Apr 23, 2005 3:11 am

Did a cut/paste from forum to my system, no typing differences.
Could not duplicate your error message on WIN XP PRO and 7.3.11.3

First formula calculated to 17.
Second formula calculated to 16.666666 and then rounded to 17.
Send> resulted in "17" for both.

:idea: Added some blank spaces to lines for more testing.
AHA! :!:
Problem located and corrected. :D

:arrow: Remove the extra character at the end of the
Let>I={Round(%I%)}. line
Last edited by Bob Hansen on Sat Apr 23, 2005 3:25 pm, edited 1 time in total.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

cr2578b3
Newbie
Posts: 4
Joined: Fri Apr 22, 2005 11:07 pm

Post by cr2578b3 » Sat Apr 23, 2005 11:50 am

Thank you for your answer. I checked my script, but there are no blank spaces hidden.
I'm on WIN XP PRO + 7.3.11.3e evaluation.

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Sat Apr 23, 2005 2:56 pm

I think this is the same bug that was fixed some versions ago, see http://www.mjtnet.com/usergroup/viewtop ... ight=round I tried it under 7.3.04 and get the same error.

Do you maybe have an older version installed ?

cr2578b3
Newbie
Posts: 4
Joined: Fri Apr 22, 2005 11:07 pm

Post by cr2578b3 » Mon Apr 25, 2005 9:18 pm

Happy to hear that you got the same error !
I read the link you wrote, thank you, that is exactly the information I was looking for !
Yes, I had an older version before trying the 7.3.11 eval, and I have this bug with the 2 versions. I have to try to install the 7.3.11 eval on a new system, without previous version.
Seems strange to keep this bug when an older version was installed !!

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Tue Apr 26, 2005 3:38 am

I just installed that 7.3.11.3e eval on an XP PC with 7.3.10 pro and there's no error using either version - so I think the "hangover" theory is a good one.

cr2578b3
Newbie
Posts: 4
Joined: Fri Apr 22, 2005 11:07 pm

Post by cr2578b3 » Thu Apr 28, 2005 11:02 pm

I FOUND THE PROBLEM !!!
In fact, there were 2 problems:

1) there is a bug in the previous versions (that's what you said Me_again)

2) I'm in France and here we write 16,666 and not 16.666 !!!

So with the 7.3.11.3e + Windows setting on . instead of , for the digits, now it works and I don't have any more the error messages "Invalid parameters to ROUND" and "Cannot read String as Float".

Thanks to you all ...

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Fri Apr 29, 2005 5:46 am

Hi,

Thanks for letting us know the solution. The complex expressions should really be able to cope with any regional numeric format and you shouldn't really have to change your settings to make it work, so I consider this a bug and will put it on the list of things to do.
MJT Net Support
[email protected]

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