File: number-literals.txt

package info (click to toggle)
highlight.js 10.7.3%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,332 kB
  • sloc: javascript: 41,059; makefile: 157; python: 29; sh: 20
file content (11 lines) | stat: -rw-r--r-- 528 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
/* digit separators */
int number = 2'555'555'555; // digit separators
float exponentFloat = .123'456e3'000; // digit separators in floats
float suffixed = 3.000'001'234f // digit separators in suffixed numbers
char word[] = { '3', '\0' }; // make sure digit separators don't mess up chars
float negative = -123.0f; // negative floating point numbers

/* literal suffixes: these are to be highlighted as numbers */
90ll 90LL 90u 90U 90l 90L
90ul 90ul 90Ul 90UL 90lu 90lU 90Lu 90LU
90ull 90uLL 90Ull 90ULL 90llu 90llU 90LLu 90LLU