On 2023-05-11 15:47, matthias rebbe via use-livecode wrote:
Mark, thank you very much!
i didn't know or remember that the key name of an array can be created
directly using strings and variables
Maybe i even did that in the past, but could not remember anymore. I
really thought i have solved it that time with value() :)
No problem - of course, I used & in my example - but when I'm doing
stuff like that I tend to use format:
put tFoo[format("wp_%s_%s", tMiddlePart, tSuffix)] into
tMiddlePartSuffixValue
It does the same job, but I find it more readable (as the structure of
the string can be seen immediately without having to wade through quotes
and ampersands :)
Warmest Regards,
Mark.
--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Build Amazing Things
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode