Category : Pascal Source Code
Archive   : PASTUT.ZIP
Filename : BININ.PAS

 
Output of file : BININ.PAS contained in archive : PASTUT.ZIP
(* 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 *)




{ Result of execution

6 12345.67890 Large size Kibbles & Bits

}


  3 Responses to “Category : Pascal Source Code
Archive   : PASTUT.ZIP
Filename : BININ.PAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/