groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 16/38: [docs]: Tighten discussion of numeric expressions.


From: G. Branden Robinson
Subject: [groff] 16/38: [docs]: Tighten discussion of numeric expressions.
Date: Fri, 2 Sep 2022 19:56:31 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit c690ea0fda60ab2ec635cd9066b5eb1c9b5d015b
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Mon Aug 29 17:23:34 2022 -0500

    [docs]: Tighten discussion of numeric expressions.
    
    * The scaling operator properly is just ";".  Because of roff's strict
      left-to-right expression parsing, it is typically used with
      parentheses so that the right operand can be complex, which makes the
      operator useful for non-trivial purposes.  Make this clearer.
    * Tighten wording.
    
    groff(7): Set "Name" section's summary-description terms in italics as
    needed.
---
 doc/groff.texi  | 21 ++++++++++-----------
 man/groff.7.man | 18 ++++++++++--------
 2 files changed, 20 insertions(+), 19 deletions(-)

diff --git a/doc/groff.texi b/doc/groff.texi
index 26684911b..ffca1d4be 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -5876,10 +5876,9 @@ scaling unit.  To multiply or divide by a dimensionless 
value, use
 @cindex numeric expressions
 @cindex expressions, numeric
 
-A @dfn{numeric expression} is a syntactic structure, recognized only in
-specific contexts, that evaluates to an integer:@: it can be as simple
-as a literal @samp{0} or it can be a complex sequence of register and
-string interpolations interleaved with operators.
+A @dfn{numeric expression} evaluates to an integer:@: it can be as
+simple as a literal @samp{0} or it can be a complex sequence of register
+and string interpolations interleaved with measurements and operators.
 
 GNU @code{troff} provides a set of mathematical and logical operators
 familiar to programmers---as well as some unusual ones---but supports
@@ -5950,13 +5949,13 @@ remainder@tie{}@var{r} by @samp{(a % b)}, then @math{qb 
+ r = a}.
 @cindex scaling operator
 @cindex operator, scaling
 @opindex ;
-GNU @code{troff}'s scaling operator @code{(@var{c};@var{e})}, evaluates
-a numeric expression@tie{}@var{e} using@tie{}@var{c} as the default
-scaling unit.  If @var{c} is omitted, scaling units are ignored in the
-evaluation of@tie{}@var{e}.  This operator can save typing by avoiding
-the attachment of scaling units to every operand out of caution.  Your
-macros can select a sensible default unit in case the user neglects to
-supply one.
+GNU @code{troff}'s scaling operator, used with parentheses as
+@code{(@var{c};@var{e})}, evaluates a numeric expression@tie{}@var{e}
+using@tie{}@var{c} as the default scaling unit.  If @var{c} is omitted,
+scaling units are ignored in the evaluation of@tie{}@var{e}.  This
+operator can save typing by avoiding the attachment of scaling units to
+every operand out of caution.  Your macros can select a sensible default
+unit in case the user neglects to supply one.
 
 @Example
 .\" Indent by amount given in first argument; assume ens.
diff --git a/man/groff.7.man b/man/groff.7.man
index fa960e0e4..50ca9a9d9 100644
--- a/man/groff.7.man
+++ b/man/groff.7.man
@@ -1,7 +1,9 @@
 '\" t
 .TH groff @MAN7EXT@ "@MDATE@" "groff @VERSION@"
 .SH Name
-groff \- GNU roff language reference
+groff \- GNU
+.I roff
+language reference
 .
 .
 .\" ====================================================================
@@ -772,13 +774,11 @@ multiply by 65,536
 .\" expressions".
 A
 .I numeric expression
-is a syntactic structure,
-recognized only in specific contexts,
-that evaluates to an integer:
+evaluates to an integer:
 it can be as simple as a literal
 .RB \[lq] 0 \[rq]
 or it can be a complex sequence of register and string interpolations
-interleaved with operators.
+interleaved with measurements operators.
 .
 .
 .P
@@ -793,7 +793,7 @@ _
 \f[R]unary\f[] +       assertion, motion, incrementation
 \f[R]unary\f[] \-      negation, motion, decrementation
 _
-(\f[CI]c\f[];\f[CI]e\f[])      scaling
+;      scaling
 >?     maximum
 <?     minimum
 _
@@ -900,8 +900,10 @@ then
 .P
 GNU
 .IR troff 's \" GNU
-scaling operator
-.BI ( c ; e )
+scaling operator,
+used with parentheses as
+.BI ( c ; e )\c
+,
 evaluates a numeric
 .RI expression\~ e
 .RI using\~ c



reply via email to

[Prev in Thread] Current Thread [Next in Thread]