HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)
4- 130
nonempty. If the workfile is empty, all data records in the data sets,
mentioned in the threadlist, are searched. If, however, the workfile is
nonempty searching is done only on the records whose pointers are
contained in the workfile. The pointers to those records whose data fail
the search condition are dropped from the workfile.
Syntax
{
search_condition
}
SEARCH USING
line_id
; {ALL }
Parameters
line_id
Line label on line number that identifies the line on
which a THREAD IS statement is defined.
search_
Any logical expression.
condition
Examples
The following shows the use of the SEARCH statement.
400 SEARCH USING 300; ALL
410 SEARCH USING Thread_list; TRIM$(Name$)="HP" AND Price > 0
SELECT
The SELECT, CASE, CASE ELSE, and END SELECT statements define a construct
that executes one set of statements, depending on the value of an
expression.
Syntax
[CASE
case_descriptor
] [CASE ELSE]
[[
stmt
] ] [[
stmt
] ]
SELECT
select_expr
[. ]...[. ] END SELECT
[. ] [. ]
[. ] [. ]
Parameters
select_expr
An expression evaluated and compared to the
case
descriptor
's. If the value is numeric, it is converted
to the default numeric type first.
case_descriptor
One of the following:
*
num_item
[,
num_item
]...
*
str_item
[,
str_item
]...
num_item
One of the following:
*
num_lit
[TO
num_lit
[EXCLUSIVE]
* {<,<=,>=,>}
num_lit
EXCLUSIVE If specified, the range excludes the two specified
num_lits
. For example, CASE 10 TO 20 EXCLUSIVE excludes
both 10 and 20.
str_item
One of the following:
*
str_lit
[TO
str_lit
[EXCLUSIVE]
* {<,<=,>=,>}
str_lit