]> git.cameronkatri.com Git - mandoc.git/blob - regress/roff/string/undef.in
Using an undefined string or macro will cause it to be defined as empty.
[mandoc.git] / regress / roff / string / undef.in
1 .\" $OpenBSD: std.in,v 1.2 2017/07/04 14:53:27 schwarze Exp $
2 .TH STRING-UNDEF 1 "April 9, 2018"
3 .SH NAME
4 string-undef - expanding undefined strings
5 .SH DESCRIPTION
6 .SS User defined string
7 The sting "mys" is
8 .ie dmys defined
9 .el undefined
10 and remains
11 .ie dmys defined.
12 .el undefined.
13 .PP
14 Its value is "\*[mys]", and now it is
15 .ie dmys defined,
16 .el undefined,
17 and its value is still "\*[mys]".
18 .PP
19 .ds mys newval
20 After redefining it to "\*[mys]", it is of course still
21 .ie dmys defined.
22 .el undefined.
23 .PP
24 .rm mys
25 After removing the definition, it is now
26 .ie dmys defined.
27 .el undefined.
28 .SS User defined macro
29 The macro "mym" is
30 .ie dmym defined.
31 .el undefined.
32 .PP
33 It has no effect:
34 .mym
35 But now it is
36 .ie dmym defined.
37 .el undefined.
38 .PP
39 .de mym
40 neweffect
41 ..
42 After defining it as:
43 .mym
44 it is of course still
45 .ie dmym defined.
46 .el undefined.
47 .PP
48 .rm mym
49 After removing the definition, it is now
50 .ie dmym defined.
51 .el undefined.
52 .SS Renamed macro
53 The standard .BR macro is
54 .ie dBR defined,
55 .el undefined,
56 and it
57 .BR works .
58 .PP
59 .rn BR newBR
60 After renaming it, the new name is
61 .ie dnewBR defined,
62 .el undefined,
63 and
64 .newBR works .
65 .SS Predefined string
66 A predefined string is
67 .ie dR defined
68 .el undefined
69 and has the value "\*R".