This preview shows page 1. Sign up to view the full content.
Unformatted text preview: indentation in
pseudocode is the same technique used with the various programming languages. Its sole
purpose is to clarify the logical structure of the program. With this technique, we can tell
at a glance, which statements make up each of the logic structure of the total program
logic. To fully appreciate this factor, the reader should compare the equivalent nonindented pseudocode of Figure 11.21 with that of Figure 11.20. The difference in clarity
would be far greater if this were a longer pseudocode covering, for instance, one or more
Set Count to zero Read first student record
DO WHILE Sexcode is not equal to Z
IF Sexcode = F THEN
IF Percentage = > 45 THEN
IF Percentage < 60 THEN
Write output data >• Add 1 to Count
Read next student record
Advantages and Limitations of Pseudocode
Pseudocode has three main advantages:
Converting a pseudocode to a programming language is much more easier than
converting a flowchart or a decision table to a programming language.
2. As compared to a flowchart, it is easier to modify the pseudocode of a program logic
when program modifications are necessary.
Writing of pseudocode involves much less time and effort than drawing an
equivalent flowchart. Pseudocode is easier to write than an actual programming language
because it has only a few rules to follow, allowing the programmer to concentrate on the
logic of the program.
Pseudocode, however, suffers from the following limitations:
1. In case of pseudocode, a graphic representation of program logic is not available.
2. There are no standard rules to follow in using pseudocode. Different programmers
use their own style of writing pseudocode and hence communication problem occurs due
to lack of standardization.
3. For a beginner, it is more difficult to follow the logic of or write pseudocode, as
compared to flowcharting.
Points to Remember
1. In order to ensure that the program instructions are appropriate for the problem at
hand and in the correct sequence, programs must b...
View Full Document
- Spring '14