[TUHS] Pic semantics
Noel Hunt via TUHS
tuhs at tuhs.org
Thu Sep 10 08:06:26 AEST 2026
I just compiled 'pic' from the 'v10a' distribution, and it compiled
suprisingly easily.
I was expecting lots of prototype errors etc.
Here is what it outputs:
.lf 1 test.pic
... 0 0 0.5 0
... 0.000i 0.000i 0.500i 0.000i
.nr 00 \n(.u
.nf
.PS 0.000i 0.500i
.lf 6
\v'.2m'\h'-\w'A'u/2u'A
.sp -1
\h'0.500i'\v'.2m'\h'-\w'B'u/2u'B
.sp -1
.sp 1+0.000i
.PE
.if \n(00 .fi
.lf 6
On Wed, 9 Sept 2026 at 20:42, Douglas McIlroy via TUHS <tuhs at tuhs.org> wrote:
>
> 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