gbranden pushed a commit to branch master
in repository groff.

commit d745bdbacc54cfff7c0cd739785a2c72c41dd71c
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Mar 16 19:43:42 2022 +1100

    [ms]: Clarify expression algebra.
    
    * doc/groff.texi (ms Footnotes):
    * doc/ms.ms (Footnotes): Emphasize the point, surprising to *roff
      newcomers, about the unusual way numeric expressions are evaluated.
      Offer a hint that they can always force the operator precedence they
      want/expect with parentheses.
---
 doc/groff.texi | 3 ++-
 doc/ms.ms      | 4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/doc/groff.texi b/doc/groff.texi
index 73b47397..cacb6e86 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -4009,7 +4009,8 @@ after each call to @code{.1C}, @code{.2C}, or @code{.MC}.}
 contemporary documents.  The footnote line length is effectively
 computed as @samp{@slanted{column-width} * \*[FR]}.  If an absolute
 footnote line length is required, recall that arithmetic expressions in
-@code{roff} languages are evaluated from left to right.
+@code{roff} languages are evaluated strictly from left to right, with no
+operator precedence (parentheses are honored).
 
 @Example
 .ds FR 0+3i \" Set footnote line length to 3 inches.
diff --git a/doc/ms.ms b/doc/ms.ms
index 0b3a0bbd..3c2572e1 100644
--- a/doc/ms.ms
+++ b/doc/ms.ms
@@ -2502,7 +2502,9 @@ The footnote line length is effectively computed as
 If an absolute footnote line length is required,
 recall that arithmetic expressions in
 .I roff
-languages are evaluated from left to right.
+languages are evaluated strictly from left to right,
+with no operator precedence
+(parentheses are honored).
 .
 .
 .TS

_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to