I agree it would be great to be able to say
   set the payAttentionToTrailingDelimiters to true

But in the meantime you can use the fact that doubling a trailing delimiter will be ignored.
repeat for each line L in tData
   if the last item of (L & the itemDel) is empty then
      -- deal with an empty one
   else
      -- use "the last item of L" which is not empty
   end if

-- Alex.

On 03/11/2010 12:52, Ken Ray wrote:
Just tossing this out there, but I *love* this behavior. I'm sure there are
situations where it's undesirable, but are easily compensated for by just
adding another delimiter.

Begin able to do the following is very handy and makes the code clean:

put "foo"&  cr after fld "x"
put "bar"&  cr after fld "x"
put the number of lines of fld "x"

Having that return 2 is extremely convenient.
Agreed, but sometimes it's not convenient when you want to get the "last
item" of a line; for example, if you have a container that holds columns for
First Name (tab) Last Name (tab) Notes, and some lines have a note and some
don't, you can't just set the itemDelimiter to tab and run through the
container and get the "last item" or "item -1" of the line to check if the
person entered a note; if they didn't provide one, then check the "last
item" will give you their Last Name instead.

It would be great if there was a global setting that you could toggle it on
in these circumstances, something like:

put item -1 of "Ken,Ray,"
==>  returns "Ray"

set the dontIgnoreTrailingDelimiter to true
put item -1 of "Ken,Ray,"
==>  returns ""

:-)

Ken Ray
Sons of Thunder Software, Inc.
Email: [email protected]
Web Site: http://www.sonsothunder.com/


_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to