Feedback sought on unusual arithmetic expressions
"G. Branden Robinson" <[email protected]> Sun, 22 Mar 2026 19:01:52 -0500
| Newsgroups | gmane.comp.printing.groff.general |
|---|---|
| Message-ID | <20260323000152.bi6ay5prwnjdrsuf@illithid> |
Hi folks,
Back in January I filed Savannah #67908,[1] and immediately postponed it
because dealing with it was not timely giving the C/C++ code freeze then
in effect (or soon to be).
In it, I wrote:
---snip---
Pointed out by Ingo Schwarze in a recent mandoc commit.[2]
He spoke of the `ll` request but it's true in general for numeric
expressions.
.nr a +-+-1
.tm a=\na
.nr b +-+2
.tm b=\nb
...reports "a=1" and "b=-2" on GNU, DWB 3.3, Heirloom Doctools, and Plan
9 from User Space _troff_s.
This convention is a little weird.
But, as Ingo points out, it can get weirder when a numeric expression
can be preceded by a unary incrementation or decrementation
operator...which happens to be spelled the same.
Should we:
1. Have the formatter throw a warning when multiple sign operators
occur in sequence?
2. Have the formatter throw a warning when a *crementation operator is
followed by a sign operator?
Nothing seems to be breaking due to this, so setting severity to "wish".
Requesting feedback from the community; setting to "Need Info" status.
---end snip---
Please follow up with your thoughts here or to the ticket.
Regards,
Branden
[1] https://savannah.gnu.org/bugs/?67908
[2] https://cvsweb.bsd.lv/mandoc/term.c?rev=1.295&content-type=text/x-cvsweb-markup&sortby=date
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEh3PWHWjjDgcrENwa0Z6cfXEmbc4FAmnAgukACgkQ0Z6cfXEm bc5vyRAAmhbPzQ4EKGEbGpcCsYWsvNKHdLq80yvfrsyDSFJD8jj9I6u7shSC+mrq AAday8l2wLKJG4vcUCA425khONWN6FY1At5/AjhApacalQ1cOR1WeetrQ5Oc3o3e tq0vZU4b5ueLcsH/L2ygwajyME+xOJdb49jF2auuXLNr98P2E4A2jzw3X4h1VsR7 LZ2p7DnBPlZ5rHpQ22e1DxeiYsK8b1IPnvuCFHhbSTW0h6Yxi35G/pkDO28hZGdB s9xpl9IKMTlMTNZ5+MbcpQukbzvyoy92gMuPnVVsylZ826XRr/yi5mdy47cVBus1 UKUWbcF4cqE9WyhgYMV2ljcu9UNs6+4D0SI7JCtpgCDp/VdY0TkE97cqTD3KWWdw /leH8tA3HH8S8+dBJJPzR4Hisoj0hfjgKpR54AmkI3ZAa5RBpz2KVts7DQOdtacr 4GpzMz7aA9U+kakZ9XqCV4BclFwH2lBZ4JIz5BuCS5ncHcSqps86Q3AYFDCDFS7G 2rC6GaTfukC3jnB9YO4CfGVK2LaQtSnFi4BOuBtVpc3MmrGjjjCpR+2w0uJW5BSN damqljEv8aHMDRllHTRlxRCiNA1wYYVD6jP3CHaiwKzNszzMeHagesLrZkL+/fJj v2N5x2K6wdwxFOtY+r4zPTxEOLBuH1ROpjS1vVXT7SW8SOyEY5Y= =ms4U -----END PGP SIGNATURE-----