HP SunSoft Pascal 4.0 Uživatelský manuál Strana 191

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 333
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 190
The FORTRAN–Pascal Interface 167
8
Pascal Set Types
In Pascal, a set type is implemented as a bit vector, which is similar to a
FORTRAN 16-bit word. Direct access to individual elements of a set is highly
machine-dependent and should be avoided.
Multidimensional Arrays
Pascal multidimension arrays are incompatible with FORTRAN multi-
dimension arrays. Since Pascal arrays use row-major indexing, and FORTRAN
arrays use column-major indexing, an array passed in either direction appears
to be transposed.
General Parameter-Passing in FORTRAN and Pascal
A few general rules apply to passing parameters:
By default, FORTRAN passes all parameters by reference.
In FORTRAN, if you want to pass anything by value, then you must
explicitly use the nonstandard function %VAL().
Pascal passes all parameters by value unless you explicitly state that they
are var, out, or in out parameters, in which case they are passed by
reference.
The routine options nonpascal, extern fortran, and external
fortran pass by reference.
Zobrazit stránku 190
1 2 ... 186 187 188 189 190 191 192 193 194 195 196 ... 332 333

Komentáře k této Příručce

Žádné komentáře