[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: io:lines() and \0
- From: Francisco Olarte <folarte@...>
- Date: Tue, 18 Feb 2014 19:50:57 +0100
Hi:
On Tue, Feb 18, 2014 at 7:35 PM, Tim Hill <drtimhill@gmail.com> wrote:
> Is anyone else uneasy about that "no new-line character is immediately preceded by space characters" bit? I take this to mean trailing space in lines may give unpredictable results in ANSI C, which is pretty eye-brow raising to me.
> If this is true, this reads like the ANSI committee bending the standard to meet a (buggy) implementation, as they did with realloc() and a few others.
I think they put it there to be able to cover every strange OS out
there. Some of them use fixed record length files, space padded, for
text ( I used one of them, it did that for hollerith punch cards
compatibility ). OS have evolved a lot, and become more uniform, but I
don not want to think which kind of things the IBM mainframes with
their backward compatibility are supporting. You are not likely to
find many implementation where the space stuff matters, but if you
meet one you maybe lucky to be able to have thar thing on the
implementation.
Francisco Olarte.