Set Variable or CustomProperty Names with and expression

Mark Schonewille m.schonewille at economy-x-talk.com
Wed Aug 12 08:28:11 CEST 2015


Use arrays:

put x into myArray["set"]["life"]

Arrays may be a little slow, but creating variables on the fly will be 
slow too.

If speed really is an issue, please post a sample of your source data 
and the desired output.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Installer Maker for LiveCode:
http://qery.us/468

Buy my new book "Programming LiveCode for the Real Beginner" 
http://qery.us/3fi

LiveCode on Facebook:
https://www.facebook.com/groups/runrev/

On 8/12/2015 06:43, Brahmanathaswami wrote:
> I want to move data from one variable to several others by parsing one
> and passing them to another (s)
>
> In this scenario... the variable I want to pass them to needs to be
> named according to one of the search items
>
> like this:
>
> where I want variable based on category names like:
>
> lifeset
> godset
> meditation set
>
> etc.
>
> categories are  e.g.
>
> life,god,meditation
>
> -----------
> repeat for each line x in gAllQuotes
>
>        repeat for each item y in tCategories
>           if item 6 of x contains y then
>              put x & cr & "|" after ("t" &y&"set")
>        end repeat
>     end repeat
>
> set the uLifeSet of this stack to tlifeset
>
> -------------------
>
> But apparently this is illegal... a variable name cannot be the result
> of an expression.
>
> I suppose I should think about using arrays, but this is a very small
> amount of text data (less than 200K of line/tab delimited data) and I
> never found the processing time for just parsing delimited text to be
> that serious an issue...
>
> Any clues? I'll sleep on this...perhaps get an answer in a dream tonite.
>
> If not, I'll be looking for one here
>
> BR
>
> _______________________________________________
> 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
>



More information about the use-livecode mailing list