Variable question

Brian Yennie briany at qldlearning.com
Wed Apr 27 20:48:14 EDT 2005


Tom,

> Is it OK to ask    " if item 1 is not among the lines of lSeq "     
> even though this is the first instance of lSeq?

It should be, yes. It will just be FALSE, since lSeq is empty.

> The local lSeq is new the first time around and I don't know if it is 
> "" or empty or what BUT the 'Put' line seems to put item 1 of d & cr 
> in the first line.

"" and empty are the same -- the latter is just a constant name which 
represents the former.

> repeat for each line d in gInitialList -- we build list of available 
> icons
>     if d is not "" then
>       if item 1 of d is not among the lines of lSeq then -- store 
> avail keys in lSeq
>         put item 1 of d & cr after lSeq -- empty first time around 
> check
>       end if
>     end if
> end repeat

This looks ok to me, and should generate a list of unique, non-empty 
lines from gInitialList.
You may want to clean up the trailing return when you are done:

delete last char of lSeq

HTH

Brian



More information about the use-livecode mailing list