Added the limitations of return type function (#32376)

Explained that in a function what kind of values can be returned.
pull/36297/head
Papun Charan 2019-06-12 06:25:26 +05:30 committed by Christopher McCormack
parent 2d780f257c
commit b660edb52d
1 changed files with 1 additions and 0 deletions

View File

@ -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