[fpc-pascal]CR / CRLF problem when redirecting to file
James Mills
prologic at daisy.ods.org
Mon Sep 15 03:26:40 CEST 2003
On Sun, Sep 14, 2003 at 05:57:57PM +0200, Jonas Maebe wrote:
>
> On zondag, sep 14, 2003, at 17:48 Europe/Brussels, John Coppens wrote:
>
> >In Linux, when redirecting FPC output to a file, I found that after 25
> >lines, CR characters are being added, as if in DOS:
> >
> >program TestCR;
> >uses
> > CRT;
>
> That's because you are using the crt unit. The crt unit is only meant
> for screen display, it has to use all sorts of tricks on a *nix console
> (setting it to raw mode, for instance). That's why you get garbage if
> you redirect it to a file.
In some of my programs I do NOT use the CRT unit but a similar thing
happens. Go figure :)
cheers
James
--
-
-Zero Defect Software Engineers Group - ZDSEG
-
-You need only two tools. WD-40 and duct tape.
-If it doesn't move and it should, use WD-40.
-If it moves and shouldn't, use the tape.
More information about the fpc-pascal
mailing list