Closer, but again you're assembling things on the fly.  However, it's hard 
for me to suggest anything further because I don't know what problem you're 
trying to solve - I don't mean the problem of concatenating, I mean the 
original problem of keeping track of multiple things.  If you have a 
subject, for instance, and a flag to indicate expanded or not, you could do 
it the way you indicate below.  Or you could have two lists:

expandedList =[#English: 151, #Math: 252]
regularList =[#English:101, #Math: 202]

Then if the expanded flag is set, take it from the expanded list, or if the 
flag is not set, take it from the regular list.  I'm just speculating here, 
not knowing what you're trying to find a solution for, so this may not even 
be remotely close to what you need.

In general, two things to remember are:
1) STRING OPERATIONS ARE SLOW
2) PARSING IS SLOW

If you only do them occasionally, it's not a big deal, but if you do a lot 
of these things a second, it can start to take its toll.  The more you work 
with symbols and numbers and lists, the better you'll be than if you work 
with strings.

- Tab

At 10:42 AM 5/24/01 -0400, Bill Numerick wrote:
>Hi Tab,
>
>I posted the question in the first place so i guess i should explain :).
>I'm not neccasarily in a paticular need of it. I was wondering if you 
>could do it as I could very well use it in the near future, it seems that 
>it could be useful.  I think I see how you can achieve the same result 
>with lists.
>Basically it would be like:
>
>-- List of icon id's
>gIconIdList = [#English_expanded : "1", #Math_expanded : "2"]
>
>set subject = "English"
>set status = "expanded"
>
>getProp(gIconIdList, subject & "_" & status)
>
>That what you were talking about?
>
>Thanks for everyones input on this
>
>- Bill
>
>>Over the years, there have been many requests to do "variable variables",
>>that is, to construct a variable name on the fly.
>>
>>Invariably, the person asking the question is taking the seemingly obvious
>>solution to a problem, but usually what really signals is that it is time
>>to start learning about lists.  I don't know what they're trying to do in
>>this particular case, but lists (and property lists) are suited for exactly
>>this sort of thing, with only a fraction of the overhead of recompositing
>>strings and doing on-the-fly parsing of commands.
>>
>>- Tab
>
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>
>[To remove yourself from this list, or to change to digest mode, go to
>http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
>email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
>Lingo-L is for learning and helping with programming Lingo.  Thanks!]
>


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to