Monday, August 26, 2013

Program control structures


Program control structures

  • During the early days of program development, the programmers developed large programs with logics of processing operations. 
  • Understandings the logic of such programs was very difficult for someone other than the developers. 
  • Hence, these programs were very difficult to modify for incorporating suggested enhancement and became very difficult for maintenance. 
  • Such problem was soon identified and the designers were contemplating into what factors contributed to unnecessary program complexity and how to develop program logics that are easier to comprehend resulting in easier maintenance of the corresponding program. 
  • Therefore , the designer could be expressed by using only the following three simple structures 
1. Sequence control structure
2. Selection control structure

3. Iteration control structure (Looping)
1.  Sequence control structure
  • The sequence logic is used for performing instructions one after another. 
  • Thus the pseudo code instructions of sequence logic are written in an order in which they are to be performed. 
  • This is denoted by writing one instruction or action one after another each instruction as a line by itself. 
  • The logic flow of pseudo code is top to bottom approach.