aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-05-24 22:21:40 +0300
committerGitHub <noreply@github.com>2018-05-24 22:21:40 +0300
commit41ab5166e42e1793419ba44e6fb060f7dbf7cd4c (patch)
tree6d5866ae11ed04e4ed147893f069bb49c6c232d6 /docs
parent160da30732fb3f24f61028b8728830e27cf4ebea (diff)
parentfa04e5c8fb24632869cff316ae4765996821287a (diff)
downloadmeson-41ab5166e42e1793419ba44e6fb060f7dbf7cd4c.zip
meson-41ab5166e42e1793419ba44e6fb060f7dbf7cd4c.tar.gz
meson-41ab5166e42e1793419ba44e6fb060f7dbf7cd4c.tar.bz2
Merge pull request #3476 from filbranden/intbase1
Add support for octal and binary int literals
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/Syntax.md7
-rw-r--r--docs/markdown/snippets/integer-base.md9
2 files changed, 16 insertions, 0 deletions
diff --git a/docs/markdown/Syntax.md b/docs/markdown/Syntax.md
index 42002f4..5a6734d 100644
--- a/docs/markdown/Syntax.md
+++ b/docs/markdown/Syntax.md
@@ -64,6 +64,13 @@ Hexadecimal literals are supported since version 0.45.0:
int_255 = 0xFF
```
+Octal and binary literals are supported since version 0.47.0:
+
+```meson
+int_493 = 0o755
+int_1365 = 0b10101010101
+```
+
Strings can be converted to a number like this:
```meson
diff --git a/docs/markdown/snippets/integer-base.md b/docs/markdown/snippets/integer-base.md
new file mode 100644
index 0000000..0a27c9a
--- /dev/null
+++ b/docs/markdown/snippets/integer-base.md
@@ -0,0 +1,9 @@
+## Octal and binary string literals
+
+Octal and binary integer literals can now be used in build and option files.
+
+```meson
+int_493 = 0o755
+int_1365 = 0b10101010101
+```
+