NPR puzzle

Sarah Reichelt sarahr at genesearch.com.au
Thu Jul 21 23:57:52 EDT 2005


> However... you're pulling a fast one here. You're getting away with
> calling something a boolean when it actually isn't. Apparently
> Transcript is letting you get away with this.
>
> "if tSymbolArray[char 1 to 2 of tWord] then"    should really be
> "if tSymbolArray[char 1 to 2 of tWord] is not empty then"
>

Dick's solution set up the initial array by putting "true" into each  
element, so I think his syntax is perfectly correct :-)

>   repeat for each line tSymbol in field 2
>     put "true" into tSymbolArray[tSymbol]
>   end repeat

It was a great solution. I thought that putting the field data into  
variables first might speed things up, but it didn't, so the "repeat  
for each" loops must grab the complete set of data before they start.  
Very efficient.

Cheers,
Sarah




More information about the use-livecode mailing list