Ignore:
Timestamp:
Jan 8, 2016, 10:37:10 PM (9 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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:
61f9356
Parents:
1cced28
Message:

fix recursive include bug in shadow includes, major clean of examples, add several long long routines to prelude

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/examples/identity.c

    r1cced28 r784deab  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed May 27 18:16:30 2015
    13 // Update Count     : 2
     12// Last Modified On : Mon Jan  4 23:38:05 2016
     13// Update Count     : 6
    1414//
    1515
     
    2323int main() {
    2424        ofstream *sout = ofstream_stdout();
    25         char c = 'a';
    26         c = identity( c );
    27         sout << c << ' ' << identity( c ) << '\n';
    28         int i = 5;
    29         i = identity( i );
    30         sout << i << ' ' << identity( i ) << '\n';
    31         double d = 3.2;
    32         d = identity( d );
    33         sout << d << ' ' << identity( d ) << '\n';
     25        sout | "char\t\t\t"                                     | identity( 'z' ) | endl;
     26        sout | "signed int\t\t"                         | identity( 4 ) | endl;
     27        sout | "unsigned int\t\t"                       | identity( 4u ) | endl;
     28        sout | "signed long int\t\t"            | identity( 4l ) | endl;
     29        sout | "unsigned long int\t"            | identity( 4ul ) | endl;
     30        sout | "signed long long int\t"         | identity( 4ll ) | endl;
     31        sout | "unsigned long long int\t"       | identity( 4ull ) | endl;
     32        sout | "float\t\t\t"                            | identity( 4.0f ) | endl;
     33        sout | "double\t\t\t"                           | identity( 4.0 ) | endl;
     34        sout | "long double\t\t"                        | identity( 4.0l ) | endl;
    3435}
    3536
    3637// Local Variables: //
    3738// tab-width: 4 //
    38 // compile-command: "cfa identity.c fstream.o iostream.o" //
     39// compile-command: "cfa identity.c fstream.o iostream.o iterator.o" //
    3940// End: //
Note: See TracChangeset for help on using the changeset viewer.