@@ -4,29 +4,44 @@ $(SPEC_S Properties,
4
4
5
5
$(HEADERNAV_TOC)
6
6
7
+ $(H2 $(LNAME2 common, Common Properties))
8
+
7
9
$(P Every symbol, type, and expression has properties that can be queried:)
8
10
9
- $(TABLE2 Properties for All Types,
11
+ $(TABLE
10
12
$(THEAD Property, Description)
11
- $(TROW $(RELATIVE_LINK2 init, $(D .init)), initializer)
12
- $(TROW $(RELATIVE_LINK2 sizeof, $(D .sizeof)), size in bytes)
13
- $(TROW $(RELATIVE_LINK2 alignof, $(D .alignof)), alignment size)
14
13
$(TROW $(RELATIVE_LINK2 mangleof, $(D .mangleof)), string representing the $(SINGLEQUOTE mangled) representation of the type)
15
14
$(TROW $(RELATIVE_LINK2 stringof, $(D .stringof)), string representing the source representation of the type)
16
15
)
17
16
18
17
$(TABLE2 Examples,
19
18
$(THEAD Expression, Value)
20
- $(TROW $(D int.sizeof), yields 4)
21
- $(TROW $(D (3).sizeof), yields 4 (because 3 is an int))
22
-
23
- $(TROW $(D int.init), yields 0)
24
19
$(TROW $(D int.mangleof), yields the string "i")
25
20
$(TROW $(D int.stringof), yields the string "int")
26
21
$(TROW $(D (1+2).stringof), yields the string "1 + 2")
27
22
)
28
23
29
- $(BR)
24
+ $(H2 $(LNAME2 type, Type Properties))
25
+
26
+ $(P Every type has properties that can be queried. Every expression also
27
+ has these properties, which are equivalent to the properties of the
28
+ expression's type. These properties are:)
29
+
30
+ $(TABLE
31
+ $(THEAD Property, Description)
32
+ $(TROW $(RELATIVE_LINK2 init, $(D .init)), initializer)
33
+ $(TROW $(RELATIVE_LINK2 sizeof, $(D .sizeof)), size in bytes)
34
+ $(TROW $(RELATIVE_LINK2 alignof, $(D .alignof)), alignment size)
35
+ )
36
+
37
+ $(TABLE2 Examples,
38
+ $(THEAD Expression, Value)
39
+ $(TROW $(D int.init), yields 0)
40
+ $(TROW $(D int.sizeof), yields 4)
41
+ $(TROW $(D (3).sizeof), yields 4 (because 3 is an int))
42
+ )
43
+
44
+ $(H2 $(LNAME2 numeric, Numeric Properties))
30
45
31
46
$(TABLE2 Properties for Integral Types,
32
47
$(THEAD Property, Description)
@@ -61,15 +76,22 @@ $(TROW $(D float.nan), yields the floating point NaN value)
61
76
$(TROW $(D (2.5F).nan), yields the floating point NaN value)
62
77
)
63
78
64
- $(BR)
79
+ $(H2 $(LNAME2 derived-type, Derived Type Properties))
80
+
81
+ $(P See:)
65
82
66
- $(P See also:)
67
83
* $(DDSUBLINK spec/arrays, array-properties, Array Properties)
68
- * $(DDSUBLINK spec/class, class_properties, Class Properties)
69
84
* $(DDSUBLINK spec/hash-map, properties, Associative Array Properties)
85
+ * $(DDSUBLINK spec/simd, properties, Vector Properties)
86
+
87
+
88
+ $(H2 $(LNAME2 user-defined-type, User-Defined Type Properties))
89
+
90
+ $(P See:)
91
+
92
+ * $(DDSUBLINK spec/class, class_properties, Class Properties)
70
93
* $(DDSUBLINK spec/enum, enum_properties, Enum Properties)
71
94
* $(DDSUBLINK spec/struct, struct_properties, Struct Properties)
72
- * $(DDSUBLINK spec/simd, properties, Vector Properties)
73
95
74
96
75
97
$(H2 $(LNAME2 init, .init Property))
0 commit comments