High Level Language
This article is unfinished. Please consider joining and adding to this article. Read about Page layout beforehand.
- Programming computers is easier if the language used is similar to natural language (the way we communicate)
- High Level Languages are programming languages written in an English-like language, that must be translated to machine code before a computer can use them
- High level languages follow a strict syntax. This means that the language follows a firm set of rules about what order keywords can be used. This strict syntax allows the computer to translate the code into machine code accurately.
- There are many HLLs, all with different areas of focus, such as web development, mobile app development or computer games development
Computer programmers programming the first computers, such as the PDP-1, had to write code using binary or assembly. For computer programming to become accessible, it would need to become easier to understand, and removed from the specific design of a computer (e.g. accessing registers, RAM and using the program counter). High-level languages provide an abstraction from how a computer works, so a programmer can solve a problem without being concerned about the features of a processor. Because of this, HLL can be easier to program and more flexible than LLL.
Features of High-Level Language
High-level Languages vary greatly in their approaches, but often consist of control structures, data structures and an ability to evaluate expressions.
- Control structures are ways of controlling the path of a program, such as an "whether or not" IF statement, or a loop
- Data structures like objects, variables, arrays and records are used to load and store data without needing to refer to memory addresses.
- Expressions such as a>4 or NOT(started) can be evaluated in an HLL to produce a true or false value. This can be used to control the flow of a program.
High-level languages have a strict syntax - the keywords and expressions that make up each line must be in the right place, or the code will not function correctly.
Examples of High-Level Languages
This program is written in Python. It uses variables to store data, functions to carry out actions, gathers input, makes a decision based on the length of a string and displays a message.
Here is the same program in block form.
Processors are unable to understand High-level languages. They need to be translated into Low-level language by a translator. A translator converts each line of HLL into a set of instructions for the processor. This can be useful for programmers, because a translator may produce machine code for different types of processor from one program. This makes HLL code portable.
Translators can work as an interpreter, translating a line at a time of HLL to LLL as the program runs, or as a compiler, translating all lines of code into machine code and producing a machine code file.