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

5-19
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. For this
function,
fnum
must specify a BASIC DATA file. An
optional # can precede
fnum
.
Examples
10 CREATE "File1", FILESIZE=10 !BASIC DATA file; each PRINT
11 ! statement starts a new record.
12 ASSIGN "File1" TO #1
13 POSITION #1; BEGIN !Pointer at record 1.
14 PRINT #1; 10 !Print 10 on record 1;
16 PRINT #1; 20,30 !Print 20 and 30 on the same record ;
18 DISP ITM(#1) !Pointer is at record 1.
19 !Three datum are between
20 ! the pointer and the beginning
21 ! of the record; display value 3.
99 END
LASTBREAK
The LASTBREAK function is a Report Writer function that returns the level
number of the last BREAK statement satisfied. If more than one BREAK
statement is satisfied, it returns the lowest level number. If no report
is active, it returns -1. If no breaks have occurred, it returns zero.
Syntax
LASTBREAK
Examples
100 Level = LASTBREAK !Level contains the level of the last BREAK.
LEN
The LEN function returns the length of a string expression in number of
characters.
Syntax
LEN(
S
$)
Parameters
S
$ The string expression whose length is to be returned.
Examples
10 A = LEN("Cat") !A = 3
LEX
The LEX function is used to compare two strings in a Native Language
dependent manner. For example:
LEX(String1$, String2$,Nl_var)
returns:
-1 if String1$ < String2$
0 if String1$ = String2$
1 if String1$ > String2$
Syntax
LEX(
str_expr1
,
str_expr2
[
nl_num_expr
] )
Parameters
str_expr1,
String variables, quoted strings, the values returned
str_expr2
from a string function, or any expressions using the
appropriate string operators to construct an