aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/Reference-manual.md
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-05-22 20:46:26 +0300
committerGitHub <noreply@github.com>2018-05-22 20:46:26 +0300
commit9ecd92c6fedd052f4115683726a5cc6ebaa33e85 (patch)
tree794a3df4990aa5397c7e284185b284bb956b6cb5 /docs/markdown/Reference-manual.md
parentf4194d4dbc5c48ff9a0d76c779876aab60754230 (diff)
parentfe6fc59ee75f44acdaac0abc757c687916d4618a (diff)
downloadmeson-9ecd92c6fedd052f4115683726a5cc6ebaa33e85.zip
meson-9ecd92c6fedd052f4115683726a5cc6ebaa33e85.tar.gz
meson-9ecd92c6fedd052f4115683726a5cc6ebaa33e85.tar.bz2
Merge pull request #3490 from MathieuDuponchelle/dict_builtin
Add new built-in type, dict
Diffstat (limited to 'docs/markdown/Reference-manual.md')
-rw-r--r--docs/markdown/Reference-manual.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md
index 1e0e4c9..6c20221 100644
--- a/docs/markdown/Reference-manual.md
+++ b/docs/markdown/Reference-manual.md
@@ -1737,6 +1737,23 @@ The following methods are defined for all [arrays](Syntax.md#arrays):
You can also iterate over arrays with the [`foreach`
statement](Syntax.md#foreach-statements).
+### `dictionary` object
+
+The following methods are defined for all [dictionaries](Syntax.md#dictionaries):
+
+- `has_key(key)` returns `true` if the dictionary contains the key
+ given as argument, `false` otherwise
+
+- `get(key, fallback)`, returns the value for the key given as first argument
+ if it is present in the dictionary, or the optional fallback value given
+ as the second argument. If a single argument was given and the key was not
+ found, causes a fatal error
+
+You can also iterate over dictionaries with the [`foreach`
+statement](Syntax.md#foreach-statements).
+
+Dictionaries are available since 0.47.0.
+
## Returned objects
These are objects returned by the [functions listed above](#functions).