HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)
4-: 51
to specify the number of
parameters actually passed.
Refer to the
HP PASCAL Reference
Manual
for additional
information.
HPC HP C/XL
return_type
Type of the value returned by the function. Can be any
HP Business BASIC/XL type or the type BYTE (see "Calling
External Subunits" in chapter 3).
identifier
The name used within the HP Business BASIC/XL program to
call the function or procedure. If calling a function
directly without using the FNCALL keyword, this name
must follow the syntax of an HP Business BASIC/XL
function name; that is, the prefix 'FN' must precede the
name. This name is downshifted before searching the
executable library for the entry point.
quoted_str_lit
The name of the procedure or function in the executable
library. This name is referred to as the alias name.
The string provided is the case-sensitive name of the
external routine in the executable library.
ptype
Parameter type. Applies to all parameters between this
ptype
specification and the next
ptype
or string
parameter (as in the DIM statement). The
ptype
can be
any HP Business BASIC/XL type or the type BYTE (see
"Calling External Subunits" in chapter 3). Each formal
parameter specified to be a BYTE String$ must be
preceded by the keyword BYTE.
parameter
One of the following:
[VALUE] If
lang
is BASIC, VALUE is ignored. If
identifier lang
is PASCAL or HPC, VALUE indicates
that the parameter immediately
following it is to be passed by value
(rather than by reference).
#
fnum
where
fnum
is a file number as
described in chapter 6.
array_name
Gives one asterisk per dimension or
([*[,*]...]) does not have asterisks. No asterisks
indicates an undefined number of
dimensions. Either format is legal,
but the format without asterisks is not
compilable. The maximum length of each
element is the same as declared for the
actual parameter by the calling program
unit.
Examples
100 GLOBAL EXTERNAL Calculate
110 GLOBAL EXTERNAL Add(INTEGER X,Y)
115 GLOBAL EXTERNAL PASCAL String_op(BYTE Str1$,Str2$)
120 EXTERNAL BASIC Subtract ALIAS "sub"(INTEGER X,Y;REAL Z)
130 EXTERNAL PASCAL REAL FNDiv ALIAS "DIV"(INTEGER A,B)
140 EXTERNAL PASCAL INTEGER FNDiv2 ALIAS "divide"(INTEGER A,B)
150 EXTERNAL PASCAL Blob(INTEGER VALUE A, B)
For a call to String_op, both actual parameters are passed by reference.
The first actual parameter is passed as a packed array of character. The
second actual parameter is passed as a Pascal string.
For a call to Blob, the first actual parameter is an integer passed by
value, and the second actual parameter is an integer passed by reference.
The following example shows is a HP Business BASIC/XL program that calls