Next: Auto-increment, Previous: Setting Registers, Up: Registers [Contents][Index]
Numeric registers can be accessed via the \n
escape.
Interpolate number register with name ident (one-character
name i, two-character name id). This means that the
value of the register is expanded in-place while gtroff
is
parsing the input line. Nested assignments (also called indirect
assignments) are possible.
.nr a 5 .nr as \na+\na \n(as ⇒ 10
.nr a1 5 .nr ab 6 .ds str b .ds num 1 \n[a\n[num]] ⇒ 5 \n[a\*[str]] ⇒ 6