1. Chapter 0 Logic, Flowcharts, Pseudo code - compscisi/Programming-Fundamentals-1-SI GitHub Wiki
Programming Logic
Syntax - vocab used to write a program
Semantics - meaning of an instruction when tokens are placed in a particular order
Logic - specific order of instructions
3 types of programming errors:
-
Compilation (syntax) errors
- Caused from syntax and/or semantic errors
- Easiest to find b/c program will not compile w/ these errors
-
Run-time errors
- Caused when program attempts to carry out an operation that is impossible
- Invalid memory access, divide by 0
- Sometimes difficult to find when intermittent
-
Logic error
- Caused by incorrect sequence of statements
- Most difficult to find b/c program will continue to run but produce incorrect results
- Most commonly due to incorrect boolean expressions
Flowcharts
- method to symbolically represent execution flow paths
- can be used to design the logic of a program before actual coding takes place
- major parts of flow chart: terminals, input/output operations, processes, connectors, decision, external module