From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,965ec819ff0a0ec8,start X-Google-Attributes: gid103376,public From: Matthew Heaney Subject: Re: Help regarding Help File Date: 1998/05/27 Message-ID: #1/1 X-Deja-AN: 357209162 References: <356cec31.0@cactus> Organization: Network Intensive Newsgroups: comp.lang.ada Date: 1998-05-27T00:00:00+00:00 List-Id: "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;