Changes in src/examples/twice.c [86bd7c1f:843054c2]
- File:
-
- 1 edited
-
src/examples/twice.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/examples/twice.c
r86bd7c1f r843054c2 1 //2 // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo3 //4 // The contents of this file are covered under the licence agreement in the5 // file "LICENCE" distributed with Cforall.6 //7 // twice.c --8 //9 // Author : Richard C. Bilson10 // Created On : Wed May 27 17:56:53 201511 // Last Modified By : Peter A. Buhr12 // Last Modified On : Wed May 27 18:37:23 201513 // Update Count : 114 //15 16 1 #include "fstream.h" 17 2 18 3 forall( type T | { T ?+?( T, T ); T ?++( T * ); [T] ?+=?( T *, T ); } ) 19 4 T twice( const T t ) { 20 return t + t;5 return t + t; 21 6 } 22 7 23 8 int main() { 24 ofstream *sout = ofstream_stdout();25 sout << twice( 1 ) << ' ' << twice( 3.2 ) << '\n';9 ofstream *sout = ofstream_stdout(); 10 sout << twice( 1 ) << ' ' << twice( 3.2 ) << '\n'; 26 11 } 27 12 28 13 // Local Variables: // 29 // tab-width: 4 // 30 // compile-command: "cfa twice.c fstream.o iostream.o" // 14 // compile-command: "../../bin/cfa twice.c fstream.o iostream.o" // 31 15 // End: //
Note:
See TracChangeset
for help on using the changeset viewer.