Remove unnecessary parenthesis from code examples
This commit is contained in:
parent
ac4e487237
commit
e1a9a3328d
@ -1167,10 +1167,10 @@
|
||||
Since [constant OK] has value 0, and all other failure codes are positive integers, it can also be used in boolean checks, e.g.:
|
||||
[codeblock]
|
||||
var err = method_that_returns_error()
|
||||
if (err != OK):
|
||||
if err != OK:
|
||||
print("Failure!)
|
||||
# Or, equivalent:
|
||||
if (err):
|
||||
if err:
|
||||
print("Still failing!)
|
||||
[/codeblock]
|
||||
</constant>
|
||||
|
@ -13,7 +13,7 @@
|
||||
if dir.open(path) == OK:
|
||||
dir.list_dir_begin()
|
||||
var file_name = dir.get_next()
|
||||
while (file_name != ""):
|
||||
while file_name != "":
|
||||
if dir.current_is_dir():
|
||||
print("Found directory: " + file_name)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user