The FORTRAN–Pascal Interface
199
8
The Pascal main program,
SimValmain.p
program SimVal(output);
var
t: boolean := true;
f: boolean := false;
c: char := 'z';
i: integer := 9;
r: real := 9.9;
s: integer16 := 9;
args: integer;
procedure simval(t, f: boolean; c: char; i: integer;
r: real; s: integer16; var reply: integer);
external fortran;
begin
simval(t, f, c, i, r, s, args);
writeln('args=', args: 6 oct, ' (If nth digit=1, arg n OK.)')
end. { SimVal }
The commands to compile and
execute
SimVal.f
and
SimValmain.p
hostname% f77 -c SimVal.f
SimVal.f:
simval:
hostname% pc SimVal.o SimValmain.p -lpfc -lF77
hostname% a.out
args=111111 (If nth digit=1, arg n OK.)
Содержание SunSoft Pascal 4.0
Страница 14: ...xiv Pascal 4 0 User s Guide ...
Страница 16: ...xvi Pascal 4 0 User s Guide ...
Страница 30: ...6 Pascal 4 0 User s Guide 1 ...
Страница 160: ...136 Pascal 4 0 User s Guide 6 ...
Страница 268: ...244 Pascal 4 0 User s Guide 11 ...
Страница 320: ...296 Pascal 4 0 User s Guide B ...
Страница 331: ...Index 307 ...
Страница 333: ......