Basic terms

Before we start programming it is necessary to explain some basic terms which are used in programming. 

Program- a sequence of commands describing some action. Each program has its author writing the program and a processor performing it. A kitchen recipe is also a program in which a cook is a processor, cooking is a process, ingredients are objects, and prepared meal is a wanted effect.

Programming - an activity by which a programmer inputs the instructions (primary commands) to the computer in a language familiar for the computer which is capable to execute.

Programming language - a tool for algorithms entry. It is a communication tool between a programmer and a computer. The programming language is artificially created and it is designed to record the algorithms. According to the principle they are used for, the programming languages are divided into:

  • Procedural (BASIC, C, etc.)
  • Object oriented (C++, Java, PHP, etc.)
  • Functional (Lisp, APL/J, etc.)
  • Languages for logical programming (Prolog)

Algorithm - a sequence of solutions of a task which consists of commands for executing such actions which the executor is capable of doing. A good algorithm has to comply following requirements:

  • Finality - to be applicable in a practice, the algorithm has to terminate its action in a sufficiently short time.
  • Elementariness - based on simple steps which are understandable, easy and clear for the executer (computer, human).
  • Determinacy - at each time the algorithm is executed it has to be clear what activity is to follow or whether the algorithm is finished.
  • Resultant - the algorithm has to solve a given problem, i. e. the calculation gives the final result after the final step.
  • Collectiveness - the algorithm should be (but not always is) applicable to the entire class of accessible input data. Some algorithms are focused on a specific problem and it is not possible to change the input data.
  • Effectiveness - this feature of the algorithm is very important especially when processing large amounts of data. The point is to make the calculation in the shortest time possible while using as little resources as possible.

Algorithmisation - the ability to actively create algorithms for a non-thinking device. It is a necessary part of the ability to program.

Key (selected) words - words that can not be used in any other meaning than that for which they are intended.

Assignment command - allows to assign a certain value, such as a variable. On the left is always the variable identifier or an expression and the assigned value is on the right.

Identifier - label or name of program objects such as constants, variable types, procedures, functions etc. The identifier should express the content and nature, it must not begin with a numeral, it must not contain a gap, accented letters, and it must not match the keyword. We are not allowed to use the same identifier to refer to more than one object.

Constant - represents an unchanging value. It can be expressed either directly (e. g. numerical constant) or it can be defined in the declaration section of the program (title = 'Measurement results').

Variable - represents a logical memory location that has its labelling by which we access it (e. g. to assign a value), and its value may change during the calculation. Labelled variables are established into the program by declarations: the declaration of the variable is determined not only by its identifier (the label) but also by the data type which defines the set of permissible values of the variable. We distinguish between global and local variables.

Parameter - a special type of a variable used as the input value storage.

Definition - a complete determination of an object, e. g. the definition of the variable is the determination of the data type and its value.

Declaration - a statement of the existence of an object; for instance it can be used to determine the type of a certain variable (e. g. int a;). We distinguish between global declarations which apply to the entire program, and local declarations which only apply to the part of the program.

Condition - a logical expression, i. e. finding relations between expressions, where multiple conditions may be bound by logical operators AND = 'and simultaneously', OR = 'other option' and NOT = 'contrary'.

Commentary - contains a text which explains the meaning of the objects and the design of the program, describes the parts of the program so that it can be easy to orientate in the program even after a long time.

Operator - a symbol indicating the need to perform a certain activity or operation. We identify arithmetic, logical or comparative operators, e. g. a>b, a+b.

Operation - an activity, in a program symbolized by operators, which require one or more arguments to do it, e. g. variables, figures.

Data type - determines which components the variable can acquire as values and which operations can be used for the variable.

Procedure - a sequence of commands which solve a sub-task.

Function - a sequence of commands which have the task of calculation some result, some value. 

Vytvorte si webové stránky zdarma! Táto stránka bola vytvorená pomocou služby Webnode. Vytvorte si vlastný web zdarma ešte dnes! Vytvoriť stránky