source: tests/abs.c @ 031a88a9

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resnenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprno_listpersistent-indexerpthread-emulationqualifiedEnum
Last change on this file since 031a88a9 was 73abe95, checked in by Thierry Delisle <tdelisle@…>, 6 years ago

Replace extension-less headers with .hfa

  • Property mode set to 100644
File size: 1.3 KB
RevLine 
[d3b7937]1//
2// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
3//
4// The contents of this file are covered under the licence agreement in the
5// file "LICENCE" distributed with Cforall.
6//
[73abe95]7// abs.c --
[d3b7937]8//
9// Author           : Peter A. Buhr
10// Created On       : Thu Jan 28 18:26:16 2016
11// Last Modified By : Peter A. Buhr
[9d169f1]12// Last Modified On : Wed Feb 22 22:31:03 2017
13// Update Count     : 52
[d3b7937]14//
15
[73abe95]16#include <fstream.hfa>
17#include <stdlib.hfa>                                                                           // abs
[d3b7937]18
19int main( void ) {
[9d169f1]20        signed char ch = -65;
[5721a6d]21        sout | "char\t\t\t"                                     | ch     | "\tabs " | abs( ch ) | endl;
[90c3b1c]22        sout | "signed int\t\t"                         | -65    | "\tabs" | abs( -65 ) | endl;
23        sout | "signed long int\t\t"            | -65l   | "\tabs" | abs( -65l ) | endl;
24        sout | "signed long long int\t"         | -65ll  | "\tabs" | abs( -65ll ) | endl;
25        sout | "float\t\t\t"                            | -65.0f | "\tabs" | abs( -65.0f ) | endl;
26        sout | "double\t\t\t"                           | -65.0  | "\tabs" | abs( -65.0 ) | endl;
27        sout | "long double\t\t"                        | -65.0l | "\tabs" | abs( -65.0l ) | endl;
28        sout | "float _Complex\t\t"                     | -65.0F-2.0iF | "\tabs" | abs( -65.0F-2.0iF ) | endl;
29        sout | "double _Complex\t\t"            | -65.0D-2.0iD | "\tabs" | abs( -65.0D-2.0iD ) | endl;
30        sout | "long double _Complex\t"         | -65.0L-2.0iL | "\tabs" | abs( -65.0L-2.0iL ) | endl;
[d3b7937]31} // main
32
33// Local Variables: //
34// tab-width: 4 //
35// compile-command: "cfa abs.c" //
36// End: //
Note: See TracBrowser for help on using the repository browser.