Modular programming

Modular programming works on the principle of "divide and conquer." Worth sorting out.

Modular programming involves organizing a program as a set of independent blocks of small sizes, which are usually called modules, the behavior and structure of which are completely subordinate to well-defined principles. It is worth dividing the application of the concept of “module” when there is a syntactic unit of a programming language in mind and when it is a question of a unit for splitting a large program into several blocks, which can be implemented both in the form of procedures and in the form of functions. The use of modular programming makes it possible to simplify program testingand timely error detection. It is possible to strictly separate hardware-dependent tasks from other subtasks, which will improve the mobility of created programs. Time-critical modules can be redone separately, which greatly simplifies the process and makes the efficiency much higher. In addition, modular programming is much easier to understand, since modules can be effectively used as building blocks in other programs.

«» . - , . , , . : « ». , . , , . , , , . , . , .

, , - . Turbo Pascal . , , - . , , , , . .

If you look at Pascal modules from the programmer’s point of view, their number should be determined by decomposing the task into a number of sub-tasks that are independent of each other. In the extreme case, the module can be used to conclude in it only one procedure, if it is required that the local action that it performs is completely independent of the influence of other parts of the program when changes are made to the project code.




All Articles