☰
Debian Codegraph
@
4.6.3+ds-2
/
/
modules
/
gdscript
/
tests
/
scripts
/
parser
/
errors
/
invalid_ternary_operator.gd
☽
☼
modules/gdscript/tests/scripts/parser/errors/invalid_ternary_operator.gd
code
plain
raw
Expat
2014-present, Godot Engine contributors; 2007-2014, Juan Linietsky, Ariel Manzur
debian/copyright
1
func test():
2
var amount = 50
3
# C-style ternary operator is invalid in GDScript.
4
# The valid syntax is `"yes" if amount < 60 else "no"`, like in Python.
5
var ternary = amount < 60 ? "yes" : "no"