+.B :
+Enter a line to be executed as long commands. Normal line
+editing characters (erase character, erase word, erase line) are
+supported.
+.SH "LONG COMMANDS"
+Long commands are a sequence of statements
+parsed much like a programming language, with a syntax
+similar to that of C. Numeric and string expressions and variables
+are supported, as well as conditional statements.
+.PP
+There are two data types: string and number. A string is a sequence
+of letters or digits beginning with a letter. ``_'' and ``.'' are
+considered letters. Alternately, non-alphanumeric characters can
+be included in strings by quoting them in ``"'' or escaping them
+with ``\\''. In addition, the ``\\'' sequences of C are supported,
+both inside and outside quotes (e.g., ``\\n'' is a new line,
+``\\r'' a carriage return). For example, these are legal strings:
+abcde01234, "&#$^*&#", ab"$#"cd, ab\\$\\#cd, "/usr/ucb/window".
+.PP
+A number is an integer value in one of three forms:
+a decimal number, an octal number preceded by ``0'',
+or a hexadecimal number preceded by ``0x'' or ``0X''. The natural
+machine integer size is used (i.e., the signed integer type
+of the C compiler). As in C, a non-zero number represents
+a boolean true.
+.PP
+The character ``#'' begins a comment which terminates at the
+end of the line.
+.PP
+A statement is either a conditional or an expression. Expression
+statements are terminated with a new line or ``;''. To continue
+an expression on the next line, terminate the first line with ``\\''.
+.SH "CONDITIONAL STATEMENT"
+\fIWindow\fP has a single control structure:
+the fully bracketed if statement in the form
+.nf
+ if <expr> then
+ <statement>
+ . . .
+ elsif <expr> then
+ <statement>
+ . . .
+ else
+ <statement>
+ . . .
+ endif
+.fi
+The \fIelse\fP and \fIelsif\fP parts are optional, and the latter can
+be repeated any number of times. \fI<Expr>\fP must be numeric.
+.SH EXPRESSIONS
+Expressions in \fIwindow\fP are similar to those in the
+C language, with most C operators supported on numeric
+operands. In addition, some are overloaded to operate on strings.
+.PP
+When an expression is used as a statement, its value is discarded
+after evaluation. Therefore, only expressions with side
+effects (assignments and function calls) are useful as statements.
+.PP
+Single valued (no arrays) variables are supported, of both
+numeric and string values. Some variables are predefined. They
+are listed below.
+.PP
+The operators in order of increasing precedence:
+.TP
+.B <expr1> = <expr2>
+Assignment. The variable of name \fI<expr1>\fP, which must be string valued,
+is assigned the result of \fI<expr2>\fP. Returns the value of \fI<expr2>\fP.
+.TP
+.B <expr1> ? <expr2> : <expr3>
+Returns the value of \fI<expr2>\fP if \fI<expr1>\fP evaluates true
+(non-zero numeric value); returns the value of \fI<expr3>\fP otherwise. Only
+one of \fI<expr2>\fP and \fI<expr3>\fP is evaluated. \fI<Expr1>\fP must
+be numeric.
+.TP
+.B <expr1> || <expr2>
+Logical or. Numeric values only. Short circuit evaluation is supported
+(i.e., if \fI<expr1>\fP evaluates true, then \fI<expr2>\fP is not evaluated).
+.TP
+.B <expr1> && <expr2>
+Logical and with short circuit evaluation. Numeric values only.
+.TP
+.B <expr1> | <expr2>
+Bitwise or. Numeric values only.
+.TP
+.B <expr1> ^ <expr2>
+Bitwise exclusive or. Numeric values only.
+.TP
+.B <expr1> & <expr2>
+Bitwise and. Numeric values only.
+.TP
+.B <expr1> == <expr2>, <expr1> != <expr2>
+Comparison (equal and not equal, respectively). The boolean
+result (either 1 or 0) of the comparison is returned. The
+operands can be numeric or string valued. One string operand
+forces the other to be converted to a string in necessary.
+.TP
+.B <expr1> < <expr2>, <expr1> > <expr2>, <expr1> <= <expr2>, <expr1> >= <expr2>
+Less than, greater than, less than or equal to,
+greater than or equal to. Both numeric and string values, with
+automatic conversion as above.
+.TP
+.B <expr1> << <expr2>, <expr1> >> <expr2>
+If both operands are numbers, \fI<expr1>\fP is bit
+shifted left (or right) by \fI<expr2>\fP bits. If \fI<expr1>\fP is
+a string, then its first (or last) \fI<expr2>\fP characters are
+returns (if \fI<expr2>\fP is also a string, then its length is used
+in place of its value).
+.TP
+.B <expr1> + <expr2>, <expr1> - <expr2>
+Addition and subtraction on numbers. For ``+'', if one
+argument is a string, then the other is converted to a string,
+and the result is the concatenation of the two strings.
+.TP
+.B <expr1> * <expr2>, <expr1> / <expr2>, <expr1> % <expr2>
+Multiplication, division, modulo. Numbers only.
+.TP
+.B -<expr>, ~<expr>, !<expr>, $<expr>, $?<expr>
+The first three are unary minus, bitwise complement and logical complement
+on numbers only. The operator, ``$'', takes \fI<expr>\fP and returns
+the value of the variable of that name. If \fI<expr>\fP is numeric
+with value \fIn\fP and it appears within an alias macro (see below),
+then it refers to the nth argument of the alias invocation. ``$?''
+tests for the existence of the variable \fI<expr>\fP, and returns 1
+if it exists or 0 otherwise.
+.TP
+.B <expr>(<arglist>)
+Function call. \fI<Expr>\fP must be a string that is the unique
+prefix of the name of a builtin \fIwindow\fP function
+or the full name of a user defined alias macro. In the case of a builtin
+function, \fI<arglist>\fP can be in one of two forms:
+.br
+ <expr1>, <expr2>, . . .
+.br
+ argname1 = <expr1>, argname2 = <expr2>, . . .
+.br
+The two forms can in fact be intermixed, but the result is
+unpredictable. Most arguments can be omitted; default values will
+be supplied for them. The \fIargnames\fP can be unique prefixes
+of the the argument names. The commas separating
+arguments are used only to disambiguate, and can usually be omitted.
+.IP
+Only the first argument form is valid for user defined aliases. Aliases
+are defined using the \fIalias\fP builtin function (see below). Arguments
+are accessed via a variant of the variable mechanism (see ``$'' operator
+above).
+.IP
+Most functions return value, but some are used for side effect
+only and so must be used as statements. When a function or an alias is used
+as a statement, the parenthesis surrounding
+the argument list may be omitted. Aliases return no value.
+.SH "BUILTIN FUNCTIONS"
+The arguments are listed by name in their natural
+order. Optional arguments are in square brackets (``[ ]''). Arguments
+that have no names are in angle brackets (``<>'').
+.TP
+.B alias([<string>], [<string-list>])
+If no argument is given, all currently defined alias macros are
+listed. Otherwise, \fI<string>\fP is defined as an alias,
+with expansion \fI<string-list>\fP. The previous definition of
+\fI<string>\fP, if any, is returned. Default for \fI<string-list>\fP
+is no change.
+.TP
+.B close(<window-list>)
+Close the windows specified in \fI<window-list>\fP. If \fI<window-list>\fP
+is the word \fIall\fP, than all windows are closed. No value is returned.
+.TP
+.B cursormodes([modes])
+Set the window cursor to \fImodes\fP. \fIModes\fP is the bitwise
+or of the mode bits defined as the variables \fIm_ul\fP (underline),
+\fIm_rev\fP (reverse video), \fIm_blk\fP (blinking),
+and \fIm_grp\fP (graphics, terminal dependent). Return
+value is the previous modes. Default is no change.
+For example, cursor($m_rev|$m_blk) sets the window cursors to blinking
+reverse video.
+.TP
+.B echo([window], [<string-list>])
+Write the list of strings, \fI<string-list>\fP, to \fIwindow\fP, separated
+by spaces and terminated with a new line. The strings are only
+displayed in the window, the processes in the window are not
+involved (see \fIwrite\fP below). No value is returned. Default
+is the current window.
+.TP
+.B escape([escapec])
+Set the escape character to \fIescape-char\fP. Returns the old
+escape character as a one-character string. Default is no
+change. \fPEscapec\fP can be a string of a single character, or
+in the form \fI^X\fP, meaning control-\fIX\fP.
+.TP
+.B foreground([window], [flag])
+Move \fIwindow\fP in or out of foreground. \fIFlag\fP
+can be one of \fIon\fP, \fIoff\fP,
+\fIyes\fP, \fIno\fP, \fItrue\fP, or \fIfalse\fP, with obvious
+meanings, or it can be a numeric expression, in which case
+a non-zero value is true. Returns the old foreground flag
+as a number. Default for \fIwindow\fP is the current window,
+default for \fIflag\fP is no change.
+.TP
+.B label([window], [label])
+Set the label of \fIwindow\fP to \fIlabel\fP. Returns the old
+label as a string. Default for \fIwindow\fP is the current
+window, default for \fIlabel\fP is no change. To turn
+off a label, set it to an empty string ("").
+.TP
+.B list()
+No arguments. List the identifiers and labels of all windows. No
+value is returned.
+.TP
+.B nline([nline])
+Set the default buffer size to \fInline\fP. Initially, it is
+48 lines. Returns the old default buffer size. Default is
+no change. Using a very large buffer can slow the program down
+considerably.
+.TP
+.B select([window])
+Make \fIwindow\fP the current window. The previous current window
+is returned. Default is no change.
+.TP
+.B shell([<string-list>])
+Set the default window shell program to \fI<string-list>\fP. Returns
+the first string in the old shell setting. Default is no change. Initially,
+the default shell is taken from the environment variable \fISHELL\fP.
+.TP
+.B source(filename)
+Read and execute the long commands in \fIfilename\fP. Returns
+-1 if the file cannot be read, 0 otherwise.
+.TP
+.B terse([flag])
+Set terse mode to \fIflag\fP. In terse mode, the command window