Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2014-12

unit crt linux CR LF

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Rainer Stratmann

When using the crt unit the CR LF is not working properly as I understand.

Is it possible to change this behaviour?
So that the CR LF is working?
For examlpe when displaying file contents with linux command cat.

Reply by email

leledumbo
to Rainer Stratmann
When using the crt unit the CR LF is not working properly as I understand.

quite the opposite, crt makes CR LF works as intended per character (see last answer)

Is it possible to change this behaviour?

yes, don't use crt

So that the CR LF is working?

Back to first answer

For examlpe when displaying file contents with linux command cat.

Linux commands always output *nix newlines, which is only LF. CR is required to reset cursor position back to the first column. That's what I mean by "works as intended per character".

If you insist on using CRT, apply
http://www.freepascal.org/docs-html/rtl/sysutils/adjustlinebreaks.html to your strings before outputting.

View this message in context: http://free-pascal-general.1045716.n5.nabble.com/unit-crt-linux-CR-LF-tp5720659p5720661.html Sent from the Free Pascal - General mailing list .

Reply by email