version 1.51, 2014/03/30 21:28:01 |
version 1.53, 2014/04/07 15:07:13 |
|
|
.Pq troff mode , |
.Pq troff mode , |
COND evaluates to false. |
COND evaluates to false. |
.It |
.It |
If COND starts with a digit, optionally prefixed by a minus sign, |
If COND starts with a parenthesis or with an optionally signed |
it is evaluated as a numerical expression of the form |
integer number, it is evaluated according to the rules of |
.Ar number operator number , |
.Sx Numerical expressions |
where |
explained below. |
.Ar operator |
It evaluates to true if the the result is positive, |
is one of |
or to false if the result is zero or negative. |
.Sq < , |
|
.Sq <= , |
|
.Sq = , |
|
.Sq >= , |
|
or |
|
.Sq > . |
|
.It |
.It |
Otherwise, the first character of COND is regarded as a delimiter |
Otherwise, the first character of COND is regarded as a delimiter |
and COND evaluates to true if the string extending from its first |
and COND evaluates to true if the string extending from its first |
Line 898 This line-scoped request is currently ignored. |
|
Line 892 This line-scoped request is currently ignored. |
|
.Ss \&nh |
.Ss \&nh |
Turn off automatic hyphenation mode. |
Turn off automatic hyphenation mode. |
This line-scoped request is currently ignored. |
This line-scoped request is currently ignored. |
.Ss \&rm |
|
Remove a request, macro or string. |
|
This request is intended to have one argument, |
|
the name of the request, macro or string to be undefined. |
|
Currently, it is ignored including its arguments, |
|
and the number of arguments is not checked. |
|
.Ss \&nr |
.Ss \&nr |
Define or change a register. |
Define or change a register. |
A register is an arbitrary string value that defines some sort of state, |
A register is an arbitrary string value that defines some sort of state, |
which influences parsing and/or formatting. |
which influences parsing and/or formatting. |
Its syntax is as follows: |
Its syntax is as follows: |
.Pp |
.Pp |
.D1 Pf \. Cm \&nr Ar name Oo +|- Oc Ns Ar value |
.D1 Pf \. Cm \&nr Ar name Oo +|- Oc Ns Ar expression |
.Pp |
.Pp |
The |
For the syntax of |
.Ar value |
.Ar expression , |
may, at the moment, only be an integer. |
see |
|
.Sx Numerical expressions |
|
below. |
If it is prefixed by a sign, the register will be |
If it is prefixed by a sign, the register will be |
incremented or decremented instead of assigned to. |
incremented or decremented instead of assigned to. |
.Pp |
.Pp |
Line 949 Change point size. |
|
Line 939 Change point size. |
|
This line-scoped request is intended to take one numerical argument. |
This line-scoped request is intended to take one numerical argument. |
Currently, it is ignored including its arguments, |
Currently, it is ignored including its arguments, |
and the number of arguments is not checked. |
and the number of arguments is not checked. |
|
.Ss \&rm |
|
Remove a request, macro or string. |
|
Its syntax is as follows: |
|
.Pp |
|
.D1 Pf \. Cm \&rm Ar name |
|
.Ss \&rr |
|
Remove a register. |
|
Its syntax is as follows: |
|
.Pp |
|
.D1 Pf \. Cm \&rr Ar name |
.Ss \&so |
.Ss \&so |
Include a source file. |
Include a source file. |
Its syntax is as follows: |
Its syntax is as follows: |
Line 1017 Begin a table, which formats input in aligned rows and |
|
Line 1017 Begin a table, which formats input in aligned rows and |
|
See |
See |
.Xr tbl 7 |
.Xr tbl 7 |
for a description of the tbl language. |
for a description of the tbl language. |
|
.Ss Numerical expressions |
|
The |
|
.Sx \&nr , |
|
.Sx \&if , |
|
and |
|
.Sx \&ie |
|
requests accept integer numerical expressions as arguments. |
|
These are always evaluated using the C |
|
.Vt int |
|
type; integer overflow works the same way as in the C language. |
|
Numbers consist of an arbitrary number of digits |
|
.Sq 0 |
|
to |
|
.Sq 9 |
|
prefixed by an optional sign |
|
.Sq + |
|
or |
|
.Sq - . |
|
.Pp |
|
The following binary operators are implemented. |
|
Unless otherwise stated, they behave as in the C language: |
|
.Pp |
|
.Bl -tag -width 2n -compact |
|
.It Ic + |
|
addition |
|
.It Ic - |
|
subtraction |
|
.It Ic * |
|
multiplication |
|
.It Ic / |
|
division |
|
.It Ic % |
|
remainder of division |
|
.It Ic < |
|
less than |
|
.It Ic > |
|
greater than |
|
.It Ic == |
|
equal to |
|
.It Ic = |
|
equal to, same effect as |
|
.Ic == |
|
(this differs from C) |
|
.It Ic <= |
|
less than or equal to |
|
.It Ic >= |
|
greater than or equal to |
|
.It Ic <> |
|
not equal to (corresponds to C |
|
.Ic != ; |
|
this one is of limited portability, it is supported by Heirloom roff, |
|
but not by groff) |
|
.It Ic & |
|
logical and (corresponds to C |
|
.Ic && ) |
|
.It Ic \&: |
|
logical or (corresponds to C |
|
.Ic \&|| ) |
|
.It Ic <? |
|
minimum (not available in C) |
|
.It Ic >? |
|
maximum (not available in C) |
|
.El |
|
.Pp |
|
There is no concept of precendence; evaluation proceeds from left to right, |
|
except when subexpressions are enclosed in parantheses. |
|
Inside parentheses, whitespace is ignored. |
.Sh ESCAPE SEQUENCE REFERENCE |
.Sh ESCAPE SEQUENCE REFERENCE |
The |
The |
.Xr mandoc 1 |
.Xr mandoc 1 |