4.2 Types of programming language, translators and integrated development environments (IDEs) Flashcards
(15 cards)
Describe how the compiler translates the computer program.
- It translates the (high-level language) into a low-level language
- It translates all the code before it is executed
- It creates an executable file
Describe how the compiler reports errors.
- It creates an error report after trying to compile
- displaying all errors in the code
Give 4 common functions of an IDE.
- built-in compiler
- Built-in interpreter
- Auto-completion
- Auto-correction
Explain what is meant by a high-level language and a low-level language
- Low-level language: a programming language that directly translates to machine code understood by the processor
- High-level language: programming language uses English-like statements to allow users to program with easy-to-use code
2 advantages + disadvantages of HL lang.
2 advantages of HL:
- Easier to read and write
- Easier to debug
2 disadvantages:
- The user isn’t able to directly manipulate the hardware
- The program may be less efficient
2 advantages + disadvantages of LL lang.
2 advantages of LL:
- Complete control over the system components
- Occupies less memory and execute faster
2 disadvantages:
- Machine dependent
- More prone to errors
What’s an assembly language?
- a form of low-level language that uses mnemonics, and an assembler is needed to translate an assembly language program into machine code
Describe the operation of a compiler and an interpreter, including how high-level language is translated by each and how errors are reported
- A compiler translates the whole code at once before executing it, producing an executable file.
- An interpreter translates and executes the code line by line
- A compiler provides an error report for the whole code if errors are detected
- An interpreter stops execution when an error is found
Explain the advantages and disadvantages of a compiler and an interpreter
- An interpreter is mostly used when developing a program
- A compiler is used to translate the final program
What’s IDE (An Integrated Development Environment)?
- An Integrated Development Environment (IDE) is software designed to make writing high-level languages more efficient
What do IDE’s include?
IDEs include tools and facilities to make the process of creating code easier, such as:
- Editor
- Error diagnostics
- Run-time environment
- Translators
What is the function of an editor?
- An editor gives users an environment to write, edit and maintain high-level code
Editors can provide:
- Basic code formatting tools - changing the font, size of the font and making text bold, etc
What is the function of error diagnostics?
- Tools that help to identify, understand, and fix errors in code, such as:
- Identifying errors - highlight particular areas of code where the error may have appeared, e.g., indentation error, etc
Debugger - provide a ‘step through’ command which provides step-by-step instructions and shows what is happening to the code line by line, useful for finding logic errors.
What’s run-time environment?
- Gives users the ability to run and see the corresponding output of a high-level language
What’s a translator?
- Built in to compile or interpret code without the need for an extra piece of software