Changes in / [6acd020:d2260ad]


Ignore:
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/fstream.hfa

    r6acd020 rd2260ad  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Apr 28 20:37:57 2021
    13 // Update Count     : 230
     12// Last Modified On : Tue Jul 20 21:18:03 2021
     13// Update Count     : 232
    1414//
    1515
     
    148148
    149149
    150 EHM_EXCEPTION(Open_Failure)(
     150exception Open_Failure {
    151151        union {
    152152                ofstream * ostream;
     
    155155        // TEMPORARY: need polymorphic exceptions
    156156        int tag;                                                                                        // 1 => ostream; 0 => istream
    157 );
     157};
    158158
    159159void ?{}( Open_Failure & this, ofstream & );
  • tests/counter.cfa

    r6acd020 rd2260ad  
    1010// Created On       : Thu Feb 22 15:27:00 2018
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Nov  6 17:50:23 2018
    13 // Update Count     : 2
     12// Last Modified On : Tue Jul 20 21:25:30 2021
     13// Update Count     : 4
    1414//
     15
     16#include <fstream.hfa>
    1517
    1618// Tests unified increment/decrement builtin functions.
     
    1921struct counter { int x; };
    2022
    21 counter& ?+=?( counter& c, one_t ) { ++c.x; return c; }
    22 
    23 counter& ?-=?( counter& c, one_t ) { --c.x; return c; }
     23counter ?+=?( counter & c, one_t ) { ++c.x; return c; }
     24counter ?-=?( counter & c, one_t ) { --c.x; return c; }
    2425
    2526int main() {
     
    2829    ++c;
    2930    c++;
    30     printf("%d\n", c.x);
     31    sout | "inc" | c.x;
    3132    c -= 1;
    3233    --c;
    3334    c--;
    34     printf("%d\n", c.x);
     35    sout | "dec" | c.x;
    3536}
    3637
Note: See TracChangeset for help on using the changeset viewer.