Yep, a delimiter should be a delimiter even if it delimits null. On Wed, Nov 3, 2010 at 8:32 AM, Jonathan Lynch <[email protected]>wrote:
> Hi Alex, > > I am starting to agree with you that some of this becomes counterintuitive. > Not hard to work around, but potentially confusing to a newcomer. > > I am in the habit of fastidiously making sure that my lists do not have a > trailing delimiter, so I have not been plagued by this too much. > > "a,b,,," should say that it contains five items (two characters and three > empty items). If it does not, that is confusing. > > On Wed, Nov 3, 2010 at 10:25 AM, Alex Tweedly <[email protected]> wrote: > > > 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 > > > > > > -- > Do all things with love > _______________________________________________ > 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
