Pascal. Algorithmic language. The composition of the algorithmic language

Algorithmic language. The composition of the algorithmic language. Description of the language


Contents


Search other resources:

1. Composition of the algorithmic language

The structure of ordinary colloquial speech includes the following components:

  • symbols;
  • words;
  • phrases;
  • sentences.

In an algorithmic language, a similar classification, only some elements have been changed:

  • words are elementary constructions;
  • phrases are expressions;
  • sentences are operators.

So, the algorithmic language contains the following components:

  • symbols – basic indivisible signs, in terms of which all texts of languages are written;
  • elementary constructions – the minimum meaningful units of the language, formed from symbols;
  • expressions – elements of the language, consisting of elementary constructions and symbols. Expressions specify the rule for calculating a certain value;
  • operators – allow you to completely describe some action and consist of expressions, elementary constructions and symbols. Operators can form operator groups, which are formed into a statement block or compound statement.

Operators perform some actions on data. Based on this context, programs distinguish between non-executable operators (statements) or descriptions. Descriptions are operators that provide information about data types based on sentences in an algorithmic language.

A program in an algorithmic language is formed on the basis of a combination (union) of an algorithm, a set of descriptions and operators.

 

2. Description of the algorithmic language. Concept

For any algorithmic language, it is important to correctly describe its components. A description of an algorithmic language is a description of four elements that determine the composition of this language, namely:

  • description of symbols. The essence of this description is to list the allowed characters in the language;
  • description of elementary constructions – these are the rules for the formation of these constructions;
  • the description of expressions defines the rules for constructing any expressions that make sense in a given algorithmic language;
  • the description of operators includes a list of all possible types of operators that are allowed in a given language.

Each of the above language elements is described according to syntax and semantics. Syntax defines the rules for constructing language elements. Semantics sets out the content and rules of use only for those elements of the language that have been syntactically defined.

 


Related topics