delete chunk.

Jeffrey Massung massung at gmail.com
Wed Nov 3 00:51:11 EDT 2010


On Nov 2, 2010, at 10:44 PM, J. Landman Gay wrote:

> On 11/2/10 11:41 PM, J. Landman Gay wrote:
>> On 11/2/10 10:40 PM, Jim Ault wrote:
>>> Also try
>>> 
>>> put the number of items in "a,b,c" \
>>> && the number of items in "a,b," \
>>> && the number of items in "a,b"
>> 
>> Right. You can't have an empty last item, and if you try, the last
>> delimiter is removed. There's a comment about it in the dictionary under
>> "item".
>> 
> 
> Meant to add: this is also consistent with the number of lines, where a trailing cr doesn't count either.


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.

Jeff M.


More information about the use-livecode mailing list