a=b vs %a%=%b% vs {%a%=%b%}
Moderators: Dorian (MJT support), JRL
a=b vs %a%=%b% vs {%a%=%b%}
What is the difference between these in logical operations? Which one should I use comparing the numbers or in calculations?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: a=b vs %a%=%b% vs {%a%=%b%}
It kinda depends. One thing it depends on is whether you have VAREXPLICIT enabled. If it is enabled then the first one will look at literal values and will therefore be false. The second two are the same.
Step through this with the debugger to see what I mean:
Step through this with the debugger to see what I mean:
Code: Select all
Let>a=apple
Let>b=apple
//this would be true
If>a=b
//true
Endif
//this would be false
Let>VAREXPLICIT=1
If>a=b
//true
Endif
//true
If>%a%=%b%
//true
Endif
//true
If>{%a%=%b%}
//true
Endif
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?