CHAPTER 7 Iterative Processing In
CHAPTER 7 Iterative Processing In Chapter 6, you learned how to set up conditional tests that control the logical flow of program code within your REALbasic applications. In this chapter, you learn how to set up loops to process large amounts of data or to repeatedly execute a set of statements over and over again. REALbasic provides support for a number of different types of loops and you learn how to work with each type. In addition, you also learn how to work with a number of new controls, such as the ListBox, ComboBox, PopupMenu, ProgressBar, and MoviePlayer controls. Specifically, this chapter teaches you how to Set up and control different types of loops Programmatically break out of endless loops Terminate endless loops from within the REALbasic IDE Work with the ListBox, ProgressBar, PopupMenu, GroupBox, and MoviePlayer controls Processing Data with Loops Any time you need to process large amounts of data or to perform a series of code statements over and over again, you need set up a loop. A loop is just a series of statements, processed as a block, that execute repeatedly until a certain condition is met. For example, you could create a loop that collects user input until the user clicks a Finished button. You could also set up a loop to open a file and read every line in the file until the end of the file is reached. Or, you could set up a loop that iterates until a given variable is set to a certain value. The number of cases where loops come in handy is endless. By enabling you to process the same code statements over and over again, loops help to streamline program code by letting you process any amount of data by reusing the same set of code statements. Loops are ideal for driving any repetitive tasks and for processing the contents of arrays. You see examples of how to perform both of these types of tasks in this chapter. While, in most cases, you can use any one of the types of loops supported in REALbasic to perform a given task, each of these loops has certain qualities that differentiate them and make them better suited to particular types of tasks.
Please visit our professional web hosting services to find out about cheap and reliable webhost service that will surely answer all your demands.