4.2 Types of programming language, translators and integrated development environments (IDEs) Flashcards
What are the 6 differences between High-level and Low-level language?
High level is easier for users to understand, read and write while low level is difficult to understand
High level is also easier to debug code while low level is harder
High level is portable and machine dependent while low level is not portable and also machine dependent
High level must be converted into low level language before it can be run , for low level such as machine code it does not need to be converted but even if it needs to be like assembly language its still faster than high level
One high level statement can represent many low level instructions
High level cant manipulate hardware while low level can
What is machine code?
binary code
What is assembly language?
code written in mnemonics that can directly manipulate the hardware
What is a translator?
a type of software that converts code written in one programming language to another. usually high level to low level language.
What are the three main types of translators?
assembler
interpreter
compiler
What are the main differences between a interpreter and a compiler?
Interpreter translate one line at a time the executes it while compiler translates all the code into machine code before executing
Interpreter reports a syntax error as soon as it is found while the compiler reports all the errors at the same time
Interpreter doesn’t produce an executable file while compiler does
When using a interpreter You can test parts of the program without needing to translate all of it but if you are using a compiler you’ll need to finish the section of code before testing it
Saria is writing a computer game program that allows a character to move through different worlds collecting coins. Which translator should Saria use when writing the code?
It is more appropriate to use an interpreter. This will allow her to see when an error is identified, correct it and then continue running the program from the same position.
A compiler can be used, but then all the errors would appear at the start and she would need to correct all of them before seeing how any of her program runs.
What is The integrated development environment (IDE)
a piece of software that allows the user to write, test and run program code
What are some common functions IDEs provide?
– code editors
– run-time environment
– translators– error diagnostics
– auto-completion
– auto-correction
– Prettyprint
What is Prettyprint?
a feature of a editor that changes the colour of text. This helps you spot key terms and whether you have entered them correctly or not.