> Peter B. wrote:
> > The Dictionary entry for 'local' has this Example: 
> >
> > -- To make a numbered list of variables: 
> > repeat with x=1 to 20 
> > do "local tVar_" & x & "; put empty into tVar_" & x 
> > end repeat 
> >
> > Which 'apparently' runs fine if you copy and paste it into the msg box. For 
> > the purposes of this discussion and so we can see what's going on I'm going 
> > to remix that to: 
> 
> Are there any problems that can be solved by generating variable names, that
> couldn't be solved equally well (and without using "do") using an array? 
> Peter 

Just now I can't think of an example for *generating* variable names only.
But there are very simple and important ones for *using* variable names:

local a1=1, a2=false
-- local a[1]=1, a[2]=false #<-- currently not allowed

For such default-constructs variable names and using "do" are really helpful.


_______________________________________________
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

Reply via email to