A

The module unit, include_mod.p

The include file, include.h

The commands to compile and execute ext_prog.p and ext_mod.p

module include_mod;

define

global, proc;

%include 'extern.h';

procedure proc;

begin

writeln('From PROC: ',global); global := global + 1;

end; { proc }

var

global : integer;

procedure proc; extern;

hostname% pc -xl include_prog.p include_mod.p include_prog.p:

include_mod.p: Linking: hostname% a.out

From MAIN, before PROC:1

From

PROC

: 1

From

MAIN,

after PROC:2

The %list Directive

The %list directive enables a listing of the program.

Syntax

%list;

260

Pascal 4.0 User’s Guide

Page 284
Image 284
HP SunSoft Pascal 4.0 manual list Directive, Module unit, includemod.p, 260