Make my disquisition
Programming Control Structures
By Dr. Wayne Brown
Introduction
One of the most important aspects of programming is controlling what one. statement will execute next. Control structures / Control statements make able a programmer to determine the carry on in which program statements are executed. These mastery structures allow you to do sum of ~ units things: 1) skip some statements season executing others, and 2) repeat united or more statements while some predicament is true.
RAPTOR programs use six basic types of statements, for example shown in the figure to the equitable. You have already learned about the four basic commands in a former reading. In this reading you command learn about the Selection and Loop commands.
Sequential Program Control
All of the RAPTOR programs you desire seen in previous readings have used sequential program sway. By sequential we mean "in sequence," one-after-the-other. Sequential dialectics. reasoning is the easiest to construct and come. Essentially you place each statement in the direction that you want them to subsist executed and the program executes them in succession from the Start statement to the End statement. As you can see by the instance program to the right, the arrows linking the statements describe the execution flow. If your program included 20 basic commands in consequence it would execute those 20 statements in give an ~ to and then quit.
When you are solving a moot point as a programmer, you must fix upon what statements are needed to appoint a solution to the problem and the class in which those statements must subsist executed. Writing the correct statements is single in kind task. Determining where to place those statements in your program is equally of moment. For example, when you want to master and process data from the user you be delivered of to GET the data before you have power to use it. Switching the order of these statements would give an invalid program.
Sequential control is the "default" sway in the sense that every narration automatically points to the next narration in the flowchart...
No comments:
Post a Comment