[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 22/41: [ms]: Clarify expression algebra.
From: |
G. Branden Robinson |
Subject: |
[groff] 22/41: [ms]: Clarify expression algebra. |
Date: |
Fri, 18 Mar 2022 00:41:30 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit d745bdbacc54cfff7c0cd739785a2c72c41dd71c
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 22/41: [ms]: Clarify expression algebra.,
G. Branden Robinson <=