Trunc or Round functions

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
ABIVEN
Pro Scripter
Posts: 71
Joined: Sun Aug 07, 2005 7:22 pm
Location: PARIS

Trunc or Round functions

Post by ABIVEN » Sun Jan 23, 2011 10:53 am

Hello,

I tried the new feed of MARCUS "Slow Mouse Move" and I see I have some problem with Trunc or Round functions and perhaps with other complex expressions.

Little Test Macro :

Let>m=1.5
Let>mp={Trunc(%m%)}
MessageModal>mp=Trunc(1.5) %CRLF% %mp%
//OK Prints 1
Let>n=3
Let>m=n/2
Let>mp={Trunc(%m%)}
MessageModal>mp=Trunc(3/2) %CRLF% %mp%
// Prints : "Line: 7 Invalid parameters to TRUNC"
Let>n=3
Let>m={%n%/2}
Let>mp={Trunc(%m%)}
MessageModal>mp=Trunc(3/2) %CRLF% %mp%
// Prints : "Line: 12 Invalid parameters to TRUNC"

.

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

Post by Marcus Tettmar » Sun Jan 23, 2011 8:11 pm

Your macro works fine for me. I get:

mp=Trunc(3/2)
1

For all three messages.

Which version are you running?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

ABIVEN
Pro Scripter
Posts: 71
Joined: Sun Aug 07, 2005 7:22 pm
Location: PARIS

Post by ABIVEN » Mon Jan 24, 2011 6:07 am

.
Thanks Marcus

Version 11.1.08a - April 2009

Regards

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