Changeset c40a982
- Timestamp:
- Jul 2, 2024, 2:33:25 PM (3 months ago)
- Branches:
- master
- Children:
- bc48c0d
- Parents:
- 7f8c232
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/jiada_liang_MMath/test1.cfa
r7f8c232 rc40a982 34 34 enum() Mode { O_RDONLY, O_WRONLY, O_CREAT, O_TRUNC, O_APPEND }; 35 35 Mode iomode = O_RDONLY; 36 bool b = iomode == O_RDONLY || iomode < O_APPEND; 37 int www = iomode; 36 //bool b = iomode == O_RDONLY || iomode < O_APPEND; // disallowed 37 //int www = iomode; // disallowed 38 38 39 39 enum( char * ) Colour { Red = "red", Green = "green", Blue = "blue" }; … … 45 45 //greek = A; // disallowed 46 46 47 for ( Greek l = Alph; pos E(l) <= posE(Gamma); l = succ( l ) ) {48 printf( "%s %c %d\n", label E( l ), valueE( l ), posE( l ) );47 for ( Greek l = Alph; posn(l) <= posn(Gamma); l = succ( l ) ) { 48 printf( "%s %c %d\n", label( l ), value( l ), posn( l ) ); 49 49 } 50 for ( Currency c = Dollar; pos E(c) <= posE(Currency.Euro); c = succ( c ) ) {51 printf( "%s %c %d\n", label E( c ), valueE( c ), posE( c ) );50 for ( Currency c = Dollar; posn(c) <= posn(Currency.Euro); c = succ( c ) ) { 51 printf( "%s %c %d\n", label( c ), value( c ), posn( c ) ); 52 52 } 53 53 } … … 58 58 enum( char * ) Names3 { inline Names2, Sue = "SUE", Tom = "TOM" }; 59 59 60 void f( Names n ) { sout | "Name" | pos E( n ); }60 void f( Names n ) { sout | "Name" | posn( n ); } 61 61 void g( Names2 ); 62 62 void h( Names3 ); … … 84 84 // f( name ); 85 85 86 int jane_pos = pos E( Names.Jane );87 char * jane_value = value E( Names.Jane );88 char * jane_label = label E( Names.Jane );89 sout | Names.Jane | pos E( Names.Jane) | labelE( Names.Jane ) | valueE( Names.Jane );86 int jane_pos = posn( Names.Jane ); 87 char * jane_value = value( Names.Jane ); 88 char * jane_label = label( Names.Jane ); 89 sout | Names.Jane | posn( Names.Jane) | label( Names.Jane ) | value( Names.Jane ); 90 90 }
Note: See TracChangeset
for help on using the changeset viewer.