Added the limitations of return type function (#32376)
Explained that in a function what kind of values can be returned.pull/36297/head
parent
2d780f257c
commit
b660edb52d
|
@ -193,6 +193,7 @@ NOTE: In recurssion a base codition is mandatory. Otherwise the function execute
|
|||
* Functions take parameters to work with- if they're taking nothing, use `void`.
|
||||
* `return` ends the function and gives back a value. You can have several in one function, but as soon as you hit one the function ends there.
|
||||
* When you pass a variable to a function, it has its own copy to use - changing something in a function doesn't change it outside the function.
|
||||
* A function can return any type of values, except array or any other function.
|
||||
* Variables declared inside a function are only visible inside that function, unless they are declared static.
|
||||
|
||||
### Reference
|
||||
|
|
Loading…
Reference in New Issue