Extea Flashcards
(10 cards)
what’s a subroutine
a self contained piece of code that had an identifier and can be called from anywhere in a program
what’s a function
a subroutine that des returns value to the program that called it
what’s a parameter
a variable that’s sent to a subroutine
local variables
the variable of constant that can be accessed in the surrounding it’s declared within
global variable
the variable or constant that can be only accessed in the subroutine it is declared within
what are adv of using subroutines procedures and functions
- reusabikity
- organised large sections of code into related area
- decomposing large problems into simpler steps
- reducing duplication louise
what’s by val
a method of passing a parameter to a procedure where the value of the variable can’t be changed by the procedure
By ref
a method of passing a parameter where the value of the variable can be changed by the procedure
library routine
a tested and ready to use routine available in the development system of a programming language that can be incorporated into a program