Confusion over complex operators: <= >=

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Jerry Thomas
Macro Veteran
Posts: 267
Joined: Mon Sep 27, 2010 8:57 pm
Location: Seattle, WA

Confusion over complex operators: <= >=

Post by Jerry Thomas » Thu Sep 30, 2010 4:00 pm

I am confused by the behavior of complex operators in a While loop.
The behavior of = is not obvious.

According to Online Help, these are valid.
http://www.mjtnet.com/OnlineHelp/index. ... rators.htm

Examples:
//Works as expected, loops through 2 times and then moves on
Let>X=3
Let>Y=1
While>X>Y
Let>Y=Y+1
EndWhile


//Skips over the loop even though X is initially less than Y
Let>X=3
Let>Y=1
While>X>=Y
Let>Y=Y+1
EndWhile


//Runs forever, even though Y gets incremented to greater than X
Let>X=3
Let>Y=1
While>YY=Y+1
EndWhile

Can someone explain this to a newb?
Thanks,
Jerry

[email protected]

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 Sep 30, 2010 4:18 pm

Hmmmn. Must be a bug. >= and <= should be supported, but it doesn't look like they are working properly in While. I've added this to the work list.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

Dick99999
Pro Scripter
Posts: 84
Joined: Thu Nov 27, 2008 10:25 am
Location: Netherlands

Post by Dick99999 » Fri Oct 01, 2010 6:37 am

The same help file mentions:
"...in Macro Scheduler all complex functions should be contained within curly braces ("{" and "}"). "

So X>=Y
should be something like {%X%>=%Y%}

Furthermore:
"Complex expressions are supported in Macro Scheduler's IF statements and LET statement, and since version 9.0 can now also be included within all other commands and function calls in the place of regular variables."

However, it has been mentioned that while does not seem to accept complex expressions, see http://www.mjtnet.com/forum/viewtopic.php?p=28133

So please add the whole while statement to the list of work to be done.

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

Post by Marcus Tettmar » Fri Oct 01, 2010 7:46 am

We'll get it sorted.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

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