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

  • 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 225
202 Pascal 4.0 Users Guide
8
Type shortreal
You can return a shortreal function value between Pascal and FORTRAN.
Pass it exactly as in the previous example, with the Pascal shortreal type
matching the FORTRAN real type (without -xl).
Routines as Parameters
If the passed procedure is a top-level procedure, write it as follows:
The commands to compile and
execute RetReal.f and
RetRealmain.p
hostname% f77 -c RetReal.f
RetReal.f
retreal:
hostname% pc RetReal.o RetRealmain.p -lpfc -lF77
hostname% a.out
2.0 3.0
The FORTRAN subroutine,
PassProc.f
subroutine PassProc ( r, s, prcdr )
real r, s
external prcdr
call prcdr ( r, s )
return
end
Zobrazit stránku 225
1 2 ... 221 222 223 224 225 226 227 228 229 230 231 ... 332 333

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

Žádné komentáře