Ignore:
Timestamp:
May 12, 2024, 8:42:31 PM (8 weeks ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
bf4fe05
Parents:
07e9df1
Message:

small updates, and more proofreading of the related-works chapter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/jiada_liang_MMath/background.tex

    r07e9df1 rec20ab9  
    7474However, it is restricted to integral values.
    7575\begin{clang}
    76 enum { Size = 20, Max = 10, MaxPlus10 = Max + 10, Max10Plus1, Fred = -7 };
     76enum { Size = 20, Max = 10, MaxPlus10 = Max + 10, @Max10Plus1@, Fred = -7 };
    7777\end{clang}
    7878Here, the aliased constants are: 20, 10, 20, 21, and -7.
    7979Direct initialization is by a compile-time expression generating a constant value.
    80 An enumerator without initialization is \newterm{auto-initialized}: from left to right, starting at zero or the next explicitly initialized constant, incrementing by @1@.
     80Indirect initialization (without initialization, @Max10Plus1@) is \newterm{auto-initialized}: from left to right, starting at zero or the next explicitly initialized constant, incrementing by @1@.
    8181Because multiple independent enumerators can be combined, enumerators with the same values can occur.
    8282The enumerators are rvalues, so assignment is disallowed.
     
    8888\begin{cfa}
    8989typedef struct /* unnamed */  { ... } S;
    90 struct /* unnamed */  { ... } x, y, z;                  $\C{// questionable}$
     90struct /* unnamed */  { ... } x, y, z;  $\C{// questionable}$
    9191struct S {
    92         union /* unnamed */ {                                           $\C{// unscoped fields}$
     92        union /* unnamed */ {                           $\C{// unscoped fields}$
    9393                int i;  double d ;  char ch;
    9494        };
     
    107107enum Week {
    108108        Thu@ = 10@, Fri, Sat, Sun,
    109         Mon@ = 0@, Tue, Wed@,@ }; // terminating comma
     109        Mon@ = 0@, Tue, Wed@,@                  $\C{// terminating comma}$
     110};
    110111\end{clang}
    111112Note, the comma in the enumerator list can be a terminator or a separator, allowing the list to end with a dangling comma.\footnote{
Note: See TracChangeset for help on using the changeset viewer.