Changeset e99e43f for examples/square.c
- Timestamp:
- Jan 10, 2019, 3:50:34 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- d97c3a4
- Parents:
- aeb8f70 (diff), 08222c7 (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. - git-author:
- Aaron Moss <a3moss@…> (01/10/19 14:46:09)
- git-committer:
- Aaron Moss <a3moss@…> (01/10/19 15:50:34)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/square.c
raeb8f70 re99e43f 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Mar 8 22:05:48 201613 // Update Count : 2 712 // Last Modified On : Tue Dec 11 23:28:24 2018 13 // Update Count : 28 14 14 // 15 15 … … 23 23 int main() { 24 24 #if 0 25 sout | "result of squaring 9 is " | endl;25 sout | "result of squaring 9 is "; 26 26 27 27 // char does not have multiplication. … … 30 30 } // ?*? 31 31 char c = 9; 32 sout | "char\t\t\t" | square( c ) | endl;32 sout | "char\t\t\t" | square( c ); 33 33 34 sout | square( s ) | endl;34 sout | square( s ); 35 35 #endif 36 36 short s = 9; … … 38 38 #if 0 39 39 signed int i = 9; 40 sout | "signed int\t\t" | square( i ) | endl;40 sout | "signed int\t\t" | square( i ); 41 41 42 42 unsigned int ui = 9; 43 sout | "unsigned int\t\t" | square( ui ) | endl;43 sout | "unsigned int\t\t" | square( ui ); 44 44 45 45 long int li = 9; 46 sout | "signed long int\t\t" | square( li ) | endl;46 sout | "signed long int\t\t" | square( li ); 47 47 48 48 unsigned long int uli = 9; 49 sout | "unsigned long int\t" | square( uli ) | endl;49 sout | "unsigned long int\t" | square( uli ); 50 50 51 51 signed long long int lli = 9; 52 sout | "signed long long int\t" | square( lli ) | endl;52 sout | "signed long long int\t" | square( lli ); 53 53 54 54 unsigned long long int ulli = 9; 55 sout | "unsigned long long int\t" | square( ulli ) | endl;55 sout | "unsigned long long int\t" | square( ulli ); 56 56 57 57 float f = 9.0; 58 sout | "float\t\t\t" | square( f ) | endl;58 sout | "float\t\t\t" | square( f ); 59 59 60 60 double d = 9.0; 61 sout | "double\t\t\t" | square( d ) | endl;61 sout | "double\t\t\t" | square( d ); 62 62 63 63 long double ld = 9.0; 64 sout | "long double\t\t" | square( ld ) | endl;64 sout | "long double\t\t" | square( ld ); 65 65 #endif 66 66 } // main
Note:
See TracChangeset
for help on using the changeset viewer.