HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)

G-: 30
if p_actual_param_table^[param_index].number_of_dimensions > 0 then
process_array( p_actual_param_table, param_index, tstfil )
else
process_scalar( p_actual_param_table, param_index, tstfil )
end { for loop processing of the parameters }
end; { anyparm_example's actual parameter array is large enough }
writeln( tstfil, 'exiting anyparm_example' );
end; { anyparm_example }
begin
end.
The ANYPARM Call
Assume that the Pascal program presented in the previous section is in
the file, ANYPROG. To add the EXAMPLE procedure to the local executable
library named XL, do the following:
:pasxl anyprog
:linkeditor
linked>buildxl xl
linked>addxl from= $oldpass; to=xl
linked>exit
:
Consult the
HPLink Editor/XL Reference Manual
for more information.
Enter HP Business BASIC/XL and type the following program:
100 ! --- purge the file to which the &
external writes the information --
110 PURGE "TESTFILE";STATUS=Status
120 !
130 ! --------- create the file to which &
the external will write -------
140 CREATE ASCII "TESTFILE",RECSIZE=-80
150 !
160 ! ----------- declare and initialize variables -------------
170 REAL Real1
180 DIM Str8$[8]
190 DIM SHORT INTEGER Sint_array(1,1) &
! Assumes the OPTION BASE is zero
200 Real1=1.23E+45
210 Str8$="ANYPARM"
220 Sint_array(0,0)=1
230 Sint_array(0,1)=2
240 Sint_array(1,0)=3
250 Sint_array(1,1)=4
260 !
270 ! ---------------- call the external --------------------
280 _EXAMPLE Real1,Str8$,Sint_array(*,*)
290 !
300 ! ---------- print the contents of testfile -------------
310 COPYFILE "testfile"
320 END
Display of Memory during an ANYPARM Procedure Call
When the program is executed, the following is the layout of memory just
as execution of the external, EXAMPLE, is beginning: