Page 1 of 1

put same value into multiple containers at the same time

Posted: Mon Apr 30, 2007 4:57 pm
by churchken
Hi,

Is there a "shortcut" way to do the following with a single line of code?

Code: Select all

put "ABC" into field"myletters"
put "ABC" into field"yourletters"
Many times, the same "value" needs to be assigned to multiple variables, and it would seem logical there should be a way to do so all with one line of code. I just have not seen an example of it.

Thanks,

Posted: Sat May 05, 2007 4:50 pm
by BvG
The only way I see to do this is with a repeat loop:

Code: Select all

put "myletters,yourletters,theirletters,anotherletter" into theFields
repeat for each item theItem in theFields
  put "ABC" into field theItem
end repeat