How do I Create a Custom Property, part 19,214,651

Phil Davis davis.phil at comcast.net
Wed Apr 21 17:16:16 EDT 2004


> So your definition above is not quite true! It looks like what is
> counted is CRs + an implied CR is there isn't one at the end of the
> last line.

Bingo - I think you now have an all-inclusive definition of what constitutes
a "countable" line. It's a string of 1 or more chars which may or may not
end with a CR.

("Empty" lines come under this definition too, because in reality no line is
empty, even if it doesn't contain display chars - there must be at minimum a
single CR char for there to be an 'empty' line.)

However, CRs are always included in the 'number of characters' count.

Parallel observation:
The counting of lines (with CR as the lineDelimiter) and the counting of
items (with a comma itemDelimiter) work exactly the same regarding number of
things counted, whether or not the last one ends with a delimiter.


Phil


----- Original Message -----
From: "David Burgun" <dburgun at dsl.pipex.com>
To: "How to use Revolution" <use-revolution at lists.runrev.com>
Sent: Wednesday, April 21, 2004 12:59 PM
Subject: Re: How do I Create a Custom Property, part 19,214,651


> >In my simplistic view of things, here's how I make sense of your
experience:
> >
> >- "the number of lines" returns the number of CR chars found in your
target
> >data.
> >
> >- the CR char was designed to do one thing: to end the current line,
causing
> >what follows it to be in a new line. If it exists in the middle of the
data,
> >a new line of data comes after it; if it's at the end of the data, it is
the
> >last char of the last line. No new line is created EVEN THOUGH its
> >field-display characteristic (hard-wrapping) remains the same.
> >
> >HTH
> >Phil Davis
>
> Well it does make it a bit clearer as to the intention of the CR, but
> figure this one! If you have (one) line that does not contain a CR at
> the end, then the line count is returned as 1!
>
> If you have a return followed by a line of data that does not have a
> CR at the end, then the line count is returned as 2!
>
> So your definition above is not quite true! It looks like what is
> counted is CRs + an implied CR is there isn't one at the end of the
> last line.
>
> Cheers
> Dave
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution



More information about the use-livecode mailing list