2.5 Programming languages and integrated development environments Flashcards
characteristics of high level languages
- independent of hardware
- translated using a compiler or interpreter
- one statement translates into many machine code instructions
- less memory efficient than low level languages
- code is faster to execute
- quicker and easier to understand and write
- programmer has many different data structures to use
characteristics of low level languages
- one instruction translates to one machine code instruction
- code works on one type of processor
- programmer works with memory directly
- code harder to understand and write
- more memory efficient
- code slower to execute
examples of low level languages
assembly code
machine code
What translates assembly code into machine code
An assembler
what is the purpose of a translator
converts high-level code into machine code or binary to enable the code to be run
main feature of a compiler
the whole program is translated before it is run
main feature of an interpreter
program is translated line by line as the program is running
advantages of an interpreter
- easy to write source code as the program will always run, stopping when it finds a syntax error
- code does not need to be recompiled when changed and it is easy to try out commands when the program has paused after finding an error
- is not specific to one type of processor
disadvantages of an interpreter
- translation software is needed at run-time
- slow code execution
- code is not optimised
- source code is not kept secret
advantages of a compiler
- no need for translation software at run time
- quick code execution
- code is optimised
- source code is kept secret
- produces an executable file so the original code does not need to be compiled again
disadvantages of a compiler
- source code is easier to write but the program will run with syntax errors
- code needs to be recompiled when the code is changed
- it is designed for a specific processor
what is an IDE
integrated development software
- software that performs the various stages of software design and implementation in a single integrated system. includes tool that aid a programmer developing code
what are the four aids that IDEs provide
- editor
- error diagnostics
- run-time environment
- translators
what aids does the editor supply
- find and replace all occurrences of text typed in by the user
- auto-indent statements
- auto complete sentences
- colour code key words (if, for)
- formatting source code
explain what is meant by a run time error
an error which will be detected when the program is run (eg. division by 0). it is not a syntax error and may be caused by erroneous use inputs