6

The Pascal main program, SimRefMain.p

The commands to compile and execute SimRef.c and

SimRefMain.p

program SimRefMain(output); var

t, f: boolean;

c: char;

si: integer16;

i:integer;

sr: shortreal;

r:real;

procedure SimRef(

var t, f: boolean;

var c: char;

var si: integer16;

var i: integer;

var sr: shortreal;

var r: real); external c;

begin

SimRef(t, f, c, si, i, sr, r);

writeln(t, f: 6, c: 2, si: 2, i: 2, sr :4:1, r :4:1); end. { SimRefMain }

hostname% cc -c SimRef.c hostname% pc SimRef.o SimRefMain.p hostname% a.out

true false z 9 9 9.9 9.9

Strings of Characters

The alfa and string types pass simply; varying strings are more complicated. All pass by reference.

118

Pascal 4.0 User’s Guide

Page 142
Image 142
HP SunSoft Pascal 4.0 manual Strings of Characters, 118