[fpc-pascal] unit crt linux CR LF

leledumbo leledumbo_cool at yahoo.co.id
Tue Dec 23 02:04:47 CET 2014

> 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 archive at Nabble.com.

More information about the fpc-pascal mailing list