Array value by arithematic operations inside curli braces

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Niroj@Work
Pro Scripter
Posts: 63
Joined: Thu Dec 10, 2009 8:13 am

Array value by arithematic operations inside curli braces

Post by Niroj@Work » Thu Dec 31, 2009 6:15 am

Let>arr_1=1
Let>arr_2=2
let>arr_3=bingo
mdl>arr_{%arr_1%+%arr_2%}

I wanted to print "bingo" but not working...
Can't we do a arithmatic operation between a curli braces to get a value stored in an array?

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 Dec 31, 2009 10:29 am

You would need to split it up:

Code: Select all

Let>arr_1=1
Let>arr_2=2
let>arr_3=bingo

Let>nVal={%arr_1%+%arr_2%}
Let>sVal=arr_%nVal%

MessageModal>sVal
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