Ignore:
Timestamp:
Feb 17, 2016, 2:22:22 PM (8 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:
658f6de0
Parents:
52f85e0
Message:

major rewrite of I/O library and update example programs to use new I/O

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/examples/identity.c

    r52f85e0 r6ba0659  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Jan 26 17:11:58 2016
    13 // Update Count     : 8
     12// Last Modified On : Wed Feb 17 12:17:32 2016
     13// Update Count     : 10
    1414//
    1515
     
    2222
    2323int main() {
    24         ofstream *sout = ofstream_stdout();
    2524        sout | "char\t\t\t"                                     | identity( 'z' ) | endl;
    2625        sout | "signed int\t\t"                         | identity( 4 ) | endl;
     
    3029        sout | "signed long long int\t"         | identity( 4ll ) | endl;
    3130        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;
     31        sout | "float\t\t\t"                            | identity( 4.1f ) | endl;
     32        sout | "double\t\t\t"                           | identity( 4.1 ) | endl;
     33        sout | "long double\t\t"                        | identity( 4.1l ) | endl;
    3534}
    3635
Note: See TracChangeset for help on using the changeset viewer.