Programming techniques - exam questions Flashcards
Define the term parameter
An item of data that is
passed to a subroutine when it is called
and is used as a variable as the subroutine is running
Explain the term procedural programming language
A high level language that gives a series of instructions in a logical order
Explain how variables with the same name can be used in different procedures without causing errors
Local variables can be declared and referenced from within a single procedure.
Explain parameter passing
Parameters are passed either by value or reference.
When passed by value, a local copy of data is used within the function and deleted after it has run
When passed by reference the location of data is used, therefore the value stored in memory can be changed