Accessing the last item in a line
Jim Ault
jimaultwins at yahoo.com
Mon Aug 22 00:10:02 EDT 2011
Yes, this is expected behavior.
If the last item or line delimiter is the delimiter char, then there is no 'last item as empty'
You could do a simple modification
put the last item of (myItemList & the itemDel) into theLogicalLastItem
Jim Ault
Las Vegas
--- On Sun, 8/21/11, Pete <pete at mollysrevenge.com> wrote:
From: Pete <pete at mollysrevenge.com>
Subject: Accessing the last item in a line
To: "How to use LiveCode" <use-livecode at lists.runrev.com>
Date: Sunday, August 21, 2011, 2:50 PM
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