home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 June
/
SIMTEL_0692.cdr
/
msdos
/
pascal
/
pascsrc.arc
/
BININ.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1988-01-15
|
671b
|
26 lines
(* 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 *)