Subroutines Flashcards
Features of IDE
Auto-completion, Can view identifiers/avoid spelling mistakes
Syntax Highlighting, Can identify features quickly/use to check code is correct
Stepping, Run one line at a time and check result
Breakpoints, Stop the code at a set point to check value of variable
Watch Window, Check values of variables and how they change during the execution
Error Diagnostics, Locate and report errors/give detail on errors
Two types of subroutines
Function - A self-contained section of a program that is designed to return a value
Procedure - Self-contained section of a program that is a defined set of instructions designed to perform a task
Difference between Functions and Procedure?
A function is used to calculate something from a given input whilst procedure is the set of commands which are executed in order
What is a parameter?
Name of the information we want in a function
Difference between passing a parameter by value and reference
By value, is only a copy of the variable that is passed to the subroutine whereas by reference, the address of the variables passed to the subroutine.
What is an IDE?
Integrated Development Environment is often used to write a computer programs