Hi Carsten,
Carsten Kunze wrote on Thu, Jul 03, 2014 at 09:11:09PM +0200:
> (may be off topic)
I consider your question perfectly on topic.
> Why is \} (end of conditional block) considered as a macro argument
> regarding the register .$ ?
That looks like a miniature bug to me.
> It may not be best style, but often \} is written behind the last
> request of a block.
Sure.
> There are warnings for doing this for requests like e.g. .ds,
I failed to reproduce what you say in this sentence.
> but that it also increases .$ is not expected.
> Has this really been intended by the nroff author?
I have no idea, but it doesn't make sense to me.
Yours,
Ingo
Minimal input file:
.de count_args
\\n(.$
..
.if n \{.count_args\}
.if n \{.count_args \}
.if n \{.count_args foo\}
.if n \{.count_args foo \}
Run this through:
groff -Wall -Tascii
Output with groff-1.22.2 on OpenBSD:
0 1 1 2