[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] d conditional and autovivification of macros
From: |
Werner LEMBERG |
Subject: |
Re: [Groff] d conditional and autovivification of macros |
Date: |
Sat, 29 Oct 2011 07:59:09 +0200 (CEST) |
> When I run the following file in groff, I get the output "tenorsax
> implemented":
>
> .do tenorsax ext 1
> .de status
> .ie d\\$1 \\$1\timplemented
> .el \\$1\tmissing
> .br
> ..
> .status tenorsax
This is expected behaviour.
> I've been using groff for several years and this behavior is
> unexpected; it appears that groff is autovivifying the tenorsax
> request as some sort of macro because of the do request. It also
> conflicts with the documentation, which doesn't mention that
> behavior.
It is documented in groff's texinfo manual, section `5.4 Identifiers':
Unlike many other programming languages, undefined identifiers
are silently ignored or expanded to nothing. When `gtroff' finds an
undefined identifier, it emits a warning, doing the following:
* If the identifier is a string, macro, or diversion, `gtroff'
defines it as empty.
* If the identifier is a number register, `gtroff' defines it
with a value of 0.
So the main question is why you haven't found this documentation
snippet. Can you tell me where and what you have searched? Maybe I
can add some index entries.
Werner