Ignore:
Timestamp:
May 6, 2020, 8:54:28 PM (3 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
arm-eh, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
e68d092
Parents:
1488f94
Message:

subdivide long sout prints to improve compilation speed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/manipulatorsOutput3.cfa

    r1488f94 rd6566c1  
    5252    sout | left(wd( 10,40, oct(y) )) | 'X';
    5353
    54     y = 123456789;
     54    y = 01234567;
    5555    sout | left(wd( 45, 49, oct(y) )) | 'X';
     56    y = -y;
     57    sout | wd(0, oct(y)) | 'Y';
     58    sout | left(wd(0, oct(y))) | 'Y';
    5659    sout | nl;
    5760
     
    6669    sout | left(wd( 45,49, upcase(hex(x)) )) | 'X';
    6770
    68     sout | nl | nl;
     71    sout | nl;
    6972
    7073    int128 divisor = 0x4b3b4ca85a86c47a;
    7174    divisor <<= 16;
    7275    divisor += 0x98a224000000000;
     76   
     77    // base 2
     78    sout | "base 2";
     79    sout | bin(divisor);
     80    sout | upcase(bin(divisor));
     81    sout | wd(38, upcase(bin(divisor)));
     82    sout | wd(40, upcase(bin(divisor)));
     83    sout | wd(40, 38, upcase(bin(divisor)));
     84    sout | wd(40, 30, upcase(bin(divisor)));
     85    sout | pad0(sign(wd(40, 38, upcase(bin(divisor)))));
     86    sout | nl;
     87   
     88    // oct
     89    sout | "base 8";
     90    sout | upcase(oct(divisor));
     91    sout | wd(38, upcase(oct(divisor)));
     92    sout | wd(40, upcase(oct(divisor)));
     93    sout | wd(40, 38, upcase(oct(divisor)));
     94    sout | wd(40, 30, upcase(oct(divisor)));
     95    sout | pad0(sign(wd(40, 38, upcase(oct(divisor)))));
     96    sout | nl;
    7397
    74     // base 10
     98    // decimal
     99    sout | "base 10";
    75100    sout | divisor;
    76101    sout | wd(2, divisor);
     
    87112    sout | pad0(wd(40, divisor));
    88113    sout | pad0(sign(wd(40,divisor)));
    89    
    90     // base 2
    91     sout | upcase(bin(divisor));
    92     sout | wd(38, upcase(bin(divisor)));
    93     sout | wd(40, upcase(bin(divisor)));
    94     sout | wd(40, 38, upcase(bin(divisor)));
    95     sout | wd(40, 30, upcase(bin(divisor)));
    96     sout | pad0(sign(wd(40, 38, upcase(bin(divisor)))));
    97    
    98     // oct
    99     sout | upcase(oct(divisor));
    100     sout | wd(38, upcase(oct(divisor)));
    101     sout | wd(40, upcase(oct(divisor)));
    102     sout | wd(40, 38, upcase(oct(divisor)));
    103     sout | wd(40, 30, upcase(oct(divisor)));
    104     sout | pad0(sign(wd(40, 38, upcase(oct(divisor)))));
     114    sout | nl;
    105115   
    106116    // hex
     117    sout | "base 16";
    107118    sout | upcase(hex(divisor));
    108119    sout | wd(38, upcase(hex(divisor)));
     
    111122    sout | wd(40, 30, upcase(hex(divisor)));
    112123    sout | pad0(sign(wd(40, 38, upcase(hex(divisor)))));
     124    sout | nl;
    113125
    114126   
Note: See TracChangeset for help on using the changeset viewer.