HP Pascal/iX Programmer's Guide (31502-90023)

9- 11
| Pointer | Not available |
| | |
-------------------------------------------------------------------------------
| | |
| Procedure | Subroutine3 |
| | |
-------------------------------------------------------------------------------
| | |
| Procedure parameter or variable | Not available |
| | |
-------------------------------------------------------------------------------
| | |
| Real | REAL or REAL*4 |
| | |
-------------------------------------------------------------------------------
| | |
| Record | Build equivalent record |
| | |
-------------------------------------------------------------------------------
| | |
| Set | Not available |
| | |
-------------------------------------------------------------------------------
| | |
| Shortint | INTEGER*2 |
| | |
-------------------------------------------------------------------------------
| | |
| String | CHARACTER*(*)2 |
| | |
-------------------------------------------------------------------------------
| | |
| String[
n
] | CHARACTER*(*)2 |
| | |
-------------------------------------------------------------------------------
| | |
| VAR parameter | Default parameter mechanism |
| | |
-------------------------------------------------------------------------------
| | |
| RECORD | COMPLEX |
| real_part : real ; | |
| imaginary_part : real ; | |
| END ; | |
| | |
-------------------------------------------------------------------------------
Table 9-3 Notes
1. When you call a Pascal routine from a FORTRAN routine, use the
FORTRAN directive $ALIAS in the FORTRAN compilation unit to
specify a nonstandard calling sequence for the Pascal routine.
Specify %REF for each character string parameter (the FORTRAN
default for character strings is %DESCR). See the example in "How
Non-Pascal Programs Call Pascal Routines" .
2. For calling FORTRAN 77 from Pascal only. In the FORTRAN 77
compilation unit, declare the parameter as CHARACTER*
n
or
CHARACTER*(*). For a PAC type HP Pascal parameter, HP Pascal
passes the address followed by the length. For either string type
HP Pascal parameter, HP Pascal passes the address of the data part
of the string followed by its current length. The current length
is loaded from the length field. For example:
A FORTRAN 77 routine:
CHARACTER*40 FUNCTION F77_Func (Str1,Str2)
CHARACTER*80 Str1