HP SunSoft Pascal 4.0 Instrukcja Użytkownika Strona 226

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 333
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 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
Przeglądanie stron 225
1 2 ... 221 222 223 224 225 226 227 228 229 230 231 ... 332 333

Komentarze do niniejszej Instrukcji

Brak uwag