- In these types of programming languages, the program is written with a single function. A program is not divided into parts; hence it is named as monolithic programming. It is also called single thread execution.
- When the program size increases it leads to difficulty.
- In monolithic programming languages such as basic and assembly language, the data variables declared are global and the statements are written in sequence.
- The program contains jump statements such as goto that transfers control to any statement as specified in it. Figure shows a program of monolithic type. The global data can be accessed from any portion of the program. Due to this reason the data is not fully protected.
- The concept of sub-programs does not exist, and hence is useful for small programs.
Program in monolithic programming
- Sometimes known as modular programming.
- Programs written are more efficient and easier to understand and modify.
- The procedural/structured programming languages are similar to solving a problem by human. In a nut shell, humans attempt a problem by adopting a sequence of operations.
- It makes use of a top-down design model in which a program developer maps out the overall program structure into separate subsections.
- Large size programs can be developed in structured programming such as Pascal and C. Programs are divided in multiple sub-modules.
- Procedural/Structured programming languages such as FORTRAN, BASIC, ALGOL, COBOL, C, etc., are divided into a number of segments called as subprograms. There is a main function and it invokes subprograms. Thus, it focuses on functions apart from data. Figure describes a program of procedural/structured type. It shows different sub-programs accessing the same global data. Here also the programmer can observe the lack of secrecy.
- The control of program can be transferred using unsafe goto statement.
- This type of programming language uses different control structures that are as follows.
- Decision/selection control statements
- Iteration control statements
- Jump control statements
- Data are global and all the sub-programs share the same data, i.e. data are globally accessible to all functions. Thus, any function operates on the global data and this directs to loosing some vital information. We can conclude here that a module represents a function.
- Procedural structured/programming languages permit data transfer through messages by means of functions.
- Least importance is given to the data in procedural/structured programming languages.
- These languages are used for developing medium-sized software applications.
- Complier and interpreter construction are easy and simple with this type of programming language. Furthermore, these compilers and interpreters need low memory to run on the computers.
- It is difficult to implement simultaneous processes/parallelization.
Program in procedural/structured programming