Info Cfp

MAKING BAR GRAPHS LEARNING ABOUT READ DATA You know two ways to assign a value to a memory cell name. One is to use an assignment statement such as A 3. The second is to use an INPUT statement such as INPUT A. In the last case the value is entered through the keyboard. In this chapter you will learn another method of assigning values to memory cell names. The values to be assigned are stored in the program in DATA statements. They are assigned to memory cell names by using a READ statement. 1....

Displaying The Flag

The American flag has 13 stripes. If we use 3 graphics 5 lines for each stripe, we will require 39 lines. Since there are 40 rows in the graphics 5 mode, this will work out well. The star field shown in Figure 7.16 is 21 rows high, which corresponds to the top 7 stripes of the flag. This is the correct size of the star field. The basic program shown in Figure 7.22 will display the 13 stripes of the flag. Lines 50-150 are just the algorithm shown in Figure 7.18 with N 13, W 3, and L 71. This...

PRESS ANY KEY TO CONTINUE Hpl

In order to read a word selected at random from the file N , we might read X 1 dummy words and then read word number X, where X is some random integer. The subroutine shown in Figure 15.31 will do this. It is called in line 3080 in Figure 15.22 when key 3 is pressed. The user enters the maximum number of words in the file in line 3315. The usual read setup subroutine in Figure 15.25 is called in line 3320. Suppose that you have created a data file called WORDS that contains a large number of...