The FORTRAN–Pascal Interface
173
8
Conformant Arrays
For conformant arrays, with single-dimension array, pass upper and lower
bounds, placed after the declared parameter list, as in:
Pascal passes the bounds by value, so FORTRAN must pass them by value,
too.
One bounds pair may apply to several arrays if they are declared in the same
parameter group:
Examples of single-dimension array and array of character conformant arrays
follow. Conformant arrays are included here only because they are a relatively
standard feature; there are usually more efficient and simpler ways to do that.
The commands to compile and
execute
UniVec.p
and
UniVecmain.f
hostname%
pc -c UniVec.p
hostname% f77 UniVec.o UniVecmain.f -lpfc -lpc
UniVecmain.f:
MAIN:
hostname% a.out
24
function ip(var x:array[lb..ub:integer] of real):real;
...
double precision v1(10)
double precision z
z = ip ( v1, %VAL(0), %VAL(9) )
...
function ip(var x,y:array[lb..ub:integer] of real):real;
...
double precision v1(10), v2(10)
double precision z
z = ip ( v1, v2, %VAL(0), %VAL(9) )
...
Содержание 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: ......