ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change
on this file since e5fccf4 was
e5fccf4,
checked in by Peter A. Buhr <pabuhr@…>, 7 years ago
|
remove redundant Mode in header comments
|
-
Property mode set to
100644
|
File size:
1014 bytes
|
Rev | Line | |
---|
[377e33f] | 1 | // |
---|
[96ff407] | 2 | // Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo |
---|
[377e33f] | 3 | // |
---|
| 4 | // The contents of this file are covered under the licence agreement in the |
---|
| 5 | // file "LICENCE" distributed with Cforall. |
---|
| 6 | // |
---|
| 7 | // ifcond.c -- |
---|
| 8 | // |
---|
| 9 | // Author : Peter A. Buhr |
---|
| 10 | // Created On : Sat Aug 26 10:13:11 2017 |
---|
| 11 | // Last Modified By : Peter A. Buhr |
---|
[e5fccf4] | 12 | // Last Modified On : Wed Aug 30 07:55:24 2017 |
---|
| 13 | // Update Count : 13 |
---|
[377e33f] | 14 | // |
---|
| 15 | |
---|
| 16 | #include<fstream> |
---|
| 17 | |
---|
| 18 | int f( int r ) { return r; } |
---|
| 19 | |
---|
| 20 | int main( void ) { |
---|
| 21 | int x = 4, y = 3; |
---|
| 22 | |
---|
| 23 | if ( int x = 1 ) { |
---|
| 24 | sout | "x != 0 correct" | endl; |
---|
| 25 | } else { |
---|
| 26 | sout | "x == 0 incorrect" | endl; |
---|
| 27 | } // if |
---|
| 28 | |
---|
| 29 | if ( int x = 4, y = 0 ) { // FIXME && distribution |
---|
| 30 | sout | "x != 0 && y != 0 correct" | endl; |
---|
| 31 | } else { |
---|
| 32 | sout | "x != 0 && y == 0 incorrect" | endl; |
---|
| 33 | } // if |
---|
| 34 | |
---|
| 35 | if ( int x = 5, y = f( x ); x == y ) { |
---|
| 36 | sout | "x == y correct" | endl; |
---|
| 37 | } else { |
---|
| 38 | sout | "x != y incorrect" | endl; |
---|
| 39 | } // if |
---|
| 40 | } // main |
---|
| 41 | |
---|
| 42 | // Local Variables: // |
---|
| 43 | // tab-width: 4 // |
---|
| 44 | // compile-command: "cfa ifcond.c" // |
---|
| 45 | // End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.