// -*- Mode: C -*- // // Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo // // The contents of this file are covered under the licence agreement in the // file "LICENCE" distributed with Cforall. // // ifcond.c -- // // Author : Peter A. Buhr // Created On : Sat Aug 26 10:13:11 2017 // Last Modified By : Peter A. Buhr // Last Modified On : Tue Aug 29 08:25:02 2017 // Update Count : 12 // #include int f( int r ) { return r; } int main( void ) { int x = 4, y = 3; if ( int x = 1 ) { sout | "x != 0 correct" | endl; } else { sout | "x == 0 incorrect" | endl; } // if if ( int x = 4, y = 0 ) { // FIXME && distribution sout | "x != 0 && y != 0 correct" | endl; } else { sout | "x != 0 && y == 0 incorrect" | endl; } // if if ( int x = 5, y = f( x ); x == y ) { sout | "x == y correct" | endl; } else { sout | "x != y incorrect" | endl; } // if } // main // Local Variables: // // tab-width: 4 // // compile-command: "cfa ifcond.c" // // End: //