Metric-Cart

Blog about becoming a programmer

laptop
Programming languages

Pascal and Basic

Pascal
Pascal is named after the scientist Blaise Pascal. It is popular in programming studies as well as among professionals. It was created in the early 70’s by the Swiss scientist Nicklaus Wirth. The language was originally developed as a teaching language, is now one of the main programming languages in schools and universities. Its qualities have proven so high that it is used by professional programmers.

Philip Kahn, who developed the Turbo-Pascal system, achieved an equally impressive success, including financially. His idea was to combine the successive stages of program processing-compilation, linkage editing, debugging, and error diagnosis-into a single interface. Turbo-Pascal was used by almost all educational institutions, programming centers, and private firms. Several powerful languages (Modula, Ada, Delphi) were created based on the language.

The structure of work in the Pascal language
Like all programming languages, Pascal has its own alphabet, including Latin letters, numbers, and symbols. The language uses variables and constants to describe quantities.

Variables are values that can change their value while writing a program.

The constants are the values that do not change their value during the whole process of writing the program.

When writing a program, the Pascal language allows the use of simple (integer type, logical, character, enumerated, interval, real), string, structured (arrays, records, sets, file), reference types of constants and variables.

Each of these types has its own set of data processing operations. Variables and constants are linked into expressions using operation signs, standard functions, and parentheses. Recording rules represent the notation of mathematical expressions.

Programs written in Pascal have a structure:

Declarations and conventions
The texts of procedures and functions
The main block of a program.

BASIC

Basic – Beginner’s All-purpose Sumbolic Instruction Code is a universal symbolic instruction code for beginners. This program has been proven good for learning to write simple programs. And despite the large number of poorly compatible versions, it is a popular platform for beginners.

The following symbols are used in the BASIC language:

Letters of the Latin alphabet.
Numerals from 0 to 9.
Special symbols: + – / ., ( ) = < > ” %, etc.
Keywords
Arithmetic operations symbols
Relationship signs
Signs of logical operations.

Primary language constructions include constants and identifiers. Constants are distinguished between arithmetic and character constants. Arithmetic constants can be integer and real constants. An integer constant is an integer decimal number that can have a plus or minus sign and is in the range – 32768 … + 32767. A real constant is a decimal number represented in natural form (fixed-point) or in exponential form (floating-point). In any case, the sign “point” is used. A character literal constant is a chain of valid characters enclosed in upper quotation marks or apostrophes. The identifier in BASIC must begin with a Latin letter, followed by Latin letters and numbers. The program has a lowercase structure. There are no special operators for specifying the header; the comment operator is used to highlight the name declaration section.