HP SunSoft Pascal 4.0 Manual de usuario Pagina 197

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 333
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 196
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) )
...
Vista de pagina 196
1 2 ... 192 193 194 195 196 197 198 199 200 201 202 ... 332 333

Comentarios a estos manuales

Sin comentarios