Changeset 36ebd03 for src/examples/swap.c
- Timestamp:
- Mar 3, 2016, 1:28: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, string, with_gc
- Children:
- 3627356
- Parents:
- 9d7b3ea (diff), 4040425 (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 edited
Legend:
- Unmodified
- Added
- Removed
-
src/examples/swap.c
r9d7b3ea r36ebd03 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Feb 17 12:22:12201613 // Update Count : 6 412 // Last Modified On : Wed Mar 2 16:15:11 2016 13 // Update Count : 65 14 14 // 15 15 … … 54 54 55 55 float f1 = 1.5, f2 = 2.5; 56 sout | "float\t\t\t" | f1 | ' ' | f2 | "\t\t \tswap ";56 sout | "float\t\t\t" | f1 | ' ' | f2 | "\t\tswap "; 57 57 swap( &f1, &f2 ); 58 58 sout | '\t' | f1 | ' ' | f2 | endl; 59 59 60 60 double d1 = 1.5, d2 = 2.5; 61 sout | "double\t\t\t" | d1 | ' ' | d2 | "\t\t \tswap ";61 sout | "double\t\t\t" | d1 | ' ' | d2 | "\t\tswap "; 62 62 swap( &d1, &d2 ); 63 63 sout | '\t' | d1 | ' ' | d2 | endl; 64 64 65 65 long double ld1 = 1.5, ld2 = 2.5; 66 sout | "long double\t\t" | ld1 | ' ' | ld2 | "\t\t \tswap ";66 sout | "long double\t\t" | ld1 | ' ' | ld2 | "\t\tswap "; 67 67 swap( &ld1, &ld2 ); 68 68 sout | '\t' | ld1 | ' ' | ld2 | endl;
Note:
See TracChangeset
for help on using the changeset viewer.