Changeset a61fea9a for src/examples
- Timestamp:
- Jun 4, 2015, 11:35:13 AM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- 9a8930f
- Parents:
- 30651b0
- Location:
- src/examples
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/examples/control_structures.c
r30651b0 ra61fea9a 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed May 27 18:07:42 201513 // Update Count : 112 // Last Modified On : Thu Jun 4 11:21:12 2015 13 // Update Count : 23 14 14 // 15 15 16 16 int main() { 17 17 L1: { 18 L2: switch ( 3_333_333 ) { // underscores in constant 19 case 1,2,3: // 4~8, 4...8 not working 18 L2: switch ( 3_333_333 ) { // underscores in constant 19 case 1,2,3: // CFA 20 case 4~8: // CFA 21 case 9 ... 10: // gcc, must have spaces 20 22 L3: for ( ;; ) { 21 23 L4: for ( ;; ) { … … 24 26 break L3; 25 27 break L4; 26 27 28 //continue L1; // labelled continue - should be an error 28 29 //continue L2; // should be an error … … 38 39 int i, j; 39 40 choose ( 7 ) { 40 case 1,2,3: 41 i = 3; 42 fallthru; 43 case 4,5,6: 44 j = 3; 45 default: ; 41 case 1,2,3: 42 i = 3; 43 4; 44 fallthru; 45 case 4,5,6: 46 j = 3; 47 default: ; 46 48 } // choose 47 49 } // block -
src/examples/includes.c
r30651b0 ra61fea9a 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed May 27 18:17:04201513 // Update Count : 112 // Last Modified On : Wed Jun 3 23:48:26 2015 13 // Update Count : 6 14 14 // 15 15 … … 49 49 #include <curses.h> 50 50 #else 51 #include < time.h> // FAILS -- includes locale.h51 #include <curses.h> 52 52 #endif // 0 53 53
Note: See TracChangeset
for help on using the changeset viewer.