Text files driving me mad

Dar Scott dsc at swcp.com
Thu Jun 13 11:05:52 CDT 2002

On Thursday, June 13, 2002, at 09:06 AM, Troy Rollins wrote:

> On Thursday, June 13, 2002, at 10:56  AM, Ben Rubinstein wrote:
>>>> I found it slightly confusing that CR (return) and linefeed are
>>>> both ASCII 10,
>>> I find it irritating.
>> This was the first message I posted when I bought MetaCard.  I 
>> was told that
>> SuperCard had introduced this error, and MetaCard was maintaining
>> compatibility.  I still think it's mad.
> It is insane, and has caused us to create a bunch of workarounds, 
> none of which are what we want to do. Unless I'm missing something 
> about the way the language "wants" to work, it is particularly 
> difficult to make sense of certain data streams coming in on a 
> serial port because of it.

My complaint was only because of the name, something I can learn to 
live with.

I think the uniform internal handling of lines is a good thing.  I 
think that converting back and forth between internal and host is 
good.  But!  But we have to assume that something can go wrong.  
Because of this a binary option should always be available.  Some 
folks might want to always go binary and handle the conversion 
themselves.  I think binary is available on all file I/O and is 
required for TCP/IP, but it is missing in open process.  It might 
be missing in other places, too.

For serial, I read until empty, which means in that context, "give 
me all in your buffer".  I read binary, so I accumulate and process 
that.  Depending on the protocol, I use a regEX to pull off the 
message (such as a line) from (near) the front and stuff the rest 
back into my buffer.  It handles extra chars, too.  The message is 
sent on.

What could be a good name for ASCII 13 in Revolution?  Besides 
numToChar(13), I mean.

Dar Scott

More information about the use-livecode mailing list