Please enable JavaScript.
Coggle requires JavaScript to display documents.
Mind Map, Rohan Johnstone-McHugh - Coggle Diagram
Mind Map
Function
A function is different from a procedure as it only returns a single value. Both can be tested at any time separate from the main code
A function is bit of code that returns a single value. A function consists of: A heading, declaration part and an action part
Procedure
A procedure is different from a function as it can return more than one value and will cause an effect. Both can be tested at any time separate from the main code
-
Variables
Global
A global variable can be seen throughout the code. These can take up a lot of memory as the have to be stored throughout the program
Local
A local variable is only seen in one part of the program. These save on memory as they don't have to be stores throughout the program
Parameters
-
Formal
A formal parameter is used as a place holder within a subprogram for the values recieved or send to the main programs actual parameters
Pass by Reference
Passing by reference means the original parameter will be passed into the subprogram and is going to be able to be changed. This is used when the parameter is going to change within the subprogram
Pass by Value
Passing by value mean a copy will be made and the copy will be sent to the variable. This is used when a value is not going to change in the subprogram
-
-
-