Mapa mental
Topic 7- Programming
Conteúdo do mapa
Topic 7- Programming
High level language
- Is a programming language that allows code to be written
- It's similar to human language
- Some people prefer them as they're easier to learn and code
- They're used when execution speed is not critical
- Examples include
- Basic
- Java
- Pascal
- Have to be converted into machine code to be executed
Machine code
- Opposite to high level language
- Doesn't resemble human language
- Made up of bit codes
- Can be directly executed by the CPU
- Primarily coded first when execution level is critical
Variables
- A variable may be required to store data that can change
- Variables are given identifiers (names) that reflect the data being stored
- Example of a identifer would be txt_Name for a name. This is a self documenting identifier
Constrasts
- Used in programming to store data that doesn't change
- Also given self documenting identifiers
- Example of a constant would be Pi = 3.14, this is a self-documenting identifier that does not change.
Types of variables
- Local- variable that is defined within a sub procedure and is only accessible from within the same sub procedure. Known as scope.
- Global- variable that has a larger scope as it is defined globally and is accessible from anywhere in the program
- Static- stored in a location in memory and have a lifespan that lasts the entire time that program is running. E.g. if you assign a number to 2.1, it will remain constant
- Dynamic- it is assigned a new location in memory and has a lifespan that ends when the sub procedure in which it was defined, ends.
Pros and cons of different variables
- Advantage global over local is that sometimes it can be more efficient way or ensuring data is accessible to all sub procedures
- Advantage global over local is that sometimes it can be more efficient way or ensuring data is accessible to all sub procedures
Informações
- Descrição
- Mapa Mental sobre Topic 7- Programming, criado por ginny darke em 04-10-2016.
- Criado por
- ginny darke
- Visualizações
- 0
- Avaliação