[TUHS] Pic semantics
Douglas McIlroy via TUHS
tuhs at tuhs.org
Wed Sep 9 20:42:07 AEST 2026
I have been surprised by the handling of Pic macro arguments, quite
different from m4, although Brian had a hand in both. I wonder if Gnu
differs from the original.
Would someone who can run a Research version of Pic be willing to try
it and send me Pic's (not groff's) output from the example below? The
issue is whether macro calls in arguments are evaluated when the
arguments are collected. For example, is the argument collected for
the macro call m(x) below x or "A"? In Gnu, it's x, so the two
instances of $1 ultimately become different text.
.PS
define x {"A"}
define m {$1; move; define x {"B"}; $1}
m(x)
.PE
Thanks,
Doug
More information about the TUHS
mailing list