What is the programming language used for?
Obviously, programming languages are used to write software programs. So what are the basic parts of a programming language that does this?
Each programming language can be viewed as a set of technical details focusing on the language’s syntax, vocabulary, and meaning.
These technical details usually include:
- Data and data structure
- Commands and control lines
- Names and parameters
- References and reuse mechanisms
A particular system in which data is organized in a program is called a programming language type system. The design and study of type systems is known as type theory.
Many languages have predefined common data types such as:
- Integer: very common, used to represent whole numbers.
- Char: represents single characters.
- String: represents a string of characters, also known as a string, to form a sentence or phrase.
Most languages provide ways to assemble complex data structures from existing types and to associate names with newly associated types (using array, list, or queue types, file).
Commands and control flow
Once the data has been specified, the computer must be shown how to perform operations on that data. Basic propositions can be structured through the use of keywords (defined by a programming language) or can be made up of using and combining existing grammatical or syntactic constructs. is defined. These basic propositions are called statements.
Depending on the language, statements can be combined in a certain order. This allows programs to be set up to perform multiple functions. In addition, in addition to the instructions for modifying and modifying data, there are commands used to control the computer’s processing flow such as branching, defined by multiple instances, loops, or combinations, functions. These are indispensable elements of a programming language.
Names and parameters
In order for the program to run, there must be a method of identifying free areas of memory for data storage. The best known method is through the names of the variables. Depending on the language, indirect empty spaces may include references, which are in fact pointers to other memory pools, implemented in variables or groups of Out. This method is called storage naming. Similar to the storage naming method, which is the method of naming groups of instructions. Most programming languages allow calling macros or subroutines as statements to run the description in these macros or subroutines by name. Using a name like this gives programs great flexibility and great value in reusing code (because the writer doesn’t need to repeat the same code, just define it, macros or subroutines.)
Indirect references to available programs or predefined data elements allow many application-oriented languages to integrate different operations.
Reference mechanism and source code reuse
Every programming language has a set of syntax that defines the programming so that the source code is executed. Accordingly, each programming language manufacturer will provide a set of grammatical constructs for instructions, a large number of predefined conventional vocabulary, and a number of procedures or functions, basic.
In addition, to help programmers easy to use, the manufacturer must also provide reference documents on the language characteristics of the language they publish. These lookup documents include most of the specifications, properties, default names (or keywords), methods used, and sometimes the source code for examples. Due to disagreement on the design and use of each language, it is possible that the source code of the same language can be run for this translation software but not compatible with another translation software.