Representation of Arrays
Moderators: JRL, Dorian (MJT support)
Representation of Arrays
All versions of MS as of today treat Array[1] and Array[ 1] as two different animals. Sometimes it caues confusions to inexperienced MS users. It would be nice if they'll be treated as the same thing in future.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Variables can be created however you like. That has always been the case. "Array" variables in MacroScript aren't true arrays like you will find in "proper" programming languages. But because you can use variable names inside other variable names you can treat variables as arrays. And any format is valid:
array_1
array1
array[1]
array[ 1]
array*1
array~1
...
Do what you like. Do what works best for you. Use the format you are comfortable with.
array_1
array1
array[1]
array[ 1]
array*1
array~1
...
Do what you like. Do what works best for you. Use the format you are comfortable with.
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?
Obvious, it's my misunderstanding and ignorance. Thanks for telling these aren't true arrays. May I venture to extend the idea of creating variables on the fly? For example,
Let>Var=ReferenceVar
Let>%Var%=123
Surprisingly, Macro Schedule supports the creation of variables on the fly.
In the above test script, 123 is actually assigned to Reference!
Let>Var=ReferenceVar
Let>%Var%=123
Surprisingly, Macro Schedule supports the creation of variables on the fly.
In the above test script, 123 is actually assigned to Reference!
See this thread for a more lengthy explanation.