File input/output: Difference between revisions

m
→‎{{header|Ada}}: syntax highlighting
m (→‎{{header|Ada}}: syntax highlighting)
Line 7:
{{works with|GCC|4.1.2}}
The following example will work in most situations. If the file line size exceeds the size of the input string the output file will contain extra new-line characters.
<Ada>
with Ada.Text_IO; use Ada.Text_IO;
procedure File_IO is
Line 22 ⟶ 23:
Close (Output);
end File_IO;
</Ada>
The following example reads and writes each file one character at a time. There is no new-line issue.
<Ada>
with Ada.Sequential_Io;
Line 40 ⟶ 43:
Close(Outfile);
end File_IO;
</Ada>
 
=={{header|ALGOL 68}}==
Anonymous user