Roberto Mariottini escreveu:
Hi Arkady,
pressing ^Z
in non-empty line does nothing (except that line end is ignored),
only first
^Z on line is processed as end of input.
    Strange, but under MS-DOS I get same behavior. Another bug in MS-DOS?

I think this is the correct behaviour, IIRC in theory in text files an End-Of-File must always be preceeded by an End-Of-Line. So I think that a Ctrl-Z inside a line (so not immediately after a CR/LF) is interpreted as normal charcter input, with no special End-Of-File meaning.

The confusion is still big, as many sources contradict each other on what a
"text file" is, and implementations too.
For example, Pascal function Eoln is always true if Eof is true, even if
ther isn't actually a CR/LF before Ctrl-Z (IIRC).

Some very ols OS used ^Z do know the end of the stream and thus close the file. This behaciour can still be found in MS-DOS with the command:
copy con: >file
where ^Z terminates the input.


MS-DOS kernel completely ignores ^Z in any file. I know because of many problems in the past.

A CR/LF is not requited before thee ^Z, in any system, just that _usualy_ text files are have CR/LF after the last line. BUT for example some databese programs require a ^Z after the last record of a .DBF file, but other don't require it and some others don't even put it there. One of them (iirc dBaseII) has even a bug that a ^Z in any field sometimes causes the file to get truncated.

I hope this helps,
Alain



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel

Reply via email to