if I want to use a variable instead of a literal for "object_label" in the following:
put parameter_value into myArray[1]["object_label"] // store the new value
what is the correct syntax? I've tried:
put quote & parameter_name & quote into tString
put parameter_value into myArray[1][tString] // store the new value
but that didn't work.
-- Mark
Array question
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- VIP Livecode Opensource Backer
- Posts: 931
- Joined: Thu Nov 13, 2008 6:48 am
Array question
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS
Targets: Mac, iOS
Re: Array question
The syntax is correct, but don't put quotes around the parameter_name unless you really want quotes around it.
-
- VIP Livecode Opensource Backer
- Posts: 931
- Joined: Thu Nov 13, 2008 6:48 am
Re: Array question
Thanks Mark, removing the quotes fixed the problem.mwieder wrote:The syntax is correct, but don't put quotes around the parameter_name unless you really want quotes around it.
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS
Targets: Mac, iOS