Editor’s Note: Is “integral” synonymous
with “singular“? Both terms are used liberally throughout the LRM. Section 12
refers to “integral singular” in multiple places. The BNF only defines
“singular” (A.2.2.1). It appears to me that they are the same. If so, then only
one term should be used throughout the LRM and BNF. If these terms are
different, then another section needs to be added here describing singular, and
the BNF needs to be defined for “integral”.
Use BNF changes in Section A.2.2.1 for data_type
Editor’s Note: This syntax ought to be in the syntax excerpt in
section 3.2, but I could not find it in the Annex A
BNF
Use BNF changes in Section A.2.4 along with variable
declaration to see BNF.
Editor’s Note: This syntax ought to be in the syntax excerpt in
section 3.2, but I could not find it in the Annex A
BNF
An enum
variable or identifier used as part of an expression is automatically cast to
the base type of the enum
declaration (either explicitly or
using int as the default). An assignment to an enum variable from an expression other than an enum variable or identifier of the same type shall require
a cast. Casting to an enum
type shall cause a conversion of the
expression to its base type without checking the validity of the value (unless
a dynamic cast is used as described in Section 3.15 3.14).
The syntax prototype
for the first() method is:
Editor’s Note: Would “prototype” be a
better term that “syntax”, since these methods are not part of the BNF?
The syntax prototype
for the last() method is:
The syntax prototype
for the next() method is:
The syntax prototype
for the prev() method is:
The syntax prototype
for the num() method is:
The syntax prototype
for the name()
method is:
Editor’s Note: I deleted the clause “i.e. an X will be read as 0...”. It no longer makes sense after change LRM-108, which
reversed the sentence from converting 4-state to 2-state into converting
2-state to 4-state.
3.14 Singular type
A singular type
includes packed arrays (and structures) and all other data types except
unpacked structures, unpacked arrays, and chandles.
3.14 3.15 Casting
Editor’s Note: Should “singular_type” be included in the casting type? In fact, “simple_type” is only used by the casting_type
production. Can “simple_type” be replaced with “singular_type”?
A singular type includes packed arrays
(and structures) and all other data types except unpacked structures, unpacked
arrays, and chandles.
Editor’s Note: The paragraph above is
only definition of “singular” that I could find, outside of the BNF. The term
should be defined in its own subsection, probably in 3.3.x, and the BNF
included in that definition. A reference to that defining subsection should
then be added to the preceding paragraph.