Subroutines, Local and Global Variables (AQA A-Level Computer Science): Flashcards

📚Flashcards
Subroutines, Local and Global Variables
Sign up to keep revising.Create a free account to study more flashcards and track your progress.

Practise the cards

10 cards from this deck

Show

Subroutine definition

Self-contained code block performing specific tasks

How functions differ from subroutines

Functions return a value after performing a task

Parameter vs argument

Parameter=placeholder; argument=actual value passed

Local variable

Variable only usable within its specific subroutine

Global variable

Variable accessible from anywhere in the program

Key advantage of local variables

Cannot be accidentally changed from other program parts

Side effect in programming

When one subroutine's changes affect another's variables

Event in programming

Something triggering a subroutine during program execution

Purpose of exception handling

Prevents program crashes by catching and managing errors

Module in programming

Group of related subroutines working together

Join 100,000+ A-Level students studying Flashcards with us.

Select your subjects, and get access to A+ resources today.