Professional Documents
Culture Documents
A control break is a temporary detour in the logic of a program A control break program is when a change in the value of a variable initiates special actions or causes special or unusual processing to occur If you have ever read a report that lists items in groups, with each group followed by a subtotal, then you have read a type of control break report
Programs that sort records take records that are not in order and rearrange them so that they are in order
Programming Logic and Design, Third Edition Introductory 3
Figure 7-2 shows the desired outputa simple list of employee names
Programming Logic and Design, Third Edition Introductory 4
10
11
12
Suppose you want to print out a list of all the books that your store carries, with a total number of books at the bottom of the list, as shown in Figure 7-13 You can use the logic shown in Figure 7-14
Programming Logic and Design, Third Edition Introductory 14
15
16
17
20
The input file you use to create a multiple-level control break report must be presorted, just like the files used to create a single-level control break
Programming Logic and Design, Third Edition Introductory 21
23
25
Summary
A control break is a temporary detour in the logic of a program;
programmers refer to a program as a control break program when a change in the variable initiates special actions or causes special or unusual processing to occur
You use a control break field to hold data from a previous record
Programming Logic and Design, Third Edition Introductory 26