Please enable JavaScript.
Coggle requires JavaScript to display documents.
Procedures And Functions (The benefits of using procedures and functions.,…
Procedures And Functions
Functions
Functions consist of : A heading, a declaration and an action part.
-
A function returns a single value. So if there is more than one value being returned it is not a function.
Procedures
Procedures consist of : A heading, a declaration and an action part. They are by a call from the program. When a procedure is called it precedes an effort.
-
-
-
Passed by Value. Passing a parameter by value is used when a parameter is needed in a subroutine but its value is not going to change in the subroutine.
The difference between a procedure and function is that when a procedure is active it produces an effect. While when a function is activated it returns a single value.
Passing a parameter by reference is used when a parameter is needed in a subroutine and the value will change when it is passed in the subroutine.
We always pass by reference in an array because if we used a passed by value then the value in the subroutine would not change.