HP-UX Reference (11i v2 04/09) - 1 User Commands A-M (vol 1)

b
bs(1) bs(1)
stop Execution of internal statements is stopped.
bs reverts to immediate mode.
trace [expression]
The trace statement controls function tracing. If the expression is null (or evaluates to
zero), tracing is turned off. Otherwise, a record of user-function calls/returns is printed.
Each return decrements the trace expression value.
while expression statement
while expression
...
next while is similar to for except that only the conditional expression for loop-
continuation is given.
! shell command
An immediate escape to the shell.
# ... This statement is ignored (treated as a comment).
Expression Syntax
name A name is used to specify a variable. Names are composed of a letter (uppercase or
lowercase) optionally followed by letters and digits. Only the first six characters of a
name are significant. Except for names declared in fun statements, all names are global
to the program. Names can take on numeric (double float) values, string values, or can
be associated with input/output (see the built-in function
open() below).
name ( [expression [ , expression] ... ] )
Functions can be called by a name followed by the arguments in parentheses separated
by commas. Except for built-in functions (listed below), the name must be defined with a
fun statement. Arguments to functions are passed by value. If the function is undefined,
the call history to the call of that function is printed, and a request for a return value (as
an expression) is made. The result of that expression is taken to be the result of the
undefined function. This permits debugging programs where not all the functions are yet
defined. The value is read from the current input file.
name [ expression [ , expression ] ... ]
This syntax is used to reference either arrays or tables (see built-in table functions
below). For arrays, each expression is truncated to an integer and used as a specifier for
the name. The resulting array reference is syntactically identical to a name;
a[1,2] is
the same as
a[1][2]. The truncated expressions are restricted to values between 0 and
32767.
number A number is used to represent a constant value. A number is written in Fortran style,
and contains digits, an optional decimal point, and possibly a scale factor consisting of an
e followed by a possibly signed exponent.
string Character strings are delimited by " characters. The
\ escape character allows the dou-
ble quote (\"), new-line (\n), carriage return (\r), backspace (\b), and tab (\t) charac-
ters to appear in a string. Otherwise, \ stands for itself.
( expression ) Parentheses are used to alter the normal order of evaluation.
( expression , expression [ , expression ... ] ) [ expression ]
The bracketed expression is used as a subscript to select a comma-separated expression
from the parenthesized list. List elements are numbered from the left, starting at zero.
The expression:
( False, True )[ a == b ]
has the value True if the comparison is true.
? expression The interrogation operator tests for the success of the expression rather than its value.
At the moment, it is useful for testing end-of-file (see examples in the Programming Tips
section below), the result of the eval built-in function, and for checking the return from
user-written functions (see freturn). An interrogation ‘trap’’ (end-of-file, etc.) causes
an immediate transfer to the most recent interrogation, possibly skipping assignment
statements or intervening function levels.
- expression The result is the negation of the expression.
Section 156 Hewlett-Packard Company 3 HP-UX 11i Version 2: September 2004