From 6b8746543cf8f6e83a5850a2b6496920da9ef92a Mon Sep 17 00:00:00 2001 From: gumi Date: Tue, 31 Mar 2020 23:26:39 -0400 Subject: update the constants documentation for binary and octal literals --- db/constants.conf | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'db') diff --git a/db/constants.conf b/db/constants.conf index 6f87b2d51..b2bc94516 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -29,12 +29,17 @@ constants_db: { /************* Entry structure (short) ************************************ - Identifier: value // (int) + Identifier: value // (integer literal) ************* Entry structure (full) ************************************* Identifier: { - Value: value // (int) + Value: value // (integer literal) Deprecated: true // (boolean) Defaults to false. } + ************* Supported integer literals ********************************* + decimal: 1337 // no prefix + hexadecimal: 0x1337 // prefix: 0x + octal: 0o1337 // prefix: 0o + binary: 0b101101 // prefix: 0b **************************************************************************/ comment__: "Weekdays" -- cgit v1.2.3-70-g09d2 From fc77e102b35e38a375dd0f419bf490b7fe4c379c Mon Sep 17 00:00:00 2001 From: gumi Date: Sun, 3 May 2020 23:17:07 -0400 Subject: update the constants documentation for number separators --- db/constants.conf | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'db') diff --git a/db/constants.conf b/db/constants.conf index b2bc94516..1770ab06f 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -40,6 +40,13 @@ constants_db: { hexadecimal: 0x1337 // prefix: 0x octal: 0o1337 // prefix: 0o binary: 0b101101 // prefix: 0b + + Underscores can also be used as visual separators for digit grouping purposes: + 2_147_483_647 + 0x7FFF_FFFF + + Keep in mind that number literals cannot start or end with a separator and no + more than one separator can be used in a row (so 12_3___456 is illegal). **************************************************************************/ comment__: "Weekdays" -- cgit v1.2.3-70-g09d2