|
|
|
 |
Attention |
Topic was automatically imported from the old Question2Answer platform. |
 |
Asked By |
Kyllingene |
In GDScript, the boolean type is called bool. No problems. The string type, however, is called String. Why the difference in style between the two?
|
|
|
 |
Reply From: |
timothybrentwood |
String
is an object with functions you can call on it like my_string.length()
. bool
is a “primitive” like float
or int
. You call str(my_boolean)
not my_boolean.to_string()
.
You can read more about the concept of primitives here: Primitive data type - Wikipedia