[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Divert into string variable
From: |
Carsten Kunze |
Subject: |
Re: [Groff] Divert into string variable |
Date: |
Sat, 29 Nov 2014 13:07:26 +0100 (CET) |
Dave Kemper <address@hidden> wrote:
> It's documented in the groff manual in section 5.19; see the sentence
> "Strings, macros, and diversions (and boxes) share the same name
> space" and the following few paragraphs.
That doesn't describe it. But indeed the following sentences (of the groff
manual) do.
But it is not described in the troff manual. Rather the opposite is described
in ยง 7.1:
"Macros are interpolated with .xx [...] Strings are interpolated with \*x and
\*(xx".
So it is specified for groff, but other troff implementations could behave
different even if they are according the troff manual.
Sharing the same name space is only a matter of the symbol table handling.
E.g. in C char and char * share the same name space but you cannot save all
information of a char * in a char in any case. It would be legal if strings
and macros share the same name space but troff would give a type mismatch
warning if one uses \*... for a macro or .xx for a string (IMHO even according
the troff manual(?)). That number registers have an own name space is
something special to troff which can't be found in most other important
languages.
Carsten