//
// 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 : Rob Schluntz
// Last Modified On : Fri Sep 01 15:22:19 2017
// Update Count     : 14
//

#include <fstream>

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 ) {
		sout | "x != 0 && y != 0 incorrect" | endl;
	} else if ( int x = 4, y = 1 ) {
		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: //
