Changeset 90c3b1c for src/examples/ato.c


Ignore:
Timestamp:
Mar 2, 2016, 4:59:19 PM (7 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
aaron-thesis, arm-eh, 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:
bdad1679
Parents:
ac1ed49
Message:

compile CFA with C++11, further update refrat with lstlisting macros, support varags, enumeration initialization, add implicit separators to output streams, update example programs that print

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/examples/ato.c

    rac1ed49 r90c3b1c  
    1111// Created On       : Thu Feb  4 08:10:57 2016
    1212// Last Modified By : Peter A. Buhr
    13 // Last Modified On : Wed Feb 17 11:44:03 2016
    14 // Update Count     : 42
     13// Last Modified On : Mon Feb 29 17:57:35 2016
     14// Update Count     : 44
    1515//
    1616
     
    2424int main( void ) {
    2525        int i = ato( "-123" );
    26         sout | i | ' ' | "-123" | endl;
     26        sout | i | "-123" | endl;
    2727        unsigned int ui = ato( "123" );
    28         sout | ui | ' ' | "123" | endl;
     28        sout | ui | "123" | endl;
    2929        long int li = ato( "-123" );
    30         sout | li | ' ' | "-123" | endl;
     30        sout | li | "-123" | endl;
    3131        unsigned long int uli = ato( "123" );
    32         sout | uli | ' ' | "123" | endl;
     32        sout | uli | "123" | endl;
    3333        long long int lli = ato( "-123" );
    34         sout | lli | ' ' | "-123" | endl;
     34        sout | lli | "-123" | endl;
    3535        unsigned long long int ulli = ato( "123" );
    36         sout | ulli | ' ' | "123" | endl;
     36        sout | ulli | "123" | endl;
    3737        float f = ato( "-123.456" );
    38         sout | f | ' ' | "-123.456" | endl;
     38        sout | f | "-123.456" | endl;
    3939        double d = ato( "-123.4567890123456" );
    40         sout | d | ' ' | "-123.4567890123456" | endl;
     40        sout | d | "-123.4567890123456" | endl;
    4141        long double ld = ato( "-123.45678901234567890123456789" );
    42         sout | ld | ' ' | "-123.45678901234567890123456789" | endl;
     42        sout | ld | "-123.45678901234567890123456789" | endl;
    4343        float _Complex fc = ato( "-123.456-123.456i" );
    44         sout | fc | ' ' | "-123.456-123.456i" | endl;
     44        sout | fc | "-123.456-123.456i" | endl;
    4545        double _Complex dc = ato( "-123.4567890123456+123.4567890123456i" );
    46         sout | dc | ' ' | "-123.4567890123456+123.4567890123456i" | endl;
     46        sout | dc | "-123.4567890123456+123.4567890123456i" | endl;
    4747        long double _Complex ldc = ato( "123.45678901234567890123456789-123.45678901234567890123456789i" );
    48         sout | ldc | ' ' | "123.45678901234567890123456789-123.45678901234567890123456789i" | endl;
     48        sout | ldc | "123.45678901234567890123456789-123.45678901234567890123456789i" | endl;
    4949        long double _Complex ldc2 = ato( "123.45678901234-123.4567890i" );
    50         sout | ldc2 | ' ' | "123.45678901234567890123456789-123.45678901234567890123456789i" | endl;
     50        sout | ldc2 | "123.45678901234-123.4567890i" | endl;
    5151} // main
    5252
Note: See TracChangeset for help on using the changeset viewer.