From e434036cffd2a5fa1d7ca9195b45cf1c61a71537 Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Sun, 25 Oct 2020 11:32:02 -0600 Subject: add octal literals --- syntax.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'syntax.md') diff --git a/syntax.md b/syntax.md index 6413f8a..c195811 100644 --- a/syntax.md +++ b/syntax.md @@ -74,9 +74,10 @@ Subsequent characters may have any of the above-listed Unicode categories, or on ## Constants -A *constant* can have one of five types: +A *constant* can have one of six types: - a *decimal constant*, a sequence of characters drawn from the set {`0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `_`}; - a *binary constant*, a prefix (either `0b` or `0B`) followed by a sequence of characters drawn from the set {`0`, `1`, `_`}; +- an *octal constant*, the prefix `0o` followed by a sequence of characters drawn from the set {`0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `_`}; - a *hexadecimal constant*, a prefix (either `0x` or `0X`) followed by a sequence of characters drawn from the set {`0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `A`, `a`, `B`, `b`, `C`, `c`, `D`, `d`, `E`, `e`, `F`, `f`, `_`}; - a *floating-point constant*, a decimal constant followed by one of - `.` followed by a decimal constant, -- cgit v1.2.3