File: opinsert.cc

package info (click to toggle)
simrisc 16.05.00-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,568 kB
  • sloc: cpp: 6,877; fortran: 665; makefile: 112; ansic: 112; sh: 107
file content (33 lines) | stat: -rw-r--r-- 727 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//#define XERR
#include "group.ih"

    // by probgroup/insert.cc, agegroupvsd/insert1.cc

std::ostream &operator<<(std::ostream &out, Group const &group)
{
//    out << setw(5);

    Globals::setPrecision(out, 2);

    if (group.d_series == RANGE)
    {
        out << setw(5) << group.d_begin << " - ";   //  << setw(2);

        if (
            Globals::isZero(group.d_end - END_AGE)
            or 
            Globals::isZero(group.d_end - Globals::uint16_max)
        )
            out << " *   ";
        else
            out << group.d_end;
    }
    else if (Globals::isZero(group.d_end - Globals::uint16_max))    // SINGLE
        out << " *   ";
    else
        out << setw(5) << group.d_end;

    return out;
}