From ec93124397796c66c50349780b168ceae9d2240c Mon Sep 17 00:00:00 2001 From: reduz Date: Sat, 20 Sep 2014 06:48:57 -0700 Subject: [PATCH] Updated tutorial_gdscript_efficiently (markdown) --- tutorial_gdscript_efficiently.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tutorial_gdscript_efficiently.md b/tutorial_gdscript_efficiently.md index f5a0cc2..dd40133 100644 --- a/tutorial_gdscript_efficiently.md +++ b/tutorial_gdscript_efficiently.md @@ -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 +```