00000000: 61 64 65 73 20 20 75 73 65 64 20 6F 6E 20 61 20 |ades used on a |
00000010: 63 61 72 20 6F 72 20 74 72 75 63 6B 2E 20 20 20 |car or truck. |
00000020: 54 68 65 20 76 61 72 69 61 6E 74 20 72 65 63 6F |The variant reco|
00000030: 72 64 20 6C 65 74 73 20 75 73 20 0D 0D 20 20 20 |rd lets us .. |
00000040: 20 20 20 20 20 64 65 66 69 6E 65 20 20 74 68 65 | define the|
00000050: 20 64 61 74 61 20 70 72 65 63 69 73 65 6C 79 20 | data precisely |
00000060: 66 6F 72 20 65 61 63 68 20 76 65 68 69 63 6C 65 |for each vehicle|
00000070: 20 77 69 74 68 6F 75 74 20 20 77 61 73 74 69 6E | without wastin|
00000080: 67 20 0D 0D 20 20 20 20 20 20 20 20 64 61 74 61 |g .. data|
00000090: 20 73 74 6F 72 61 67 65 20 73 70 61 63 65 2E 0D | storage space..|
000000A0: 0D 0D 0D 0D 20 20 20 20 20 20 20 20 20 20 20 20 |.... |
000000B0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
000000C0: 20 20 20 20 20 20 50 61 67 65 20 34 32 0D 0D 0D | Page 42...|
000000D0: 0D 0D 0D 0D 0D 0D 0D 20 20 20 20 20 20 20 20 20 |....... |
000000E0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
000000F0: 20 20 43 48 41 50 54 45 52 20 39 20 2D 20 52 65 | CHAPTER 9 - Re|
00000100: 63 6F 72 64 73 0D 0D 0D 20 20 20 20 20 20 20 20 |cords... |
00000110: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
00000120: 20 20 20 57 48 41 54 20 49 53 20 41 20 54 41 47 | WHAT IS A TAG|
00000130: 2D 46 49 45 4C 44 3F 0D 0D 20 20 20 20 20 20 20 |-FIELD?.. |
00000140: 20 20 20 20 20 49 6E 20 74 68 65 20 72 65 63 6F | In the reco|
00000150: 72 64 20 64 65 66 69 6E 69 74 69 6F 6E 20 77 65 |rd definition we|
00000160: 20 68 61 76 65 20 74 68 65 20 75 73 75 61 6C 20 | have the usual |
00000170: 52 45 43 4F 52 44 20 68 65 61 64 65 72 20 0D 0D |RECORD header ..|
00000180: 20 20 20 20 20 20 20 20 66 6F 6C 6C 6F 77 65 64 | followed|
00000190: 20 20 62 79 20 74 68 72 65 65 20 76 61 72 69 61 | by three varia|
000001A0: 62 6C 65 73 20 64 65 66 69 6E 65 64 20 69 6E 20 |bles defined in |
000001B0: 74 68 65 20 73 61 6D 65 20 20 6D 61 6E 6E 65 72 |the same manner|
000001C0: 20 20 61 73 20 0D 0D 20 20 20 20 20 20 20 20 74 | as .. t|
000001D0: 68 65 20 72 65 63 6F 72 64 73 20 69 6E 20 74 68 |he records in th|
000001E0: 65 20 6C 61 73 74 20 74 77 6F 20 65 78 61 6D 70 |e last two examp|
000001F0: 6C 65 20 70 72 6F 67 72 61 6D 73 2E 20 20 20 54 |le programs. T|
00000200: 68 65 6E 20 77 65 20 63 6F 6D 65 20 0D 0D 20 20 |hen we come .. |
00000210: 20 20 20 20 20 20 74 6F 20 74 68 65 20 43 41 53 | to the CAS|
00000220: 45 20 73 74 61 74 65 6D 65 6E 74 2E 20 20 46 6F |E statement. Fo|
00000230: 6C 6C 6F 77 69 6E 67 20 74 68 69 73 20 73 74 61 |llowing this sta|
00000240: 74 65 6D 65 6E 74 2C 20 74 68 65 20 72 65 63 6F |tement, the reco|
00000250: 72 64 20 0D 0D 20 20 20 20 20 20 20 20 69 73 20 |rd .. is |
00000260: 20 64 69 66 66 65 72 65 6E 74 20 20 66 6F 72 20 | different for |
00000270: 20 65 61 63 68 20 6F 66 20 74 68 65 20 66 6F 75 | each of the fou|
00000280: 72 20 74 79 70 65 73 20 20 64 65 66 69 6E 65 64 |r types defined|
00000290: 20 20 69 6E 20 20 74 68 65 20 0D 0D | in the .. |
ADES USED ON A CAR OR TRUCK. THE VARI
ANT RECORD LETS US .. DEFINE THE
DATA PRECISELY FOR EACH VEHICLE WITHOUT
WASTING .. DATA STORAGE SPACE..
.... PA
GE 42..........
CHAPTER 9 - RECORDS...
WHAT IS A TAG-FIELD?..
IN THE RECORD DEFINITION WE HAVE TH
E USUAL RECORD HEADER .. FOLLOWED
BY THREE VARIABLES DEFINED IN THE SAME
MANNER AS .. THE RECORDS IN TH
E LAST TWO EXAMPLE PROGRAMS. THEN WE C
OME .. TO THE CASE STATEMENT. FO
LLOWING THIS STATEMENT, THE RECORD ..
IS DIFFERENT FOR EACH OF THE FOU
R TYPES DEFINED IN THE ..
×
C64 Image
> CLICK IMAGE PREVIEW FOR FULL MODAL