text in fields (CR/LF, CR, LF) which is correct?
Dar Scott
dsc at swcp.com
Fri Aug 30 09:18:01 EDT 2002
On Friday, August 30, 2002, at 06:28 AM, Kee Nethery wrote:
>> So much confusion surrounds the misnamed constants "return" and
>> "cr", which
>> suggest ASCII 13 but are actually ASCII 10. I understand that
>> it's there
>> for compatibility with Mac-specific tools like HC, but it does create
>> confusion (hence this oft-repeated thread).
>
> might be better to create a new constant called "LineEnd" that is
> platform specific. Return and CR should mean "carriage Return"
> which should be ascii(13). Pretty much every ASCII table I've ever
> seen labels "CR" as ASCII(13).
I would prefer a new constant named lineEnd that is _Revolution_
specific. This would allow the same stack to move across platforms
without line end changes. For backwards compatibility, it should
be ASCII 10. Maybe there can be a short name, but line and end are
already taken.
With that, new constants asciiCR, asciiLF, and asciiCRLF are also
defined.
With the above, use of return and CR can be discouraged. And
lineFeed and CRLF need not be used.
However, I've seen examples from old timers on the list that
include return quite a bit. I find that jarring and sometimes
confusing. Yet, others might find it quite natural.
Dar Scott
More information about the use-livecode
mailing list