HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)
5- 16
250 SUBEND
The above program prints:
31
EXP
The EXP function returns the value of e **
n
. The result is a REAL
number.
Syntax
EXP(
n
)
Parameters
n
The power that e is to be raised to. Although this can
be of any numeric type, it is converted to REAL.
Examples
10 A = EXP(0) !A = 1
20 B = EXP(1) !B = 2.71828
30 C = EXP(1.0) !C = 2.718281828459
FNUM
The FNUM function returns the MPE XL file number of a file. This is used
primarily when calling MPE XL file intrinsics.
Syntax
FNUM(
fnum
)
Parameters
fnum
The file number that HP Business BASIC/XL uses to
identify the file. It is a numeric expression that
evaluates to a positive short integer. An optional #
can precede
fnum
.
Examples
100 MPE_num = FNUM(1) !MPE_num is the MPE file number of file 1.
120 REM !MPE_num can then be used to call intrinsics
FRACT
The FRACT function returns the fractional part of a number. The result
can be of type REAL, SHORT REAL, DECIMAL, or SHORT DECIMAL.
Syntax
FRACT(
n
)
Parameters
n
The number to be evaluated. This can be of any numeric
type.
Examples
10 A = FRACT(2.7) !A = .7
20 B = FRACT(45) !B = 0
INFO$
The INFO$ function returns the value of a string that was assigned to
INFO following the command RUN;INFO=S$.
Syntax
INFO$
Examples
>RUN;INFO="Debug"