Re: Anyone know how to set an arbitrary subset of record elements? (another reason that associative arrays would be nice)
Re: Anyone know how to set an arbitrary subset of record elements? (another reason that associative arrays would be nice)
- Subject: Re: Anyone know how to set an arbitrary subset of record elements? (another reason that associative arrays would be nice)
- From: Shane Stanley <email@hidden>
- Date: Sun, 09 Sep 2001 08:26:12 +1000
On 9/9/01 12:01 AM +1000, Timothy Bates, email@hidden, wrote:
>
I have a record
>
pSubjectFileParameters : {prefix:"", suffix:"", maxLength:""}
>
>
and I want to be able to take a record which contain 1 or more of these
>
elements and do something like
>
>
repeat with anItem in {prefix:"test1", maxLength:"31"}
>
set <label of anItem> of pSubjectFileParameters to <value of anItem>
>
end
>
>
pSubjectFileParameters
>
-->
>
>
Anyone see how this can be accomplished? It would be easy if this was an
>
associative array as the pseudo-code would just execute as requested
>
>
Of course I can't just go:
>
>
set pSubjectFileParameters to {prefix:"test1", maxLength:"31"}
If I understand what you want correctly, you can just concatenate:
set pParameters to {prefix:"", suffix:"", maxLength:""}
set pParameters to {prefix:"test1", maxLength:"31"} & pParameters
--
Shane Stanley, email@hidden