True, true. in that example the “;” separates the declaration command from the assignment command. My mistake.
However, here is an example that does the assignment right in the declaration command, on the fly: It seems to work (!). Honestly, I half expected it to fail on the first do. on mouseUp local tStr, tOut put empty into tOut put empty into msg repeat with x=1 to 3 put "local tVar_" & x & "=" & 2*x into tStr do tStr put tStr & cr after msg put "put tVar_" & x & " after tOut" into tStr do tStr put tStr & cr after msg end repeat put tOut after msg end mouseUp .Jerry > On Jun 8, 2016, at 9:15 PM, Mark Wieder <mwie...@ahsoftware.net> wrote: > > On 06/08/2016 07:40 PM, Jerry Jensen wrote: > >> The dictionary claims that it is legal syntax (in 7 and 8). The example >> therein shows that handler locals can be declared and assigned values at >> runtime using a do in a loop. I would never have thought of that! > > If you're referring to the dictionary example > > repeat with x=1 to 20 > do "local tVar_" & x & "; put empty into tVar_" & x > end repeat > > then that's two separate commands, which is different from > > local tVar3 = empty > > -- > Mark Wieder > ahsoftw...@gmail.com > > _______________________________________________ > 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 _______________________________________________ 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