answersLogoWhite

0

What is structural programing?

Updated: 4/28/2022
User Avatar

Wiki User

11y ago

Best Answer

Structured programming (sometimes known as modular programming) is a subset of procedural programming that enforces a logical structure on the program being written to make it more efficient and easier to understand and modify. Certain languages such as Ada, Pascal, and dBASE are designed with features that encourage or enforce a logical program structure.

User Avatar

Vincent Hilpert

Lvl 13
2y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

"Computer programming in which the statements are organized in a specific manner to minimize error or misinterpretation."
To Know what Structured Programming in simple terms and appreciate its advantages we need to visualize how a program is being coded in machine language. First we need to understand how the task would be achieved with a Assembly level language. Second this will expose the various problems, types of problems with this approach and Third how structured programming solves them which was an improvement in the software developement Method.

Machine(hardware) level code can be directly executed on the machine But looking at a program written in machine code is difficult enough much less write or understand it. Assembly language is the symbolic representation of machine (hardware) code instructions on a one to one mapping. It helped the early programmers to code machine(hardware) level code using Assembly Language. Then a separate program called Assembler would have to be run which converted the program written in assembly level language to a program that is represented in machine code but did the same task that the assembly level program does.

Now there were problems with writing programs in assembly level language aslo. These problems could be divided in to two categories:

1) Problem inherent with the Tool used (Assembly programming) to write the program

2) Problem external that is the logic used to write the program to make it work

It is the problems which are inherent in the tools we choose to solve the software problem is what we will concentrate to explain here to help understand why we chose structured programming over assembly and the 2nd category is a vast topic that is not related to this.

One of the useful(powerful) and also the most error prone features in assembly language is the use of Goto-Statements to jump to another location in memory and start executing from that location.

Th Goto statements helped programmers to write the logic in their program. But Because writing simple programs was complex enough. It created logical problems that made it difficult to understand and know what the program was doing. The flow of control in the program could not be predicted easily and this complexity made it very hard for programmers to understand how the program worked (logic of the program) and further made it hard to debug them.

( Today the scenario is different. Although today Assembly language is still required, It as a step in the overall process of converting a program written by programmer into a program that is a representation of machine language and does same task that is coded in the programmer written program. In this process it is no longer required for the programmer to look at assembly level programs at all it is automated. The process of conversion is taken care by a separate program called the Compiler. It takes care of converting the program that is written by programmer into an Assembly language program and the Assembler (also part of compiler) converts it into machine language executable.)

Because of these disadvantages with programming in Assembly language programs developers and researches proposed Structured programming concept. There are deep theories to propose structured concept from great philosophers to great mathmaticians. But the over all effect is that it over comes the disadvantages of programming in Assembly level language. It is known and proven in structured programming that any logic problem can be solved using just three types of statements:

1) sequential

2) conditional

3) looping statements

Structured programming also proposes that each statement will have a single entry and single exit point so that it is easy to understand and easy to debug. This is very important to get the statement to do just what we intend to do so that we can have a predictable behaviour.

In sequential statements the control passes in a sequential order in the structured language program. that is once the current statement is executed the control passes to the following statement in a sequence.

Conditional statements has a multiple parts. it has a statements section and a conditional evaluation section. The condition evaluation section is executed first which should evaluate to true or false (called boolean condition) and depending on the value an appropriate statement section is evaluated. Once this is executed once the conditional statement finishes and the control passes to the statement following the conditional statement in a sequence.

Looping statements also has two parts. It has a condition evaluation section and a statement section. First the condition evaluation section is evaluated and depending on the value of the evaluation the statement section is executed if the conditional value is true or else exits the loop statement if the value is false. It the value is true after executing the statement section the conditional evaluation section is executed again. This cycle is continued until the result of the evaluation turns out to be false.

The statement section in the above paragraphs is comprised of one or more statements where each can be any one of the 3 types of statements mentioned above.

Ultimately the program has to be converted into machine language after it is being converted into assembly language. Every statement in a structured program maps to multiple statements in Assembly language. This helps structured program to achieve more with less number of statements and is easy to understand and requires less effort to program.

Conditional and looping statements are converted or implemented in assembly language statements using Goto statements but the unpredictability of the jumping to another location to start executing from that location and losing track of the logic that the program is doing is eliminated when the structured programming concept is applied from a language will implements structured programming concepts.

Structured programming programs are easier to write and understand, because their statements designed in such a language are macros (substituted by (many)assembly statements) and worded appropriately such that it is more intuitive to the programmer writing programs in that language while solving a particular type of logic problem. There are typically few statements in the program. The inherent problem with goto's is completely eliminated in the structured programming. Although some times goto statement is still supplied in a structured programming language, it is considered a bad programming practice. Although a structured programming is easy to understand and hence write and modify, It also provides such strucures as functions that will help you reduce redundancy and lessen the size of the program. The functions also are implemented using goto statements in assembly language but lot of tasks are taken care for you like maintaining the stack and local varialbes and destroying the variables when returning back from that function resuming execution at the statement following the function call statement.

Hence Structured programming is a Big improvement in the developement of programs and software from the earliest times.
a. Having a well-defined structure or organization; highly organized: a structured environment.

b. Arranged in a definite pattern.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is structural programing?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Short note on structural programming and procedural programming?

There is no difference between procedural programing language & structure programing language.


Is c programing a procedure oriented programing?

yes


What are some jobs or careers that involve the use of computers?

programing ---- programing ----


What is difference java and visual basic programming?

java is a server side programing where as visual basic is a client side programing(This programing Language is different from oops)


Why you need C programming?

C- Programing is basically a programing language of a computer. It helps to create software programing language which is usefull in creating softwares & data base programes. C programing language is the first & basic programing language. Other programing languages are:- C, C++ & C# (latest).


What is the advantage of using MSW LOGO?

MSW logo is a simple programing language. It gives an idea for programing as it very simple


How do robots do a task?

By following their programing.


3 programing languages?

dork


How do robot do a task?

By following their programing.


What the two major of computer programs?

In computer programs majorly two programs are there. 1.System programing 2.Application Programing


What do you mean by c?

c is a programing language


What is statement in C programing?

One of the statements, obviously.