From 0a4721aa7a14a781832c66929601a3ea9cbabf96 Mon Sep 17 00:00:00 2001 From: mrgeorg Date: Mon, 23 Jan 2017 19:42:00 +0100 Subject: [PATCH] Variable.rst: correct typos --- docs/source/tutorial/variables.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/tutorial/variables.rst b/docs/source/tutorial/variables.rst index 20105bf8..a911fcef 100644 --- a/docs/source/tutorial/variables.rst +++ b/docs/source/tutorial/variables.rst @@ -60,7 +60,7 @@ You can interact with the variables like this: return 0; } -From this example, you can see that there's many ways to pull out the varaibles you want. You can get For example, to determine if a nested variable exists or not, you can use ``auto`` to capture the value of a ``table[key]`` lookup, and then use the ``.valid()`` method: +From this example, you can see that there's many ways to pull out the varaibles you want. For example, to determine if a nested variable exists or not, you can use ``auto`` to capture the value of a ``table[key]`` lookup, and then use the ``.valid()`` method: .. code-block:: cpp :caption: safe lookup @@ -83,7 +83,7 @@ This comes in handy when you want to check if a nested variable exists. You can // Branch not taken: value is not an integer } - sol::optoinal is_a_boolean = lua["config"]["fullscreen"]; + sol::optional is_a_boolean = lua["config"]["fullscreen"]; if (is_a_boolean) { // Branch taken: the value is a boolean } @@ -199,4 +199,4 @@ Finally, it's possible to erase a reference/variable by setting it to ``nil``, u // y will not have a value } -It's easy to see that there's a lot of options to do what you want here. But, these are just traditional numbers and strings. What if we want more power, more capabilities than what these limited types can offer us? Let's throw some :doc:`functions in there` :doc:`C++ classes into the mix`! \ No newline at end of file +It's easy to see that there's a lot of options to do what you want here. But, these are just traditional numbers and strings. What if we want more power, more capabilities than what these limited types can offer us? Let's throw some :doc:`functions in there` :doc:`C++ classes into the mix`!