[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Errors in gnu m4 manual pdf + suggestions
From: |
Barry Davidson |
Subject: |
Errors in gnu m4 manual pdf + suggestions |
Date: |
Fri, 25 Aug 2023 21:41:12 -0000 |
Hello,
Page 116: when talking about forloop and forloop2, the text incorrectly
calls them foreach and foreach2. "... improved version used '_$0' rather
than '_foreach' to...".
My suggestions:
# 1. Add example macro to print current left and right quote symbols
literally:
define(`lquo', `ifelse(`$#', `0', ``$0'', `changequote(`[',`]')`dnl'
changequote([`], ['])')')
define(`rquo', `ifelse(`$#', `0', ``$0'', `changequote(`[', `]')dnl`
'changequote([`], ['])')')
lquo()rquo()
# 2. Add example macro of settable counters:
define(`countup', `ifelse(`$#', `0',
`define(`_$0', `0')define(`$0', `_$0`'define(`_$0', incr(_$0))')',
`define(`_$0', `$1')define(`$0', `_$0`'define(`_$0', incr(_$0))')')')
define(`countdown', `ifelse(`$#', `0',
`define(`_$0', `0')define(`$0', `_$0`'define(`_$0', decr(_$0))')',
`define(`_$0', `$1')define(`$0', `_$0`'define(`_$0', decr(_$0))')')')
define(`counter', defn(`countup'))
# set counter
counter(`42')
# use counter
counter counter counter counter
define(`counter', defn(`countdown'))
# set counter
counter(`22')
# use counter
counter counter counter counter
########################
This code license comply to "Appendix A How to make copies of the overall
M4 package" of GNU m4 manual.
Thank you for your work on GNU m4!
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Errors in gnu m4 manual pdf + suggestions,
Barry Davidson <=