![](/images/backgrounds/286549/hp-sunsoft-pascal-4-0-users-manual-549395208x1.png)
8
The FORTRAN main program, PassPtrmain.f. In the FORTRAN main program, the name is converted to lowercase. Uppsercase is ignored.
program PassPtrmain
integer i double precision d
integer iptr, dptr pointer ( iPtr, i ), ( dPtr, d ) iPtr = malloc( 4 )
dPtr = malloc( 8 ) i = 0
d = 0.0
call PassPtr ( iPtr, dPtr ) write( *, "(i2, f4.1)" ) i, d stop
end
The commands to compile and execute PastPtr.p and
PassPtrmain.f
hostname% pc
hostname% f77 PassPtr.o PassPtrmain.f
MAIN passptrmain: hostname% a.out
9 9.9
Function Return Values
Function return values match types the same as with parameters, and they pass in much the same way. See “Procedure Calls:
184 | Pascal 4.0 User’s Guide |