diff options
author | Max Hilbrunner <mhilbrunner@users.noreply.github.com> | 2021-08-27 21:05:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-27 21:05:47 +0200 |
commit | 4e67e9bca63b6539820a4e09d58ffc192146da19 (patch) | |
tree | 3cb66666c2d69e08e5c117c5ffa0b274b8693cb9 /doc/classes | |
parent | 701195937de2600a8c32a823ebffcf657ec7b0dd (diff) | |
parent | 4fae7ae9dc8e115c13c70c2762715cf3e4623a06 (diff) |
Merge pull request #52090 from balloonpopper/bug52060
Correct null and boolean values being capitalised by the str command
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/Object.xml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index 9ad79dc17a..c9e9a0699c 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -13,15 +13,15 @@ [codeblocks] [gdscript] var n = Node2D.new() - print("position" in n) # Prints "True". - print("other_property" in n) # Prints "False". + print("position" in n) # Prints "true". + print("other_property" in n) # Prints "false". [/gdscript] [csharp] var node = new Node2D(); // C# has no direct equivalent to GDScript's `in` operator here, but we // can achieve the same behavior by performing `Get` with a null check. - GD.Print(node.Get("position") != null); // Prints "True". - GD.Print(node.Get("other_property") != null); // Prints "False". + GD.Print(node.Get("position") != null); // Prints "true". + GD.Print(node.Get("other_property") != null); // Prints "false". [/csharp] [/codeblocks] The [code]in[/code] operator will evaluate to [code]true[/code] as long as the key exists, even if the value is [code]null[/code]. |