Accessing the last item in a line

Mark Schonewille m.schonewille at economy-x-talk.com
Sun Aug 21 18:31:47 EDT 2011


Yes, this is expected behaviour. If you want to count the last item if it is empty use

Item (number of items of (myVar & "x")) of myVar

--
Kind regards,

Mark Schonewille
Economy-x-Talk
Http://economy-x-talk.com

Share the clipboard of your computer over a local network with Clipboard Link http://clipboardlink.economy-x-talk.com


Op 21 aug. 2011 om 23:50 heeft Pete <pete at mollysrevenge.com> het volgende geschreven:

> It seems that if the last item in a string is empty, then trying to access
> it by using "item -1" returns the penultimate item, not the last one.  For
> example, given the string "a,b,"  item -1 of that string comes back as "b".
> This is on LC 4.6.2, OS X 10.6.8.  Is this expected behavior?
> 
> Pete
> Molly's Revenge <http://www.mollysrevenge.com>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the Use-livecode mailing list