// // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo // // The contents of this file are covered under the licence agreement in the // file "LICENCE" distributed with Cforall. // // abs.cfa -- // // Author : Peter A. Buhr // Created On : Thu Jan 28 18:26:16 2016 // Last Modified By : Peter A. Buhr // Last Modified On : Tue Nov 6 17:50:44 2018 // Update Count : 54 // #include #include // abs int main( void ) { signed char ch = -65; sout | "char\t\t\t" | ch | "\tabs " | abs( ch ) | endl; sout | "signed int\t\t" | -65 | "\tabs" | abs( -65 ) | endl; sout | "signed long int\t\t" | -65l | "\tabs" | abs( -65l ) | endl; sout | "signed long long int\t" | -65ll | "\tabs" | abs( -65ll ) | endl; sout | "float\t\t\t" | -65.0f | "\tabs" | abs( -65.0f ) | endl; sout | "double\t\t\t" | -65.0 | "\tabs" | abs( -65.0 ) | endl; sout | "long double\t\t" | -65.0l | "\tabs" | abs( -65.0l ) | endl; sout | "float _Complex\t\t" | -65.0F-2.0iF | "\tabs" | abs( -65.0F-2.0iF ) | endl; sout | "double _Complex\t\t" | -65.0D-2.0iD | "\tabs" | abs( -65.0D-2.0iD ) | endl; sout | "long double _Complex\t" | -65.0L-2.0iL | "\tabs" | abs( -65.0L-2.0iL ) | endl; } // main // Local Variables: // // tab-width: 4 // // compile-command: "cfa abs.cfa" // // End: //