35 lines
1.7 KiB
Markdown
35 lines
1.7 KiB
Markdown
[lex.literal.kinds]
|
||
|
||
# 5 Lexical conventions [[lex]](./#lex)
|
||
|
||
## 5.13 Literals [[lex.literal]](lex.literal#kinds)
|
||
|
||
### 5.13.1 Kinds of literals [lex.literal.kinds]
|
||
|
||
[1](#1)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lex.tex#L1146)
|
||
|
||
There are several kinds of literals[.](#1.sentence-1)[14](#footnote-14 "The term âliteralâ generally designates, in this document, those tokens that are called âconstantsâ in C.")
|
||
|
||
[literal:](#nt:literal "5.13.1 Kinds of literals [lex.literal.kinds]")
|
||
[*integer-literal*](lex.icon#nt:integer-literal "5.13.2 Integer literals [lex.icon]")
|
||
[*character-literal*](lex.ccon#nt:character-literal "5.13.3 Character literals [lex.ccon]")
|
||
[*floating-point-literal*](lex.fcon#nt:floating-point-literal "5.13.4 Floating-point literals [lex.fcon]")
|
||
[*string-literal*](lex.string#nt:string-literal "5.13.5 String literals [lex.string]")
|
||
[*boolean-literal*](lex.bool#nt:boolean-literal "5.13.7 Boolean literals [lex.bool]")
|
||
[*pointer-literal*](lex.nullptr#nt:pointer-literal "5.13.8 Pointer literals [lex.nullptr]")
|
||
[*user-defined-literal*](lex.ext#nt:user-defined-literal "5.13.9 User-defined literals [lex.ext]")
|
||
|
||
[*Note [1](#note-1)*:
|
||
|
||
When appearing as an [*expression*](expr.comma#nt:expression "7.6.20 Comma operator [expr.comma]"),
|
||
a literal has a type and a value category ([[expr.prim.literal]](expr.prim.literal "7.5.2 Literals"))[.](#1.sentence-2)
|
||
|
||
â *end note*]
|
||
|
||
[14)](#footnote-14)[14)](#footnoteref-14)
|
||
|
||
The term âliteralâ generally designates, in this
|
||
document, those tokens that are called âconstantsâ in C[.](#footnote-14.sentence-1)
|