Changeset 134b86a for translator/examples/hello.c
- Timestamp:
- Nov 3, 2014, 4:38:08 PM (10 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- 8c17ab0
- Parents:
- 93885663
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
translator/examples/hello.c
r93885663 r134b86a 3 3 // "cfa hello.i fstream.i iostream.o" 4 4 5 extern "C" {6 int printf( const char*, ... );7 }8 9 5 #include "fstream.h" 10 6 11 7 int main() { 12 ofstream *sout = ofstream_stdout(); 13 write( sout, "test\n", 5 ); 14 sout << "Bonjour au monde!\n"; 15 return 0; 8 ofstream *sout = ofstream_stdout(); 9 ifstream *sin = ifstream_stdin(); 10 sout << "Bonjour au monde!\n"; 11 sout << 3 << " " << 3.5 << " " << 'a' << " " << "abc" << "\n"; 12 int i, j, k; 13 sin >> &i >> &j >> &k; 14 sout << "i:" << i << " j:" << j << " k:" << k << "\n"; 16 15 }
Note: See TracChangeset
for help on using the changeset viewer.