On Jan 17, 2013, at 12:49 PM, J. Landman Gay <jac...@hyperactivesw.com> wrote:

> On 1/17/13 12:28 PM, Robert Sneidar wrote:
>> 
>> It's my understanding that cr is just a cr regardless of platform. I
>> may have it backwards.
> 
> Yup, backwards. :) "Cr" and "return" are synonyms and produce the same thing, 
> which is ascii 11 (linefeed, the unix convention). There is no ascii 13 
> (carriage return) or Windows endings (CRLF) unless you put binary data into 
> the stack or script it using numToChar(13).
> 
> When importing text files, LiveCode translates all OS-native line endings to 
> ascii 11. When exporting to a text file, it translates all linefeeds back to 
> the native line endings.
> 
> Importing/exporting as binary doesn't translate line endings.

This is all important to remember if you are talking with a serial device or 
something else that expects real CR characters. I pulled some hair out learning 
that one. Luckily I have plenty spare.
.Jerry



_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to