Dinamyc variables.

Phil Davis revdev at pdslabs.net
Mon Mar 19 18:06:01 CET 2018


On 3/19/18 9:29 AM, Mike Bonner via use-livecode wrote:
> Use an array instead...
> put empty into tCardArrayA[the short name of this card]
> Newly created cards where you don't specify the card name on creation, will
> have a card name set to the id of the card. (like "card id 1002")

And the array approach allows the card names to contain spaces (consist 
of multiple words), where the "do" approach does not.

Phil Davis

>
> On Mon, Mar 19, 2018 at 9:43 AM, Bob Sneidar via use-livecode <
> use-livecode at lists.runrev.com> wrote:
>
>> This is what Macro Substitution was created for, but LC doesn't have that
>> function. Say you have an accounting app where you can load different
>> companies. The names of the tables and support files on disk are serialized
>> with a 2 digit number representing the company number. In Foxpro when you
>> load a new company, you *could* reference the files using macro
>> substitution:
>>
>> open file &tCompanyPath&tModule&tCompanynum
>>
>> Of course there are ways around this. Someone pointed out using an array,
>> which is a variable containing other variables in essence.
>>
>>> On Mar 18, 2018, at 19:08 , Heriberto Torrado via use-livecode <
>> use-livecode at lists.runrev.com> wrote:
>>> [This message was identified as a phishing scam. Learn about phishing at
>> http://aka.ms/LearnAboutPhishing]
>>> 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.
>>>
>>> Best regards/ Saludos cordiales/ Cordialement
>>>
>>> Heriberto Torrado
>>> ​Chief Technology Officer (CTO)
>>> ​Director de informática
>>> Directeur informatique
>>>
>>> *NetDreams S.C.*
>>> http://www.networkdreams.net
>>>
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at 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 at 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 at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

-- 
Phil Davis




More information about the use-livecode mailing list