toml: hex, octal and binary are valid integer formats (#4057)

Update the integer section to reflect the fact that hex, octal and binary representations are allowed in toml.

They were added to toml in version 0.5 and more work has to be done to update this document to that version, as mentioned here:
https://github.com/adambard/learnxinyminutes-docs/issues/3158
This commit is contained in:
romsom 2023-12-14 15:49:26 +01:00 committed by GitHub
parent 2f670a5a96
commit 0d637dade2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,11 +69,15 @@ The first newline is trimmed in raw strings.
###########
## Integers can start with a +, a - or nothing.
## Leading zeros are not allowed. Hex, octal, and binary forms are not allowed.
## Leading zeros are not allowed.
## Hex, octal, and binary forms are allowed.
## Values that cannot be expressed as a series of digits are not allowed.
int1 = +42
int2 = 0
int3 = -21
int4 = 0xdeadbeef
int5 = 0o755
int6 = 0b11011100
integerRange = 64
## You can use underscores to enhance readability. Each