Files
2025-10-25 03:02:53 +03:00

35 lines
1.7 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[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.1Kinds of literals[lex.literal.kinds]")
[*integer-literal*](lex.icon#nt:integer-literal "5.13.2Integer literals[lex.icon]")
[*character-literal*](lex.ccon#nt:character-literal "5.13.3Character literals[lex.ccon]")
[*floating-point-literal*](lex.fcon#nt:floating-point-literal "5.13.4Floating-point literals[lex.fcon]")
[*string-literal*](lex.string#nt:string-literal "5.13.5String literals[lex.string]")
[*boolean-literal*](lex.bool#nt:boolean-literal "5.13.7Boolean literals[lex.bool]")
[*pointer-literal*](lex.nullptr#nt:pointer-literal "5.13.8Pointer literals[lex.nullptr]")
[*user-defined-literal*](lex.ext#nt:user-defined-literal "5.13.9User-defined literals[lex.ext]")
[*Note [1](#note-1)*:
When appearing as an [*expression*](expr.comma#nt:expression "7.6.20Comma operator[expr.comma]"),
a literal has a type and a value category ([[expr.prim.literal]](expr.prim.literal "7.5.2Literals"))[.](#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)