Returning the Keys

Marcus Lindley lindley8 at telus.net
Sun Dec 7 11:44:37 EST 2008


How do I put a lineOffset into an array and return them with other keys?

I've tried this:

function myFunction myVariable
    repeat for each line thisLine in myVariable
        put lineOffset(myline,myVariable) & return into myArray[linenumber] -- trying to return the lineOffset for the unique line in the text
        add 1 to myArray[thewords] -- returns the unique lines in the text
    end repeat
return the keys of myArray
end myFunction

I've tried several variations, but the only thing that is ever returned from the [lineNumber] key is "lineNumber" (in stead of,
for instance "line 4 of fld 22")

How do I return the lineOffset in this array properly?


More information about the use-livecode mailing list