*/
If you have a PH account, you can customize your PH profile.
*/

View \BININ.PAS

This is the second disk of the PASCAL TUTOR system. It has the

Submitted By: WEBMASTER
Rating: (Not rated) (Rate It)


(* Chapter 11 - Program 7 *)
program Binary_Input;

type Input_Record = record
       Number : integer;
       Amount : real;
       Name   : string[30];
     end;

var Input_File : file of Input_Record;
    Bird_Food  : array[1..20] of Input_Record;
    Index      : byte;

begin  (* main program *)
   Assign(Input_File,'KIBBLES.BIT');
   Reset(Input_File);

   for Index := 1 to 20 do
      if not Eof(Input_File) then
         Read(Input_File,Bird_Food[Index]);
   Close(Input_File);

   Writeln(Bird_Food[6].Number:6,Bird_Food[20].Amount:13:5,
           '  ',Bird_Food[1].Name);
end(* of main program *)

corner
© 1996-2008 CommunityHeaven LLC. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
North American business development: Nicolai Wadstrom. Publisher: Lars Hagelin.