Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/rational.cfa

    ref346f7c r58b6d1b  
    1010// Created On       : Wed Apr  6 17:54:28 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Dec 23 22:56:49 2018
    13 // Update Count     : 170
     12// Last Modified On : Sat Jun  2 09:24:33 2018
     13// Update Count     : 162
    1414//
    1515
     
    3535        static RationalImpl simplify( RationalImpl & n, RationalImpl & d ) {
    3636                if ( d == (RationalImpl){0} ) {
    37                         serr | "Invalid rational number construction: denominator cannot be equal to 0.";
     37                        serr | "Invalid rational number construction: denominator cannot be equal to 0." | endl;
    3838                        exit( EXIT_FAILURE );
    3939                } // exit
     
    175175        } // ?|?
    176176
    177         forall( dtype ostype | ostream( ostype ) | { ostype & ?|?( ostype &, RationalImpl ); } ) {
    178                 ostype & ?|?( ostype & os, Rational(RationalImpl) r ) {
    179                         return os | r.numerator | '/' | r.denominator;
    180                 } // ?|?
    181 
    182                 void ?|?( ostype & os, Rational(RationalImpl) r ) {
    183                         (ostype &)(os | r); nl( os );
    184                 } // ?|?
    185         } // distribution
     177        forall( dtype ostype | ostream( ostype ) | { ostype & ?|?( ostype &, RationalImpl ); } )
     178        ostype & ?|?( ostype & os, Rational(RationalImpl ) r ) {
     179                return os | r.numerator | '/' | r.denominator;
     180        } // ?|?
    186181} // distribution
    187182
Note: See TracChangeset for help on using the changeset viewer.