Changeset f80e0218 for src/tests/io.c
- Timestamp:
- Jun 30, 2016, 4:32:56 PM (10 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, with_gc
- Children:
- ea29e73
- Parents:
- 1b5c81ed (diff), 84d4d6f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 moved
-
src/tests/io.c (moved) (moved from src/examples/io.c ) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/tests/io.c
r1b5c81ed rf80e0218 11 11 // Created On : Wed Mar 2 16:56:02 2016 12 12 // Last Modified By : Peter A. Buhr 13 // Last Modified On : Wed Apr 6 14:58:27201614 // Update Count : 1513 // Last Modified On : Wed Jun 8 22:52:04 2016 14 // Update Count : 30 15 15 // 16 16 … … 35 35 char s1[10], s2[10]; 36 36 37 int x = 3, y = 5, z = 7; 38 sout | x * 3 | y + 1 | z << 2 | x == y | (x | y) | (x || y) | (x > z ? 1 : 2) | endl; 39 sout | 1 | 2 | 3 | endl; 40 sout | '1' | '2' | '3' | endl; 41 sout | 1 | "" | 2 | "" | 3 | endl; 42 sout | endl; 43 37 44 ifstream in; // create / open file 38 open( &in, "i nput.data", "r" );45 open( &in, "io.data", "r" ); 39 46 40 47 &in | &c // character … … 52 59 | sepDisable | fc | dc | ldc | sepEnable | endl // complex without separator 53 60 | sepOn | s1 | sepOff | s2 | endl // local separator removal 54 | s1 | "" | s2 | endl; // C string withou separator61 | s1 | "" | s2 | endl; // C string without separator 55 62 sout | endl; 56 63 … … 59 66 | fc | dc | ldc | endl // complex without separator 60 67 | s1 | s2 | endl; 68 sout | endl; 69 sepSet( sout, " " ); 70 71 sout 72 // opening delimiters 73 | "v(" | 27 74 | "v[" | 27 75 | "v{" | 27 76 | "$" | 27 77 | "£" | 27 78 | "¥" | 27 79 | "¡" | 27 80 | "¿" | 27 81 | "«" | 27 82 | endl 83 // closing delimiters 84 | 25 | "," 85 | 25 | "." 86 | 25 | ":" 87 | 25 | ";" 88 | 25 | "!" 89 | 25 | "?" 90 | 25 | ")" 91 | 25 | "]" 92 | 25 | "}" 93 | 25 | "%" 94 | 25 | "¢" 95 | 25 | "»" 96 | endl 97 // opening-closing delimiters 98 | 25 | "'" | 27 99 | 25 | "`" | 27 100 | 25 | "\"" | 27 101 | 25 | " " | 27 102 | 25 | "\f" | 27 103 | 25 | "\n" | 27 104 | 25 | "\r" | 27 105 | 25 | "\t" | 27 106 | 25 | "\v" | 27 107 | endl; 61 108 } 62 109
Note:
See TracChangeset
for help on using the changeset viewer.