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

 
Output of file : READINTS.PAS contained in archive : PASTUT.ZIP
(* Chapter 11 - Program 4 *)
program Read_Integers_From_File;

var Cupcake : text;
Index : byte;
Var1,Var2,Var3,Var4,Var5 : integer;

begin
Assign(Cupcake,'INTDATA.TXT');
Reset(Cupcake);

for Index := 1 to 5 do begin
Read(Cupcake,Var1,Var2,Var3);
Writeln(Var1:6,Var2:6,Var3:6);
end;

Reset(Cupcake);
Writeln;
for Index := 1 to 5 do begin
Readln(Cupcake,Var1,Var2,Var3);
Writeln(Var1:6,Var2:6,Var3:6);
end;

Reset(Cupcake);
Writeln;
for Index := 1 to 5 do begin
Read(Cupcake,Var1,Var2,Var3,Var4,Var5);
Writeln(Var1:6,Var2:6,Var3:6,Var4:6,Var5:6);
end;

Reset(Cupcake);
Writeln;
for Index := 1 to 5 do begin
Readln(Cupcake,Var1,Var2,Var3,Var4,Var5);
Writeln(Var1:6,Var2:6,Var3:6,Var4:6,Var5:6);
end;
Close(Cupcake);
end. (* of main program *)




{ Result of execution (This data is read from INTDATA.TXT)

101 102 103
104 105 106
107 108 109
110 111 112
113 114 115

101 102 103
105 106 107
109 110 111
113 114 115
117 118 119

101 102 103 104 105
106 107 108 109 110
111 112 113 114 115
116 117 118 119 120
121 122 123 124 125

101 102 103 104 105
109 110 111 112 113
117 118 119 120 121
125 126 127 128 129
133 134 135 136 137

}


  3 Responses to “Category : Pascal Source Code
Archive   : PASTUT.ZIP
Filename : READINTS.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/