Problem creating set of variables

Jim Ault JimAultWins at yahoo.com
Fri Dec 1 12:36:37 EST 2006


On 12/1/06 6:16 AM, "Thierry" <thierry.olive at univ-poitiers.fr> wrote:
> I submit you a strange problem I'm encountering. I want to create
> local variables with the following script:
> 
> repeat with x = 1 to 3
>      put empty into ("Myvar" & x)
> end repeat 
> 
> Surprisingly, this does not work. In fact it opens the Error window
> which indicates:
> 
> Type Chunck: bad destination
> Object button
> line  put empty into ("Myvar" & x)
> hint  (
> 
> Has someone an idea of what is happening?

I think you are correlating

put empty into fld ("myName" & x)
--to--
put empty into ("myVar" & x)

In both cases, Rev resolves the parens to a string, thus the second one does
not make sense.

Jim Ault
Las Vegas





More information about the Use-livecode mailing list