File: cpp_numbers.cpp

package info (click to toggle)
vim 2%3A9.1.2103-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 93,456 kB
  • sloc: ansic: 433,730; cpp: 6,399; makefile: 4,597; sh: 2,397; java: 2,312; xml: 2,099; python: 1,595; perl: 1,419; awk: 730; lisp: 501; cs: 458; objc: 369; sed: 8; csh: 6; haskell: 1
file content (20 lines) | stat: -rw-r--r-- 410 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
void foo()
{
    {
        // See https://en.cppreference.com/w/cpp/language/floating_literal
        double a = 1.0E2;
        double b = 1.0e2;
        double c = 1E2;
        double d = 1e2;

        double e = 0X1ffp10;
        double f = 0x1ffp10;
    }

    // See: https://en.cppreference.com/w/cpp/language/integer_literal
    int a = 0X123;
    int b = 0x123;

    int c = 0B101;
    int d = 0b101;
}