* Re: Help regarding Help File
1998-05-28 0:00 Help regarding Help File rvr@Networx.net.au
@ 1998-05-27 0:00 ` Matthew Heaney
0 siblings, 0 replies; 2+ messages in thread
From: Matthew Heaney @ 1998-05-27 0:00 UTC (permalink / raw)
"rvr@Networx.net.au" (Bexley) writes:
> procedure Help is
> Help_char:character ;
> begin
> Open(Help_File,In_File,"tax.hlp");
> while not End_Of_File (Help_File) loop
> Get(Help_File,Help_Char);
> Put(Help_Char);
> end loop; --end_of_file loop
> Close(Help_File);
> end Help;
>
> the problem is that this code isn't moving to the next line when the text in
> the file is..
The problem is that Get (F, C) silently consumes the end-of-line
terminator. One solution is to just read in a line, and output a
terminator yourself, ie
procedure Help is
Line : String (1 .. 80);
Last : Natural;
begin
while not End_Of_File (F) loop
loop
Get_Line (F, Line, Last);
Put (Line (1 .. Last));
exit when Last < Line'Last;
end loop;
New_Line;
end loop;
end Help;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Help regarding Help File
@ 1998-05-28 0:00 rvr@Networx.net.au
1998-05-27 0:00 ` Matthew Heaney
0 siblings, 1 reply; 2+ messages in thread
From: rvr@Networx.net.au @ 1998-05-28 0:00 UTC (permalink / raw)
Howdie
I'm writing a program that needs to read in from a file, one full page of help
at the moment it looks like this:
procedure Help is
Help_char:character ;
begin
Open(Help_File,In_File,"tax.hlp");
while not End_Of_File (Help_File) loop
Get(Help_File,Help_Char);
Put(Help_Char);
end loop; --end_of_file loop
Close(Help_File);
end Help;
the problem is that this code isn't moving to the next line when the text in
the file is..
The result is a page of information being squashed into only a few lines
any Idea's would be apreciated
thanx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1998-05-28 0:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-05-28 0:00 Help regarding Help File rvr@Networx.net.au
1998-05-27 0:00 ` Matthew Heaney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox