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

 
Output of file : ARRAYS.PAS contained in archive : PASTUT.ZIP
(* Chapter 6 - Program 1 *)
program Simple_Arrays;

var Count,Index : integer;
Automobiles : array[1..12] of integer;

begin
for Index := 1 to 12 do
Automobiles[Index] := Index + 10;
Writeln('This is the first program with an array');
Writeln;
for Index := 1 to 12 do
Writeln('automobile number',Index:3,' has the value',
Automobiles[Index]:4);
Writeln;
Writeln('End of program');
end.




{ Result of execution

This is the first program with an array

automobile number 1 has the value 11
automobile number 2 has the value 12
automobile number 3 has the value 13
automobile number 4 has the value 14
automobile number 5 has the value 15
automobile number 6 has the value 16
automobile number 7 has the value 17
automobile number 8 has the value 18
automobile number 9 has the value 19
automobile number 10 has the value 20
automobile number 11 has the value 21

automobile number 12 has the value 22

End of program

}

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