Ignore:
Timestamp:
Jul 10, 2020, 11:42:41 AM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
20ab637, 2fc94ced, fb98462
Parents:
732b406 (diff), 49cad912 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/manipulatorsOutput3.cfa

    r732b406 r3a32b3a  
    1313    sout | sign(x);
    1414    sout | nl;
    15 #if 1
     15
    1616    sout | bin(x);
    1717    sout | upcase(bin(x));
     
    124124    sout | nl;
    125125
    126    
     126
     127    // extras
     128    sout | "extras";
    127129    sout | bin(divisor);
    128130    sout | upcase(bin(divisor));
     
    140142    sout | left(sign(wd(0,40, divisor))) | 'X';
    141143    printf( "%-+1.40dX\n", 123456789 );
    142 #endif // 0
     144
     145    int128 i128;
     146    unsigned int128 ui128;
     147
     148    i128 = -10;
     149    for ( 25 ) {
     150        sout | left( sign( wd( 20, i128 ) ) ) | left( wd( 20, hex( i128 ) ) ) | left( wd( 20, oct( i128 ) ) );
     151        sout | left( wd( 20, bin( i128 ) ) );
     152        i128 += 1;
     153    }
     154    sout | nl;
     155
     156    i128 = 0x7fffffffffffffff;
     157    i128 <<= 64;
     158    i128 += 0xfffffffffffffffa;
     159
     160    for ( 20 ) {
     161        sout | i128;
     162        sout | left( sign( wd( 45, i128 ) ) ) | left( wd( 45, hex( i128 ) ) ) | left( wd( 45, oct( i128 ) ) );
     163        sout | left( wd( 45, bin( i128 ) ) );
     164        i128 += 1;
     165    }
     166    sout | nl;
     167
     168    ui128 = 0x7fffffffffffffff;
     169    ui128 <<= 64;
     170    ui128 += 0xfffffffffffffffa;
     171   
     172    for ( 20 ) {
     173        sout | ui128;
     174        ui128 += 1;
     175    }
     176    sout | nl;
     177
     178    ui128 = 0xffffffffffffffff;
     179    ui128 <<= 64;
     180    ui128 += 0xfffffffffffffffa;
     181   
     182    for ( 20 ) {
     183        sout | ui128;
     184        ui128 += 1;
     185    }
    143186}
Note: See TracChangeset for help on using the changeset viewer.