home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programming
/
powerprogramming1994.iso
/
progtool
/
pascal
/
pascsrc.arc
/
PROCED4.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1988-01-15
|
787b
|
26 lines
(* Chapter 5 - Program 4 *)
program Scope_Of_Variables;
var Count : integer;
Index : integer;
procedure Print_Some_Data;
var Count, More_Stuff : integer;
begin
Count := 7;
Writeln('In Print_Some_Data Count =',Count:5,
' Index =',Index:5);
end; (* of Print_Some_Data procedure *)
begin (* Main program *)
for Index := 1 to 3 do begin
Count := Index;
Writeln('In main program Count =',Count:5,
' Index =',Index:5);
Print_Some_Data;
Writeln('In main program Count =',Count:5,
' Index =',Index:5);
Writeln;
end; (* Count loop *)
end. (* main program *)