- Timestamp:
- Mar 26, 2019, 5:59:05 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 7726839
- Parents:
- 980aa4a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/math1.cfa
r980aa4a rc274df2 10 10 // Created On : Fri Apr 22 14:59:21 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Dec 12 16:28:49 201813 // Update Count : 8912 // Last Modified On : Mon Mar 25 22:56:47 2019 13 // Update Count : 109 14 14 // 15 15 … … 49 49 unsigned int e = 2; 50 50 b \= e; 51 sout | "\\" | b | b \ e; 52 sout | "\\" | 'a' \ 3u | 2 \ 8u | 4 \ 3u | -4 \ 3u | nonl; 51 sout | b | "\\" | e | "= " | b \ e; 52 sout | 'a' \ 3 | 2 \ 8 | 4 \ 3 | -4 \ 3 | 4 \ -3 | -4 \ -3; 53 sout | 4.0 \ -3 | -4.0 \ -3 | 4.0 \ 2.1 | (1.0f+2.0fi) \ (3.0f+2.0fi); 53 54 sout | 4 \ -3 | -4 \ -3 | 4.0 \ 2.1 | (1.0f+2.0fi) \ (3.0f+2.0fi); 55 56 struct S { int i; }; 57 double ?*?( double d, S s ) { return d * s.i; } 58 double ?/?( double d, S s ) { return d / s.i; } 59 S ?\?( S s, unsigned long y ) { return (S){ s.i \ y }; } 60 ofstream & ?|?( ofstream & os, S s ) { return os | s.i; } 61 void ?|?( ofstream & os, S s ) { (ofstream &)(os | s); nl( os ); } 62 S s = { 4 }; 63 S x = s \ 2; 64 sout | x; 65 sout | s.i | s \ 2u; 54 66 } // main 55 67
Note: See TracChangeset
for help on using the changeset viewer.