Dinamyc variables.

Klaus major-k klaus at major-k.de
Mon Mar 19 08:30:43 EDT 2018


Hola Heriberto,

> Am 19.03.2018 um 03:08 schrieb Heriberto Torrado via use-livecode <use-livecode at lists.runrev.com>:
> 
> Dear Livecode programmers,
> 
> I am trying to create a new variable with the name of a dynamically generated card.
> Please note that I would like to create a new variable, not to put the name of the card inside the variable.
> I would like to have something like this (PseudoCode)
> "Get the name of this card and create a variable with the name of the card."
> I searched the forum and the dictionary but I cannot find how to do that.

this is a case for DO! :-)

...
put the short name of this cd into tCardName
do ("put empty into " & tCardName)
...
Et voila, an empty variable with the name of your card.

If you need to create MORE than one variable from strings, just create an array with the string(s) as keys.
...
put the short name of this cd into tCardName
put empty into tArray[tCardName]
...

> Best regards/ Saludos cordiales/ Cordialement
> 
> Heriberto Torrado

Best

Klaus

--
Klaus Major
http://www.major-k.de
klaus at major-k.de





More information about the use-livecode mailing list