What is Structured Programming
The Fundamental Principle of Structured Programming is that at all times and under all circumstances, the programmer must keep the program within his intellectual grasp. The well-known methods for achieving this can be briefly summarized as follows: 1) top-down design and construction, 2) limited control structures, and 3) limited scope of data structures.
The normal or procedural method of programming with other or even with OOP supported language is conceptually known as structured programming. Though there are some different options regarding ‘structure’ or data structure and procedure, the whole theme of such concept is actually almost the same. The main program itself is a function or procedure in structured programming. A typical example of structured programming is FORTRAN.
Around 1970, computer science experts started discussing the new idea of structured programming. After some debate, the consensus emerged, at least within the field of computer science, that structure is a good practice to encourage. Pascal was one of the first widely popular languages to adopt an aggressive restructured approach.
Keeping a historical perspective, you must remember that at the time that the academic community equated unstructured with bad programming style, probably 99 percent of the world's programmers learned how to program in a college setting. If you learned how to write software, you learned structure. Everybody agreed that it was the way to program.
In the late 1970s and early 1980s, something happened. Low-cost microcomputers from Commodore, Apple, Radio Shack, and other companies made home computing affordable. Most personal computers came with BASIC-the language invented before structured programming. Most computer owners learned BASIC from books, magazines, or friends-outside of an academic environment. Suddenly there were millions of people happily writing unstructured programs. Computer scientists were aghast.
Let's propose two general rules of structured programming, both of which relate to coding style. The first rule is that when you program, you should be organized and separate the program into bite-sized sections. The second rule is that you should write programs that are easy for other people to read.
The first is the most important rule. It's sometimes called modular programming. As you write a program, you split it up into modules or subroutines. Instead of running straight through from line 10 to line 5000, divide it up. Replace the mammoth 500-line program with five 100-line routines, each of which in turn has about five 20-line routines.
If others, including teachers or programmers, will see your program, they'll be able to read it more easily if you write in a structured style. Most, it's embarrassing to have someone look at a sloppily-written program you wrote. What about programs you write for your own use that no one else will see? The time may come when you need to change something. A spaghetti program you wrote six months before is nearly impossible to follow.
The proponents of unstructured style say, "If the program works, it works. The rules of structure are a fetter on my creativity. Besides, if no one else ever sees the program, it doesn't matter if the listing looks pretty."
The conceptual meaning of normal programming language and structured programming language is almost the same. Using of, so called, procedures, functions or structures are not the meaning but the usual concept and the definition of structured programming such as- Pascal, Fortran, C and in some case Basic or Lispo also.
The definition and the difference of structured programming languages and the object oriented ones will get clearer as we will further proceed in depth of our study.
Page-2