Assembly Code
- uses mnemonics (aids to memory)
- e.g. OS software, device drivers and encryption/decryption software
Assembler
- assembly code -> machine code
Compiler
- source code (high level language) -> object code (machine code), then executes
Interpreter
- translates then executes each statement
- no object code is produced
Procedure
- completely self-contained subprogram which may be called from the main program
- defined and given an identifier which may be used like any other programming instruction
Function
- a sub-program which returns a value
- name of function is used as a variable which stores the returned value
Variable
- temporary storage space for data, referred to by its name
- data in a variable may vary or change within the program
Event Procedure - procedure which is run when a certain event is triggered by the user
Scope - refers to the range of statements for which a variable (or procedure is valid). A variable doesn't exist outside its scope
Parameter
- information about a data item being supplied to a function or procedure when it is called (aka argument)
- variables declared in the heading of a procedure/subroutine whose values can be passed to and returned from it
Actual parameter - parameter passed to the procedure or function
Formal parameter - parameter which appears in the procedure or function
Passing by value - a copy of the variable is used and is discarded when the subprogram exits
Passing by reference - the memory location of the data is issued and the changes made to the subprogram affect the variable permanently
Module
- section of code which performs a task
- independent but likely to relate to a number of modules
Array
- finite set of data items of the same type grouped together (referred to) using a single identifier
- stores data which logically belongs together
- static structure
- each item is addressed using a subscript
List - 1D array, dynamic, infers order
Table - 2D array, dynamic, rows and columns
Stack - a LIFO list, dynamic, implemented with an array, can be empty or full
Queue - a FIFO list, dynamic, implemented with an array
Linear queue - queue works in a line
- 2 pointers to show 'head & tail' / 'start & stop'
- items or elements are added & removed
- can be empty or full
Tree - dynamic data structure, consists of data items and pointers
Linked list - dynamic structure, similar to normal list, pointers rather than physical position used to point to next item in list
Traversing - looking through a set of data and processing it in some way
Overflow - if you try to add to stack or queue which is already full
Underflow - if you try to remove an item from an empty queue or stack
Algorithm
- series of steps to solve a problem
- create, add, delete, update/amend/edit, sort, search
Standard Modules
- pre-written, pre-tested algorithms which can be included in a situation
- pre-tested, therefore contain fewer errors
- ensures consistency in coding
- saves programming time
- performs standard task e.g. binary search / sort data
Trace - to show state of variables as work through algorithm instruction by instruction
Binary Search
- faster
- split data into two structures and compare search item with middle item
- only works is data items are in order