1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Updated tutorial_gdscript_efficiently (markdown)

reduz
2014-09-20 06:48:57 -07:00
parent 307d31a9bb
commit ec93124397

@@ -46,5 +46,29 @@ var a # null by default
a=5 # valid, 'a' becomes an integer
a="Hi!" # valid, 'a' changed to a string
```
Functions are of dynamic nature too, which means they can be called with different arguments, for example:
Static:
```c++
void print_value(int value)
{
printf("value is %i\n,value);
}
[..]
print_value(55); // valid
print_value("Hello"); // invalid
```
Dynamic:
```python
func print_value(value):
print(value)
[..]
print_value(55) # valid
print_value("Hello") # valid
```