On Sun, 16 Jan 2022, Jim Hall wrote:
I have a paper copy of a few original MS-DOS manuals. My MS-DOS 4
manual says the only separators allowed in a comment are whitespace
but didn't mention redirection. But the MS-DOS 5 manual specifically
says *not* to use redirection in REM.
So this was a known issue in MS-DOS. It was later fixed in the Windows
CMD prompt, but the feature exists in MS-DOS COMMAND. And I think it's
important to meet the features of MS-DOS.
And it's a weird one, because one would think that REM would ignore
the *rest* of the line, like any comment. And that was probably the
intent, but that's not how it was implemented. Instead, you get MS-DOS
behavior like this:
REM > file.txt
..and then you get a zero-length FILE.TXT.
So I think the feature should stay as-is in FreeDOS. We implemented
this just like MS-DOS did. And that's good.
(I quoted a scanned manual from PC DOS 2.00, which was the first version
that supported I/O redirection. This behavior was documented there as
well.)
-uso.
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel