Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
HIDEPROC.PAS
◄Example► ◄Contents► ◄Index► ◄Back►
PROGRAM hideproc;
{ HIDEPROC.PAS : Demonstrates procedure nesting.}
VAR
globl : Integer;
PROCEDURE proc( p_parm : Integer );
VAR
p_locl : Integer;
PROCEDURE hidden( hidn_parm : Integer );
VAR
hidn_locl : Integer;
BEGIN
Writeln( 'Hidden can see: globl, p_parm, ' +
'p_locl, hidn_parm, hidn_locl' );
END; { Hidden procedure }
BEGIN
Writeln( 'Proc can see: globl, p_parm, p_locl' );
hidden( 44 ); { Pass argument to hidden }
END; { proc }
BEGIN
Writeln( 'Main program can see: globl' );
proc( 99 ); { Pass argument to proc }
END.