is the value of CR really platform dependant?

Richard Gaskin ambassador at
Fri Aug 30 15:48:00 EDT 2002

Kee Nethery wrote:

>> The following is true on all platforms:
>> You can read as text or binary.  Text mode converts line endings, binary
>> leaves everything as it is natively.
>> As text:
>> open file tMyFile for read
>> - OR -
>> open file tMyFile for text read
>> - OR -
>> put url ("file:"&tMyFile) into tMyData
>> As binary:
>> open file tMyFile for binary read
>> - OR -
>> put url ("binfile:"&tMyFile) into tMyData
>> If you read in text mode, the line endings are handled for you automatically
>> on all platforms.
>> The reverse is also true: when writing to a file, text mode changes line
>> endings to whatever form is customary on the machine it's being run on.
> But I'm not reading text files, I'm getting data via a network
> connection

How?  Using which syntax?

>  and I need to manually alter the line endings to display
> correctly within Revolution text fields.
> Is CR a real constant that varies by platform...

No, rather the opposite.  "cr" and "return" always denote ASCII 10.  That
should be the only confusing part.

What determines which line endings are in data depends on how it's read and
where's it's coming from.  Share that and we can solve the mystery.

 Richard Gaskin 
 Fourth World Media Corporation
 Custom Software and Web Development for All Major Platforms
 Developer of WebMerge 2.0: Publish any database on any site
 Ambassador at
 Tel: 323-225-3717                       AIM: FourthWorldInc

More information about the Use-livecode mailing list