Another scary bug??

Bob Sneidar bobsneidar at iotecdigital.com
Wed Sep 7 13:19:38 EDT 2016


Can someone please explain to me how the following code can produce 0 in tSiteItem? 

on mouseUp
   set the itemDelimiter to "|"
   set wholeMatches to true
   put "|6|" into tITIDList
   put "6" into tSiteID
   put itemOffset(tSiteID, tITIDList) into tSiteItem
   breakpoint
end mouseUp

But this code produces 2?

on mouseUp
   set the itemDelimiter to "|"
   set wholeMatches to true
   put "1|6|3" into tITIDList
   put "6" into tSiteID
   put itemOffset(tSiteID, tITIDList) into tSiteItem
   breakpoint
end mouseUp

Seems that if the first item of a list is empty, itemOffset (and perhaps other offset functions) breaks. 

Bob S



More information about the use-livecode mailing list