2.2.1 Programming techniques Flashcards
IDE definition
Integrated Development Environment
IDE features
Syntax highlighting: Makes code easier to read by visually clarifying different elements of language syntax
Autocomplete: Saves keystrokes and risk of syntax errors so the programmer can focus on their code
Code comments: text that is not executed but serves as documentation for explanations
Debugging tools
Breakpoints, Stepping, Variable Watch
Breakpoints:
Indicates where to suspend running code to look at variable values, behaviour of memory, or if a branch is getting run
Stepping:
Allows the programmer to run a program line by line, to examine the state, machine and related data before/after each line is executed
Benefits of stepping
Observes changes,
Traces through code,
Examining execution
Variable watch:
Lets you monitor changes in the value of a variable during program execution to detect anomalies and debug the code
Variable scope
Variables with a global scope can be accessed from anywhere in the program, whereas, local variables can only be accessed or used by the code inside the event (procedure or function) it was declared in
Procedures
A section of code that performs one or more specific tasks with an identifiable name, but will not return a value
Subroutine
An out-of-line block of code that will be executed when its identifiable name is called in code
Function
A section of code that performs one or more specific tasks with an identifiable name AND returns a value
Parameters
A variable that passes values when it is called
Arguments
Any data passed into a subroutine
Byval
You pass a copy of the original data to the subroutine and this will not modify the original value, and this is stored directly in memory
Byref
Which passes a reference of arguments to the function, the changes in passed values are permanent and modify the original variable values