Flashcards in Subroutines Deck (4)
Subroutines are a way of managing and organising programs in a structured way. This allows us to break up programs into smaller chunks.
What is the difference between a procedure and a subroutine
Subroutines that do not return values and do not have to have input parameters are called procedures.
Subroutines that allow us to have both input and output are called functions.
What is a global variable?
A global variable is a variable that can be used anywhere in a program. The issue with global variables is that one part of the code may inadvertently modify the value because global variables are hard to track.