HP SunSoft Pascal 4.0 Manual do Utilizador Página 197

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 333
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 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 página 196
1 2 ... 192 193 194 195 196 197 198 199 200 201 202 ... 332 333

Comentários a estes Manuais

Sem comentários