[GAP] LF to CR-LF
Daniel Lewandowski
daniellewandowski at tlen.pl
Mon Aug 28 12:33:48 CEST 2006
I've found that Ada.Text_IO has a strange behaviour. For this code:
with Ada.Characters.Latin_1; use Ada.Characters;
with Text_IO; use Text_IO;
procedure S is
File : File_Type;
Line : constant String := "ala ma" & Latin_1.Lf & " kota";
begin
Create (File => File, Name => "out.txt", Mode => Out_File);
Put_Line (File => File, Item => Line);
Close (File => File);
end S;
I have in the file out.txt combination CR-LF instead of LF in the middle
of printed line. At the end of the line I have of course CR-LF and this
is a normal behaviour in Windows/DOS environment.
Why is Text_IO changing LF into CR-LF in the middle of string?
Regards,
Daniel Lewandowski
More information about the GAP
mailing list