Just curious. Why the > after commands?

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
cvlr
Newbie
Posts: 18
Joined: Thu Jun 07, 2018 4:40 pm

Just curious. Why the > after commands?

Post by cvlr » Tue Sep 04, 2018 3:36 pm

Why are statements like If and Let followed by> ? What was the design decision for that?

User avatar
Grovkillen
Automation Wizard
Posts: 1131
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Re: Just curious. Why the > after commands?

Post by Grovkillen » Tue Sep 04, 2018 4:26 pm

It's to delimit the command from the command switches. Commonly used in programming languages, or at least variants of it.
Let>ME=%Script%

Running: 15.0.27
version history

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

Re: Just curious. Why the > after commands?

Post by Marcus Tettmar » Tue Sep 04, 2018 5:51 pm

It's a delimiter. But also it just evolved that way. The very first version of Macro Scheduler way back in 1997 didn't have an editor. At that stage no one envisaged how powerful it would become and it just had a simple command builder. So the ">" was just added between the command and the parameters to help visualise things. When we started making it possible to edit scripts and it slowly evolved into a language we needed backward compatibility and people were used to seeing it so we just left it in. Another reason is that our aim was that ordinary people would use it and it was never aimed only at developers, so we didn't force "type" and you can intermix variables and strings and you didn't need string delimiters. That means that spaces would have to be assumed to be part of a string. So we couldn't use a space as the delimiter like you might be used to in "real" programming languages. Of course we now have directives that let you override that behaviour but since that isn't the default and backwards compatibility is important to us, the familiar ">" is still there. So its there partly for historical reasons and partly for simplicity. Hope that helps.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

User avatar
PepsiHog
Automation Wizard
Posts: 517
Joined: Wed Apr 08, 2009 4:19 pm
Location: Florida

Re: Just curious. Why the > after commands?

Post by PepsiHog » Fri Sep 21, 2018 1:20 am

@Marcus,
Not that I will ever use it, but now you have me curious. What directives? And how would a user go about using these directives?

I like knowing everything about things I own. It's the knowing.

Thanks.
Windows 7

PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)

The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!

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

Re: Just curious. Why the > after commands?

Post by Marcus Tettmar » Thu Sep 27, 2018 3:58 pm

Try the help file ;-)

For starters see the "Ignoring Spaces" topic.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

User avatar
PepsiHog
Automation Wizard
Posts: 517
Joined: Wed Apr 08, 2009 4:19 pm
Location: Florida

Re: Just curious. Why the > after commands?

Post by PepsiHog » Thu Sep 27, 2018 10:58 pm

I misunderstood what you were saying. You first were addressing the question about >. I thought you were addressing the same when you stated "We now have directives...."

PepsiHog
Windows 7

PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)

The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!

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