source: src/examples/twice.c @ 6244dfb

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newstringwith_gc
Last change on this file since 6244dfb was 843054c2, checked in by Peter A. Buhr <pabuhr@…>, 9 years ago

licencing: seventh groups of files

  • Property mode set to 100644
File size: 351 bytes
RevLine 
[42dcae7]1#include "fstream.h"
2
3forall( type T | { T ?+?( T, T ); T ?++( T * ); [T] ?+=?( T *, T ); } )
4T twice( const T t ) {
5    return t + t;
6}
7
8int main() {
9    ofstream *sout = ofstream_stdout();
10    sout << twice( 1 ) << ' ' << twice( 3.2 ) << '\n';
11}
12
13// Local Variables: //
14// compile-command: "../../bin/cfa twice.c fstream.o iostream.o" //
15// End: //
Note: See TracBrowser for help on using the repository browser.