Arrays for lists with multiple lines where item 1 is the same on N number of lines

Kay C Lan lan.kc.macmail at gmail.com
Fri Apr 22 07:38:40 EDT 2016


I've just Flagged that reply. I should really print it off and mount it on
the wall - that's a very important list. I think I've fallen victim of
every single one of those and it's always been a complete hassle to track
down because it only ever breaks things once in a blue moon when it's also
pancake Tuesday. To ensure advance hair loss, spend 99% of your time with
the itemDel set to tab so you can't even see if there's a delimiter there
or not!

And of course those problems don't just apply to lists, you can repeat
those last 3 problems with lines (which I guess are just vertical lists).
In the msg box:

put "AAA" & cr & "BBB" into tStore
put empty into line 3 of tStore
put the number of lines of tStore into msg
put " expecting 3 with the 3rd line empty" after msg
put "AAA" & cr & "BBB" into tStore
put empty into line 2 of tStore
put cr & the number of lines of tStore after msg
put " expecting 2 with the 2nd line empty" after msg
put "AAA" & cr & cr & "BBB" into tStore
put cr & the number of lines of tStore after msg
put " expecting 3" after msg
delete line 3 of tStore
put cr & the number of lines of tStore after msg
put " expecting 2 because I had 3 lines and deleted the last one" after msg
put "AAA" & cr & cr & cr & "BBB" into tStore
put cr & the number of lines of tStore after msg
put " expecting 4" after msg
sort lines of tStore descending
put cr & the number of lines of tStore after msg
put " expecting 4 because I just sorted 4 lines" after msg



More information about the use-livecode mailing list