home *** CD-ROM | disk | FTP | other *** search
Unknown | 1987-12-12 | 25.0 KB |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was not able to be converted.
This format is not currently supported by dexvert.
Confidence | Program | Detection | Match Type | Support
|
---|
1%
| dexvert
| WANG Integrated Word Processor (document/wangIWP)
| ext
| Unsupported |
1%
| dexvert
| Excellence! Document (document/excellenceDocument)
| ext
| Unsupported |
1%
| dexvert
| Norton Textra Writer (document/textraWriter)
| ext
| Unsupported |
1%
| dexvert
| IBM DisplayWrite Document (document/ibmDisplayWriteDocument)
| ext
| Unsupported |
100%
| file
| data
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 1b 32 1b 55 00 1b 36 1b | 38 1b 41 0c 1b 32 1b 47 |.2.U..6.|8.A..2.G|
|00000010| 1b 43 42 0d 0a 0d 0a 0d | 0a 0d 0a 20 20 20 20 20 |.CB.....|... |
|00000020| 1b 45 43 48 41 50 54 45 | 52 20 31 1b 46 20 20 20 |.ECHAPTE|R 1.F |
|00000030| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 1b 45 | | .E|
|00000040| 20 20 53 4f 4d 45 20 42 | 41 53 49 43 20 42 41 53 | SOME B|ASIC BAS|
|00000050| 49 43 53 20 1b 46 20 20 | 20 20 20 20 20 20 20 20 |ICS .F | |
|00000060| 20 20 20 20 20 20 20 1b | 45 43 48 41 50 54 45 52 | .|ECHAPTER|
|00000070| 20 31 0d 0a 0d 0a 0d 0a | 20 20 20 20 20 1b 46 50 | 1......| .FP|
|00000080| 72 6f 67 72 61 6d 6d 69 | 6e 67 2c 20 69 6e 20 63 |rogrammi|ng, in c|
|00000090| 6f 6e 63 65 70 74 2c 20 | 69 73 20 73 69 6d 70 6c |oncept, |is simpl|
|000000a0| 65 2e 20 20 59 6f 75 20 | 70 72 6f 76 69 64 65 20 |e. You |provide |
|000000b0| 61 20 63 6f 6d 70 75 74 | 65 72 20 77 69 74 68 20 |a comput|er with |
|000000c0| 61 20 73 65 74 0d 0a 20 | 20 20 20 20 6f 66 20 69 |a set.. | of i|
|000000d0| 6e 73 74 72 75 63 74 69 | 6f 6e 73 20 6f 6e 20 68 |nstructi|ons on h|
|000000e0| 6f 77 20 74 6f 20 64 6f | 20 22 73 6f 6d 65 74 68 |ow to do| "someth|
|000000f0| 69 6e 67 22 2e 20 20 54 | 68 65 20 63 6f 6d 70 75 |ing". T|he compu|
|00000100| 74 65 72 20 74 68 65 6e | 20 66 6f 6c 6c 6f 77 73 |ter then| follows|
|00000110| 0d 0a 20 20 20 20 20 74 | 68 6f 73 65 20 69 6e 73 |.. t|hose ins|
|00000120| 74 72 75 63 74 69 6f 6e | 73 20 61 6e 64 20 65 76 |truction|s and ev|
|00000130| 65 72 79 62 6f 64 79 20 | 69 73 20 68 61 70 70 79 |erybody |is happy|
|00000140| 2e 20 20 49 66 20 79 6f | 75 20 62 65 6c 69 65 76 |. If yo|u believ|
|00000150| 65 20 74 68 61 74 2c 20 | 79 6f 75 27 76 65 0d 0a |e that, |you've..|
|00000160| 20 20 20 20 20 6e 65 76 | 65 72 20 68 61 64 20 61 | nev|er had a|
|00000170| 20 66 6f 75 72 20 79 65 | 61 72 20 6f 6c 64 2e 20 | four ye|ar old. |
|00000180| 20 46 6f 75 72 20 79 65 | 61 72 20 6f 6c 64 73 20 | Four ye|ar olds |
|00000190| 61 6e 64 20 63 6f 6d 70 | 75 74 65 72 73 20 61 72 |and comp|uters ar|
|000001a0| 65 20 62 6f 74 68 0d 0a | 20 20 20 20 20 65 71 75 |e both..| equ|
|000001b0| 61 6c 6c 79 2c 20 61 6e | 64 20 6d 69 6e 64 6c 65 |ally, an|d mindle|
|000001c0| 73 73 6c 79 2c 20 6c 69 | 74 65 72 61 6c 2e 0d 0a |ssly, li|teral...|
|000001d0| 0d 0a 20 20 20 20 20 4c | 69 6b 65 20 61 6e 79 74 |.. L|ike anyt|
|000001e0| 68 69 6e 67 20 65 6c 73 | 65 2c 20 70 72 6f 67 72 |hing els|e, progr|
|000001f0| 61 6d 6d 69 6e 67 20 69 | 73 20 61 73 20 64 69 66 |amming i|s as dif|
|00000200| 66 69 63 75 6c 74 20 61 | 73 20 6f 6e 65 20 63 68 |ficult a|s one ch|
|00000210| 6f 6f 73 65 73 20 74 6f | 20 6d 61 6b 65 0d 0a 20 |ooses to| make.. |
|00000220| 20 20 20 20 69 74 2e 20 | 20 49 74 20 63 61 6e 20 | it. | It can |
|00000230| 62 65 20 66 61 63 69 6c | 69 74 61 74 65 64 20 74 |be facil|itated t|
|00000240| 68 72 6f 75 67 68 20 70 | 72 6f 70 65 72 20 70 72 |hrough p|roper pr|
|00000250| 6f 67 72 61 6d 6d 69 6e | 67 20 70 72 61 63 74 69 |ogrammin|g practi|
|00000260| 63 65 73 20 6f 72 0d 0a | 20 20 20 20 20 63 6f 6d |ces or..| com|
|00000270| 70 6c 69 63 61 74 65 64 | 20 74 68 72 6f 75 67 68 |plicated| through|
|00000280| 20 61 6e 20 61 62 73 6f | 6c 75 74 65 20 6c 61 63 | an abso|lute lac|
|00000290| 6b 20 6f 66 20 63 6f 6d | 6d 6f 6e 20 73 65 6e 73 |k of com|mon sens|
|000002a0| 65 2e 20 20 54 68 65 72 | 65 20 61 72 65 20 61 6c |e. Ther|e are al|
|000002b0| 77 61 79 73 0d 0a 20 20 | 20 20 20 62 65 74 74 65 |ways.. | bette|
|000002c0| 72 20 77 61 79 73 20 74 | 6f 20 64 6f 20 74 68 69 |r ways t|o do thi|
|000002d0| 6e 67 73 2e 20 20 45 78 | 70 65 72 69 65 6e 63 65 |ngs. Ex|perience|
|000002e0| 20 68 61 73 20 67 69 76 | 65 6e 20 75 73 20 69 6e | has giv|en us in|
|000002f0| 73 69 67 68 74 20 69 6e | 74 6f 20 67 6f 6f 64 0d |sight in|to good.|
|00000300| 0a 20 20 20 20 20 70 72 | 6f 67 72 61 6d 6d 69 6e |. pr|ogrammin|
|00000310| 67 20 73 74 79 6c 65 73 | 20 6f 76 65 72 20 74 68 |g styles| over th|
|00000320| 65 20 6c 61 73 74 20 66 | 65 77 20 79 65 61 72 73 |e last f|ew years|
|00000330| 2e 20 20 54 68 69 73 20 | 62 6f 6f 6b 20 77 65 20 |. This |book we |
|00000340| 77 69 6c 6c 20 70 72 6f | 76 69 64 65 0d 0a 20 20 |will pro|vide.. |
|00000350| 20 20 20 79 6f 75 20 77 | 69 74 68 20 74 68 65 20 | you w|ith the |
|00000360| 72 65 73 75 6c 74 73 20 | 6f 66 20 74 68 61 74 20 |results |of that |
|00000370| 65 78 70 65 72 69 65 6e | 63 65 3b 20 68 61 62 69 |experien|ce; habi|
|00000380| 74 73 20 61 6e 64 20 74 | 65 63 68 6e 69 71 75 65 |ts and t|echnique|
|00000390| 73 20 74 6f 20 64 65 61 | 6c 0d 0a 20 20 20 20 20 |s to dea|l.. |
|000003a0| 77 69 74 68 20 63 6f 6d | 6d 6f 6e 20 70 72 6f 67 |with com|mon prog|
|000003b0| 72 61 6d 6d 69 6e 67 20 | 74 61 73 6b 73 2e 20 20 |ramming |tasks. |
|000003c0| 53 74 72 75 63 74 75 72 | 65 64 20 70 72 6f 67 72 |Structur|ed progr|
|000003d0| 61 6d 6d 69 6e 67 2c 20 | 79 6f 75 20 73 65 65 2c |amming, |you see,|
|000003e0| 20 73 69 6d 70 6c 79 0d | 0a 20 20 20 20 20 63 6f | simply.|. co|
|000003f0| 6e 73 69 73 74 73 20 6f | 66 20 6c 65 61 72 6e 69 |nsists o|f learni|
|00000400| 6e 67 20 61 6e 64 20 75 | 74 69 6c 69 7a 69 6e 67 |ng and u|tilizing|
|00000410| 20 67 6f 6f 64 20 73 6f | 66 74 77 61 72 65 20 27 | good so|ftware '|
|00000420| 74 6f 6f 6c 20 6b 69 74 | 73 27 2e 0d 0a 0d 0a 20 |tool kit|s'..... |
|00000430| 20 20 20 20 41 73 20 79 | 6f 75 20 63 6f 76 65 72 | As y|ou cover|
|00000440| 20 74 68 65 20 63 68 61 | 70 74 65 72 73 2c 20 79 | the cha|pters, y|
|00000450| 6f 75 27 6c 6c 20 6e 6f | 74 65 20 74 68 61 74 20 |ou'll no|te that |
|00000460| 74 68 65 20 65 78 61 6d | 70 6c 65 73 20 61 72 65 |the exam|ples are|
|00000470| 20 66 61 69 72 6c 79 0d | 0a 20 20 20 20 20 74 72 | fairly.|. tr|
|00000480| 69 76 69 61 6c 2e 20 20 | 52 65 61 6c 20 61 70 70 |ivial. |Real app|
|00000490| 6c 69 63 61 74 69 6f 6e | 73 20 70 72 6f 67 72 61 |lication|s progra|
|000004a0| 6d 73 20 61 72 65 20 6d | 75 63 68 20 6d 6f 72 65 |ms are m|uch more|
|000004b0| 20 63 6f 6d 70 6c 65 78 | 2e 20 20 20 46 6f 72 20 | complex|. For |
|000004c0| 6e 6f 77 2c 0d 0a 20 20 | 20 20 20 79 6f 75 20 68 |now,.. | you h|
|000004d0| 61 76 65 20 65 6e 6f 75 | 67 68 20 74 6f 20 6c 65 |ave enou|gh to le|
|000004e0| 61 72 6e 20 77 69 74 68 | 6f 75 74 20 77 6f 72 72 |arn with|out worr|
|000004f0| 79 69 6e 67 20 61 62 6f | 75 74 20 74 68 65 20 61 |ying abo|ut the a|
|00000500| 64 64 69 74 69 6f 6e 61 | 6c 20 65 6c 65 6d 65 6e |dditiona|l elemen|
|00000510| 74 0d 0a 20 20 20 20 20 | 6f 66 20 63 6f 6d 70 6c |t.. |of compl|
|00000520| 65 78 69 74 79 2e 20 20 | 46 65 61 72 20 6e 6f 74 |exity. |Fear not|
|00000530| 2c 20 62 79 20 74 68 65 | 20 74 69 6d 65 20 77 65 |, by the| time we|
|00000540| 20 66 69 6e 69 73 68 20 | 79 6f 75 20 73 68 6f 75 | finish |you shou|
|00000550| 6c 64 20 68 61 76 65 20 | 6c 65 61 72 6e 65 64 0d |ld have |learned.|
|00000560| 0a 20 20 20 20 20 65 6e | 6f 75 67 68 20 74 6f 20 |. en|ough to |
|00000570| 62 65 20 64 61 6e 67 65 | 72 6f 75 73 2e 0d 0a 0d |be dange|rous....|
|00000580| 0a 20 20 20 20 20 1b 45 | 49 4e 50 55 54 2d 50 52 |. .E|INPUT-PR|
|00000590| 4f 43 45 53 53 2d 4f 55 | 54 50 55 54 0d 0a 0d 0a |OCESS-OU|TPUT....|
|000005a0| 20 20 20 20 20 1b 46 45 | 61 72 6c 69 65 72 20 77 | .FE|arlier w|
|000005b0| 65 20 64 65 66 69 6e 65 | 64 20 61 20 70 72 6f 67 |e define|d a prog|
|000005c0| 72 61 6d 20 61 73 20 61 | 20 73 65 74 20 6f 66 20 |ram as a| set of |
|000005d0| 69 6e 73 74 72 75 63 74 | 69 6f 6e 73 2e 20 20 54 |instruct|ions. T|
|000005e0| 68 65 72 65 20 61 72 65 | 20 74 68 72 65 65 0d 0a |here are| three..|
|000005f0| 20 20 20 20 20 67 65 6e | 65 72 61 6c 20 63 61 74 | gen|eral cat|
|00000600| 65 67 6f 72 69 65 73 20 | 74 68 61 74 20 74 68 65 |egories |that the|
|00000610| 73 65 20 69 6e 73 74 72 | 75 63 74 69 6f 6e 73 20 |se instr|uctions |
|00000620| 66 61 6c 6c 20 69 6e 74 | 6f 3b 20 49 4e 50 55 54 |fall int|o; INPUT|
|00000630| 2c 20 50 52 4f 43 45 53 | 53 2c 0d 0a 20 20 20 20 |, PROCES|S,.. |
|00000640| 20 61 6e 64 20 4f 55 54 | 50 55 54 2e 20 20 4c 65 | and OUT|PUT. Le|
|00000650| 74 27 73 20 6c 6f 6f 6b | 20 61 74 20 74 68 65 6d |t's look| at them|
|00000660| 20 6d 6f 72 65 20 63 6c | 6f 73 65 6c 79 3a 0d 0a | more cl|osely:..|
|00000670| 0d 0a 20 20 20 20 20 20 | 20 20 20 49 6e 70 75 74 |.. | Input|
|00000680| 20 20 20 20 2d 20 49 6e | 20 6f 72 64 65 72 20 74 | - In| order t|
|00000690| 6f 20 64 6f 20 61 6e 79 | 74 68 69 6e 67 2c 20 61 |o do any|thing, a|
|000006a0| 20 70 72 6f 67 72 61 6d | 20 6e 65 65 64 73 20 74 | program| needs t|
|000006b0| 6f 20 73 74 61 72 74 20 | 77 69 74 68 0d 0a 20 20 |o start |with.. |
|000006c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000006d0| 20 20 73 6f 6d 65 20 64 | 61 74 61 2e 20 20 44 61 | some d|ata. Da|
|000006e0| 74 61 20 6d 61 79 20 62 | 65 20 74 68 69 6e 67 73 |ta may b|e things|
|000006f0| 20 6c 69 6b 65 20 6e 61 | 6d 65 73 2c 20 62 69 72 | like na|mes, bir|
|00000700| 74 68 64 61 79 73 0d 0a | 20 20 20 20 20 20 20 20 |thdays..| |
|00000710| 20 20 20 20 20 20 20 20 | 20 20 20 20 6f 72 20 64 | | or d|
|00000720| 6f 6c 6c 61 72 73 2e 20 | 20 41 6e 79 20 64 61 74 |ollars. | Any dat|
|00000730| 61 20 74 68 61 74 20 67 | 6f 65 73 20 69 6e 74 6f |a that g|oes into|
|00000740| 20 61 20 70 72 6f 67 72 | 61 6d 20 69 73 20 69 6e | a progr|am is in|
|00000750| 70 75 74 2e 0d 0a 0d 0a | 20 20 20 20 20 20 20 20 |put.....| |
|00000760| 20 50 72 6f 63 65 73 73 | 20 2d 20 20 54 68 65 72 | Process| - Ther|
|00000770| 65 27 73 20 6e 6f 20 73 | 65 6e 73 65 20 69 6e 20 |e's no s|ense in |
|00000780| 66 65 65 64 69 6e 67 20 | 79 6f 75 72 20 70 72 6f |feeding |your pro|
|00000790| 67 72 61 6d 20 69 66 20 | 69 74 27 73 20 6e 6f 74 |gram if |it's not|
|000007a0| 0d 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.. | |
|000007b0| 20 20 20 20 20 20 67 6f | 69 6e 67 20 74 6f 20 64 | go|ing to d|
|000007c0| 6f 20 61 6e 79 74 68 69 | 6e 67 20 77 69 74 68 20 |o anythi|ng with |
|000007d0| 74 68 65 20 69 6e 70 75 | 74 2e 20 20 54 68 65 20 |the inpu|t. The |
|000007e0| 6d 61 6e 69 70 75 6c 61 | 74 69 6f 6e 0d 0a 20 20 |manipula|tion.. |
|000007f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000800| 20 20 6f 66 20 69 6e 70 | 75 74 20 64 61 74 61 20 | of inp|ut data |
|00000810| 69 73 20 63 61 6c 6c 65 | 64 20 70 72 6f 63 65 73 |is calle|d proces|
|00000820| 73 69 6e 67 2e 20 20 49 | 6e 74 65 72 65 73 74 69 |sing. I|nteresti|
|00000830| 6e 67 6c 79 2c 0d 0a 20 | 20 20 20 20 20 20 20 20 |ngly,.. | |
|00000840| 20 20 20 20 20 20 20 20 | 20 20 20 74 68 65 72 65 | | there|
|00000850| 20 61 72 65 20 6f 6e 6c | 79 20 74 77 6f 20 74 79 | are onl|y two ty|
|00000860| 70 65 73 20 6f 66 20 70 | 72 6f 63 65 73 73 65 73 |pes of p|rocesses|
|00000870| 20 69 6e 20 70 72 6f 67 | 72 61 6d 6d 69 6e 67 3b | in prog|ramming;|
|00000880| 0d 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.. | |
|00000890| 20 20 20 20 20 20 61 72 | 69 74 68 6d 65 74 69 63 | ar|ithmetic|
|000008a0| 20 61 6e 64 20 6c 6f 67 | 69 63 61 6c 3a 0d 0a 0d | and log|ical:...|
|000008b0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|000008c0| 20 20 20 20 20 41 72 69 | 74 68 6d 65 74 69 63 20 | Ari|thmetic |
|000008d0| 2d 20 41 6e 20 61 72 69 | 74 68 6d 65 74 69 63 20 |- An ari|thmetic |
|000008e0| 70 72 6f 63 65 73 73 20 | 64 6f 65 73 20 65 78 61 |process |does exa|
|000008f0| 63 74 6c 79 20 77 68 61 | 74 20 74 68 65 0d 0a 20 |ctly wha|t the.. |
|00000900| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000910| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000920| 6e 61 6d 65 20 69 6d 70 | 6c 69 65 73 2c 20 69 74 |name imp|lies, it|
|00000930| 20 70 65 72 66 6f 72 6d | 73 20 73 6f 6d 65 20 73 | perform|s some s|
|00000940| 6f 72 74 20 6f 66 0d 0a | 20 20 20 20 20 20 20 20 |ort of..| |
|00000950| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000960| 20 20 20 20 20 20 20 20 | 20 6d 61 74 68 65 6d 61 | | mathema|
|00000970| 74 69 63 61 6c 20 6d 61 | 6e 69 70 75 6c 61 74 69 |tical ma|nipulati|
|00000980| 6f 6e 20 73 75 63 68 20 | 61 73 20 61 64 64 69 74 |on such |as addit|
|00000990| 69 6f 6e 0d 0a 20 20 20 | 20 20 20 20 20 20 20 20 |ion.. | |
|000009a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000009b0| 20 20 20 20 20 20 6f 72 | 20 6d 75 6c 74 69 70 6c | or| multipl|
|000009c0| 69 63 61 74 69 6f 6e 2e | 20 20 46 6f 72 20 74 68 |ication.| For th|
|000009d0| 6f 73 65 20 77 68 6f 20 | 70 72 65 66 65 72 0d 0a |ose who |prefer..|
|000009e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000009f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000a00| 20 6d 6f 72 65 20 65 78 | 6f 74 69 63 20 73 74 75 | more ex|otic stu|
|00000a10| 66 66 2c 20 69 74 20 66 | 69 6e 64 73 20 69 6e 76 |ff, it f|inds inv|
|00000a20| 65 72 73 65 0d 0a 20 20 | 20 20 20 20 20 20 20 20 |erse.. | |
|00000a30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000a40| 20 20 20 20 20 20 20 68 | 79 70 65 72 62 6f 6c 69 | h|yperboli|
|00000a50| 63 20 63 6f 73 69 6e 65 | 73 2e 0d 0a 0d 0a 20 20 |c cosine|s..... |
|00000a60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000a70| 20 20 4c 6f 67 69 63 61 | 6c 20 20 20 20 2d 20 41 | Logica|l - A|
|00000a80| 20 6c 6f 67 69 63 61 6c | 20 70 72 6f 63 65 73 73 | logical| process|
|00000a90| 20 63 6f 6d 70 61 72 65 | 73 20 74 68 69 6e 67 73 | compare|s things|
|00000aa0| 2e 20 20 54 68 72 65 65 | 0d 0a 20 20 20 20 20 20 |. Three|.. |
|00000ab0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000ac0| 20 20 20 20 20 20 20 20 | 20 20 20 69 73 20 6c 61 | | is la|
|00000ad0| 72 67 65 72 20 74 68 61 | 6e 20 74 77 6f 2c 20 6f |rger tha|n two, o|
|00000ae0| 72 20 22 6d 79 20 66 61 | 74 68 65 72 20 63 61 6e |r "my fa|ther can|
|00000af0| 20 62 65 61 74 0d 0a 20 | 20 20 20 20 20 20 20 20 | beat.. | |
|00000b00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000b10| 20 20 20 20 20 20 20 20 | 75 70 20 79 6f 75 72 20 | |up your |
|00000b20| 66 61 74 68 65 72 22 20 | 61 72 65 20 63 6f 6d 70 |father" |are comp|
|00000b30| 61 72 69 73 6f 6e 73 2e | 20 20 54 68 65 0d 0a 20 |arisons.| The.. |
|00000b40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000b50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000b60| 63 6f 6d 70 61 72 69 73 | 6f 6e 20 72 65 73 75 6c |comparis|on resul|
|00000b70| 74 73 20 69 6e 20 74 68 | 65 20 73 65 6c 65 63 74 |ts in th|e select|
|00000b80| 69 6f 6e 20 6f 66 20 6f | 6e 65 0d 0a 20 20 20 20 |ion of o|ne.. |
|00000b90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000ba0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 6f 66 20 | | of |
|00000bb0| 74 77 6f 20 61 6c 74 65 | 72 6e 61 74 69 76 65 73 |two alte|rnatives|
|00000bc0| 2e 0d 0a 0d 0a 20 20 20 | 20 20 20 20 20 20 4f 75 |..... | Ou|
|00000bd0| 74 70 75 74 20 20 20 2d | 20 4f 62 76 69 6f 75 73 |tput -| Obvious|
|00000be0| 6c 79 20 77 65 20 6d 61 | 6e 69 70 75 6c 61 74 65 |ly we ma|nipulate|
|00000bf0| 64 20 74 68 65 20 64 61 | 74 61 20 69 6e 20 6f 75 |d the da|ta in ou|
|00000c00| 72 20 70 72 6f 67 72 61 | 6d 20 66 6f 72 20 61 0d |r progra|m for a.|
|00000c10| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00000c20| 20 20 20 20 20 72 65 61 | 73 6f 6e 2e 20 20 57 65 | rea|son. We|
|00000c30| 20 77 61 6e 74 65 64 20 | 72 65 73 75 6c 74 73 2e | wanted |results.|
|00000c40| 20 20 54 68 65 20 64 69 | 73 70 6c 61 79 20 6f 66 | The di|splay of|
|00000c50| 20 6f 75 72 20 72 65 73 | 75 6c 74 73 0d 0a 20 20 | our res|ults.. |
|00000c60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000c70| 20 20 69 73 20 63 61 6c | 6c 65 64 20 6f 75 74 70 | is cal|led outp|
|00000c80| 75 74 2e 0d 0a 0d 0a 0d | 0a 20 20 20 20 20 20 20 |ut......|. |
|00000c90| 20 20 20 20 20 20 20 20 | 20 20 1b 45 20 20 20 20 | | .E |
|00000ca0| 20 20 20 20 20 20 20 20 | 20 20 20 20 1b 46 20 20 | | .F |
|00000cb0| 20 20 20 1b 45 20 20 20 | 31 0d 0a 0d 0a 0c 0d 0a | .E |1.......|
|00000cc0| 0d 0a 0d 0a 0d 0a 1b 46 | 20 20 20 20 20 1b 45 43 |.......F| .EC|
|00000cd0| 48 41 50 54 45 52 20 31 | 1b 46 20 20 20 20 20 20 |HAPTER 1|.F |
|00000ce0| 20 20 20 20 20 20 20 20 | 20 20 20 1b 45 20 20 53 | | .E S|
|00000cf0| 4f 4d 45 20 42 41 53 49 | 43 20 42 41 53 49 43 53 |OME BASI|C BASICS|
|00000d00| 20 1b 46 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | .F | |
|00000d10| 20 20 20 20 1b 45 43 48 | 41 50 54 45 52 20 31 0d | .ECH|APTER 1.|
|00000d20| 0a 0d 0a 0d 0a 0d 0a 0d | 0a 20 20 20 20 20 46 4c |........|. FL|
|00000d30| 4f 57 20 43 48 41 52 54 | 53 0d 0a 0d 0a 20 20 20 |OW CHART|S.... |
|00000d40| 20 20 1b 46 57 65 20 62 | 75 69 6c 64 20 68 6f 75 | .FWe b|uild hou|
|00000d50| 73 65 73 20 62 61 73 65 | 64 20 6f 6e 20 62 6c 75 |ses base|d on blu|
|00000d60| 65 70 72 69 6e 74 73 2c | 20 64 65 74 61 69 6c 65 |eprints,| detaile|
|00000d70| 64 20 70 6c 61 6e 73 20 | 6f 66 20 77 68 61 74 20 |d plans |of what |
|00000d80| 67 6f 65 73 20 77 68 65 | 72 65 2e 0d 0a 20 20 20 |goes whe|re... |
|00000d90| 20 20 41 74 20 74 68 65 | 20 73 61 6d 65 20 74 69 | At the| same ti|
|00000da0| 6d 65 2c 20 6d 6f 73 74 | 20 70 65 6f 70 6c 65 20 |me, most| people |
|00000db0| 77 6f 75 6c 64 20 6d 65 | 72 72 69 6c 79 20 73 74 |would me|rrily st|
|00000dc0| 61 72 74 20 63 6f 64 69 | 6e 67 20 77 69 74 68 6f |art codi|ng witho|
|00000dd0| 75 74 20 61 0d 0a 20 20 | 20 20 20 64 65 74 61 69 |ut a.. | detai|
|00000de0| 6c 65 64 20 70 6c 61 6e | 2e 20 20 54 68 69 73 20 |led plan|. This |
|00000df0| 69 73 20 69 72 6f 6e 69 | 63 20 73 69 6e 63 65 20 |is ironi|c since |
|00000e00| 69 74 20 63 6f 73 74 73 | 20 6d 6f 72 65 20 74 6f |it costs| more to|
|00000e10| 20 70 72 6f 64 75 63 65 | 20 6d 6f 73 74 0d 0a 20 | produce| most.. |
|00000e20| 20 20 20 20 70 72 6f 64 | 75 63 74 69 6f 6e 20 70 | prod|uction p|
|00000e30| 72 6f 67 72 61 6d 73 20 | 74 68 61 6e 20 69 74 20 |rograms |than it |
|00000e40| 63 6f 73 74 73 20 74 6f | 20 62 75 69 6c 64 20 74 |costs to| build t|
|00000e50| 68 65 20 61 76 65 72 61 | 67 65 20 68 6f 75 73 65 |he avera|ge house|
|00000e60| 2e 20 20 59 6f 75 20 63 | 61 6e 0d 0a 20 20 20 20 |. You c|an.. |
|00000e70| 20 6e 6f 74 20 77 72 69 | 74 65 20 61 20 6c 61 72 | not wri|te a lar|
|00000e80| 67 65 20 70 72 6f 67 72 | 61 6d 20 77 69 74 68 6f |ge progr|am witho|
|00000e90| 75 74 20 61 20 74 6f 74 | 61 6c 20 75 6e 64 65 72 |ut a tot|al under|
|00000ea0| 73 74 61 6e 64 69 6e 67 | 20 6f 66 20 61 6c 6c 20 |standing| of all |
|00000eb0| 74 68 65 0d 0a 20 20 20 | 20 20 69 6e 70 75 74 2c |the.. | input,|
|00000ec0| 20 70 72 6f 63 65 73 73 | 69 6e 67 20 61 6e 64 20 | process|ing and |
|00000ed0| 6f 75 74 70 75 74 20 74 | 68 61 74 20 69 74 20 68 |output t|hat it h|
|00000ee0| 61 73 20 74 6f 20 70 65 | 72 66 6f 72 6d 2e 20 20 |as to pe|rform. |
|00000ef0| 54 68 65 20 66 6c 6f 77 | 63 68 61 72 74 20 69 73 |The flow|chart is|
|00000f00| 0d 0a 20 20 20 20 20 79 | 6f 75 72 20 62 6c 75 65 |.. y|our blue|
|00000f10| 70 72 69 6e 74 3b 20 61 | 20 70 69 63 74 75 72 65 |print; a| picture|
|00000f20| 20 6f 72 20 67 72 61 70 | 68 69 63 20 72 65 70 72 | or grap|hic repr|
|00000f30| 65 73 65 6e 74 61 74 69 | 6f 6e 20 6f 66 20 68 6f |esentati|on of ho|
|00000f40| 77 20 74 6f 20 22 67 65 | 74 20 74 68 65 72 65 0d |w to "ge|t there.|
|00000f50| 0a 20 20 20 20 20 66 72 | 6f 6d 20 68 65 72 65 22 |. fr|om here"|
|00000f60| 2e 20 20 54 6f 20 63 72 | 65 61 74 65 20 61 20 66 |. To cr|eate a f|
|00000f70| 6c 6f 77 63 68 61 72 74 | 2c 20 79 6f 75 20 6e 65 |lowchart|, you ne|
|00000f80| 65 64 20 74 6f 20 6b 6e | 6f 77 20 74 68 65 20 73 |ed to kn|ow the s|
|00000f90| 79 6d 62 6f 6c 73 20 74 | 68 61 74 0d 0a 20 20 20 |ymbols t|hat.. |
|00000fa0| 20 20 64 65 70 69 63 74 | 20 74 68 65 20 63 6f 6d | depict| the com|
|00000fb0| 70 6f 6e 65 6e 74 73 20 | 61 6e 64 20 74 68 65 20 |ponents |and the |
|00000fc0| 66 6c 6f 77 20 6f 66 20 | 79 6f 75 72 20 70 72 6f |flow of |your pro|
|00000fd0| 67 72 61 6d 2e 20 20 4c | 65 74 27 73 20 74 61 6b |gram. L|et's tak|
|00000fe0| 65 20 61 20 6c 6f 6f 6b | 0d 0a 20 20 20 20 20 61 |e a look|.. a|
|00000ff0| 74 20 74 68 65 20 73 79 | 6d 62 6f 6c 73 20 75 73 |t the sy|mbols us|
|00001000| 65 64 20 74 6f 20 64 69 | 61 67 72 61 6d 20 69 6e |ed to di|agram in|
|00001010| 70 75 74 2c 20 70 72 6f | 63 65 73 73 65 73 20 61 |put, pro|cesses a|
|00001020| 6e 64 20 6f 75 74 70 75 | 74 2c 20 61 73 20 77 65 |nd outpu|t, as we|
|00001030| 6c 6c 20 61 73 0d 0a 20 | 20 20 20 20 74 68 65 20 |ll as.. | the |
|00001040| 64 65 63 69 73 69 6f 6e | 73 20 61 6e 64 20 70 61 |decision|s and pa|
|00001050| 74 68 73 20 74 68 61 74 | 20 74 69 65 20 74 68 65 |ths that| tie the|
|00001060| 73 65 20 70 61 72 74 73 | 20 74 6f 67 65 74 68 65 |se parts| togethe|
|00001070| 72 2e 0d 0a 0d 0a 20 20 | 20 20 20 54 65 72 6d 69 |r..... | Termi|
|00001080| 6e 61 6c 0d 0a 0d 0a 20 | 20 20 20 20 49 74 27 73 |nal.... | It's|
|00001090| 20 6e 69 63 65 20 74 6f | 20 62 65 20 61 62 6c 65 | nice to| be able|
|000010a0| 20 74 6f 20 73 68 6f 77 | 20 77 68 65 72 65 20 61 | to show| where a|
|000010b0| 0d 0a 20 20 20 20 20 66 | 6c 6f 77 63 68 61 72 74 |.. f|lowchart|
|000010c0| 20 62 65 67 69 6e 73 20 | 61 6e 64 20 65 6e 64 73 | begins |and ends|
|000010d0| 2c 20 6f 72 20 77 68 65 | 72 65 20 74 6f 0d 0a 20 |, or whe|re to.. |
|000010e0| 20 20 20 20 63 61 74 63 | 68 20 74 68 65 20 62 75 | catc|h the bu|
|000010f0| 73 20 73 6f 20 74 6f 20 | 73 70 65 61 6b 2e 20 20 |s so to |speak. |
|00001100| 4f 62 76 69 6f 75 73 6c | 79 0d 0a 20 20 20 20 20 |Obviousl|y.. |
|00001110| 74 68 69 73 20 69 73 20 | 64 6f 6e 65 20 74 68 72 |this is |done thr|
|00001120| 75 20 61 20 74 65 72 6d | 69 6e 61 6c 2e 20 20 4f |u a term|inal. O|
|00001130| 75 72 73 0d 0a 20 20 20 | 20 20 69 73 20 6c 6f 63 |urs.. | is loc|
|00001140| 61 74 65 64 20 6f 6e 20 | 74 68 65 20 6c 65 66 74 |ated on |the left|
|00001150| 2e 0d 0a 0d 0a 20 20 20 | 20 20 49 6e 70 75 74 2f |..... | Input/|
|00001160| 4f 75 74 70 75 74 0d 0a | 0d 0a 20 20 20 20 20 54 |Output..|.. T|
|00001170| 68 65 20 73 61 6d 65 20 | 73 79 6d 62 6f 6c 20 69 |he same |symbol i|
|00001180| 73 20 75 73 65 64 20 66 | 6f 72 20 69 6e 70 75 74 |s used f|or input|
|00001190| 0d 0a 20 20 20 20 20 61 | 6e 64 20 6f 75 74 70 75 |.. a|nd outpu|
|000011a0| 74 2e 20 20 54 68 65 72 | 65 20 69 73 20 6e 6f 20 |t. Ther|e is no |
|000011b0| 74 72 75 74 68 20 74 6f | 0d 0a 20 20 20 20 20 74 |truth to|.. t|
|000011c0| 68 65 20 72 75 6d 6f 72 | 20 74 68 61 74 20 74 68 |he rumor| that th|
|000011d0| 69 73 20 69 73 20 64 75 | 65 20 74 6f 20 74 68 65 |is is du|e to the|
|000011e0| 0d 0a 20 20 20 20 20 66 | 61 63 74 20 74 68 61 74 |.. f|act that|
|000011f0| 20 73 79 73 74 65 6d 73 | 20 70 65 6f 70 6c 65 20 | systems| people |
|00001200| 64 6f 6e 27 74 20 6b 6e | 6f 77 0d 0a 20 20 20 20 |don't kn|ow.. |
|00001210| 20 77 68 65 74 68 65 72 | 20 74 68 65 79 27 72 65 | whether| they're|
|00001220| 20 63 6f 6d 69 6e 67 20 | 6f 72 20 67 6f 69 6e 67 | coming |or going|
|00001230| 2e 0d 0a 20 20 20 20 20 | 54 68 65 20 41 4b 41 20 |... |The AKA |
|00001240| 28 41 6c 73 6f 20 4b 6e | 6f 77 6e 20 41 73 29 20 |(Also Kn|own As) |
|00001250| 66 6f 72 20 74 68 69 73 | 0d 0a 20 20 20 20 20 67 |for this|.. g|
|00001260| 75 79 20 69 73 20 70 61 | 72 61 6c 6c 65 6c 6f 67 |uy is pa|rallelog|
|00001270| 72 61 6d 2e 0d 0a 0d 0a | 20 20 20 20 20 50 72 6f |ram.....| Pro|
|00001280| 63 65 73 73 69 6e 67 0d | 0a 0d 0a 20 20 20 20 20 |cessing.|... |
|00001290| 54 68 65 20 73 79 6d 62 | 6f 6c 20 6f 6e 20 74 68 |The symb|ol on th|
|000012a0| 65 20 72 69 67 68 74 20 | 72 65 70 72 65 73 65 6e |e right |represen|
|000012b0| 74 73 0d 0a 20 20 20 20 | 20 67 65 6e 65 72 61 6c |ts.. | general|
|000012c0| 20 70 72 6f 63 65 73 73 | 69 6e 67 3b 20 61 64 64 | process|ing; add|
|000012d0| 69 74 69 6f 6e 2c 0d 0a | 20 20 20 20 20 6d 75 6c |ition,..| mul|
|000012e0| 74 69 70 6c 69 63 61 74 | 69 6f 6e 20 6f 72 20 65 |tiplicat|ion or e|
|000012f0| 71 75 61 6c 69 74 79 20 | 28 6d 6f 76 69 6e 67 0d |quality |(moving.|
|00001300| 0a 20 20 20 20 20 73 6f | 6d 65 74 68 69 6e 67 20 |. so|mething |
|00001310| 66 72 6f 6d 20 6f 6e 65 | 20 6c 6f 63 61 74 69 6f |from one| locatio|
|00001320| 6e 20 74 6f 0d 0a 20 20 | 20 20 20 61 6e 6f 74 68 |n to.. | anoth|
|00001330| 65 72 29 2e 20 20 41 64 | 76 61 6e 63 65 64 20 67 |er). Ad|vanced g|
|00001340| 65 6f 6d 65 74 72 79 0d | 0a 20 20 20 20 20 73 74 |eometry.|. st|
|00001350| 75 64 65 6e 74 73 20 72 | 65 66 65 72 20 74 6f 20 |udents r|efer to |
|00001360| 69 74 20 62 79 20 61 20 | 6d 6f 72 65 0d 0a 20 20 |it by a |more.. |
|00001370| 20 20 20 65 73 6f 74 65 | 72 69 63 20 74 65 72 6d | esote|ric term|
|00001380| 2c 20 27 72 65 63 74 61 | 6e 67 6c 65 27 2e 0d 0a |, 'recta|ngle'...|
|00001390| 0d 0a 20 20 20 20 20 50 | 72 65 64 65 66 69 6e 65 |.. P|redefine|
|000013a0| 64 20 50 72 6f 63 65 73 | 73 0d 0a 0d 0a 20 20 20 |d Proces|s.... |
|000013b0| 20 20 41 73 20 79 6f 75 | 72 20 70 72 6f 67 72 61 | As you|r progra|
|000013c0| 6d 6d 69 6e 67 20 73 6b | 69 6c 6c 73 20 64 65 76 |mming sk|ills dev|
|000013d0| 65 6c 6f 70 2c 20 79 6f | 75 0d 0a 20 20 20 20 20 |elop, yo|u.. |
|000013e0| 77 69 6c 6c 20 6c 65 61 | 72 6e 20 74 6f 20 27 6d |will lea|rn to 'm|
|000013f0| 6f 64 75 6c 61 72 69 7a | 65 27 20 79 6f 75 72 20 |odulariz|e' your |
|00001400| 63 6f 64 65 2e 0d 0a 20 | 20 20 20 20 54 68 69 73 |code... | This|
|00001410| 20 69 73 20 64 6f 6e 65 | 20 74 68 72 6f 75 67 68 | is done| through|
|00001420| 20 73 75 62 70 72 6f 67 | 72 61 6d 73 20 61 6e 64 | subprog|rams and|
|00001430| 0d 0a 20 20 20 20 20 73 | 75 62 72 6f 75 74 69 6e |.. s|ubroutin|
|00001440| 65 73 2e 20 20 54 68 65 | 20 64 6f 75 62 6c 65 20 |es. The| double |
|00001450| 73 69 64 65 64 20 72 65 | 63 74 61 6e 67 6c 65 0d |sided re|ctangle.|
|00001460| 0a 20 20 20 20 20 69 73 | 20 75 73 65 64 20 74 6f |. is| used to|
|00001470| 20 64 65 70 69 63 74 20 | 74 68 69 73 20 74 79 70 | depict |this typ|
|00001480| 65 20 6f 66 20 70 72 6f | 63 65 73 73 2e 0d 0a 0d |e of pro|cess....|
|00001490| 0a 0d 0a 0d 0a 0d 0a 20 | 20 20 20 20 20 20 20 20 |....... | |
|000014a0| 20 20 20 20 20 20 20 20 | 1b 45 20 20 20 20 20 20 | |.E |
|000014b0| 20 20 20 20 20 20 20 20 | 20 20 1b 46 20 20 20 20 | | .F |
|000014c0| 20 1b 45 20 20 20 32 0d | 0a 0d 0a 0c 0d 0a 0d 0a | .E 2.|........|
|000014d0| 0d 0a 0d 0a 1b 46 20 20 | 20 20 20 1b 45 43 48 41 |.....F | .ECHA|
|000014e0| 50 54 45 52 20 31 1b 46 | 20 20 20 20 20 20 20 20 |PTER 1.F| |
|000014f0| 20 20 20 20 20 20 20 20 | 20 1b 45 20 20 53 4f 4d | | .E SOM|
|00001500| 45 20 42 41 53 49 43 20 | 42 41 53 49 43 53 20 1b |E BASIC |BASICS .|
|00001510| 46 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |F | |
|00001520| 20 20 1b 45 43 48 41 50 | 54 45 52 20 31 0d 0a 0d | .ECHAP|TER 1...|
|00001530| 0a 0d 0a 20 20 20 20 20 | 1b 46 44 65 63 69 73 69 |... |.FDecisi|
|00001540| 6f 6e 0d 0a 0d 0a 20 20 | 20 20 20 54 68 69 73 20 |on.... | This |
|00001550| 73 79 6d 62 6f 6c 20 73 | 68 6f 77 73 20 74 68 61 |symbol s|hows tha|
|00001560| 74 20 79 6f 75 72 20 6c | 6f 67 69 63 0d 0a 20 20 |t your l|ogic.. |
|00001570| 20 20 20 69 73 20 6d 61 | 6b 69 6e 67 20 61 20 64 | is ma|king a d|
|00001580| 65 63 69 73 69 6f 6e 2e | 20 20 49 74 27 73 0d 0a |ecision.| It's..|
|00001590| 20 20 20 20 20 72 65 61 | 6c 6c 79 20 74 68 65 20 | rea|lly the |
|000015a0| 73 61 6d 65 20 61 73 20 | 6c 6f 67 69 63 61 6c 20 |same as |logical |
|000015b0| 70 72 6f 2d 0d 0a 20 20 | 20 20 20 63 65 73 73 69 |pro-.. | cessi|
|000015c0| 6e 67 2c 20 61 6e 64 20 | 77 69 6c 6c 20 72 65 73 |ng, and |will res|
|000015d0| 75 6c 74 20 69 6e 20 74 | 68 65 0d 0a 20 20 20 20 |ult in t|he.. |
|000015e0| 20 73 65 6c 65 63 74 69 | 6f 6e 20 6f 66 20 6f 6e | selecti|on of on|
|000015f0| 65 20 6f 66 20 74 77 6f | 20 70 6f 73 73 69 62 6c |e of two| possibl|
|00001600| 65 0d 0a 20 20 20 20 20 | 70 61 74 68 73 2e 20 20 |e.. |paths. |
|00001610| 52 75 6d 6f 72 20 68 61 | 73 20 69 74 20 74 68 61 |Rumor ha|s it tha|
|00001620| 74 20 69 74 27 73 0d 0a | 20 20 20 20 20 61 20 67 |t it's..| a g|
|00001630| 69 72 6c 27 73 20 62 65 | 73 74 20 66 72 69 65 6e |irl's be|st frien|
|00001640| 64 20 28 74 68 65 20 64 | 69 61 6d 6f 6e 64 0d 0a |d (the d|iamond..|
|00001650| 20 20 20 20 20 74 68 61 | 74 20 69 73 2c 20 6e 6f | tha|t is, no|
|00001660| 74 20 61 20 64 65 63 69 | 73 69 6f 6e 29 2e 0d 0a |t a deci|sion)...|
|00001670| 0d 0a 20 20 20 20 20 46 | 69 6c 65 0d 0a 0d 0a 20 |.. F|ile.... |
|00001680| 20 20 20 20 41 73 20 79 | 6f 75 72 20 73 6f 70 68 | As y|our soph|
|00001690| 69 73 74 69 63 61 74 69 | 6f 6e 20 69 6e 63 72 65 |isticati|on incre|
|000016a0| 61 73 65 73 2c 0d 0a 20 | 20 20 20 20 79 6f 75 20 |ases,.. | you |
|000016b0| 77 69 6c 6c 20 73 74 61 | 72 74 20 74 6f 20 73 74 |will sta|rt to st|
|000016c0| 6f 72 65 20 64 61 74 61 | 20 69 6e 0d 0a 20 20 20 |ore data| in.. |
|000016d0| 20 20 66 69 6c 65 73 20 | 72 61 74 68 65 72 20 74 | files |rather t|
|000016e0| 68 61 6e 20 65 6e 74 65 | 72 69 6e 67 20 69 74 20 |han ente|ring it |
|000016f0| 74 68 72 75 0d 0a 20 20 | 20 20 20 74 68 65 20 6b |thru.. | the k|
|00001700| 65 79 62 6f 61 72 64 20 | 6f 72 20 69 6e 63 6c 75 |eyboard |or inclu|
|00001710| 64 69 6e 67 20 69 74 20 | 69 6e 0d 0a 20 20 20 20 |ding it |in.. |
|00001720| 20 79 6f 75 72 20 70 72 | 6f 67 72 61 6d 2e 20 20 | your pr|ogram. |
|00001730| 54 68 65 20 67 75 79 20 | 6f 6e 20 74 68 65 20 72 |The guy |on the r|
|00001740| 69 67 68 74 0d 0a 20 20 | 20 20 20 69 73 20 74 68 |ight.. | is th|
|00001750| 65 20 73 79 6d 62 6f 6c | 20 66 6f 72 20 61 20 66 |e symbol| for a f|
|00001760| 69 6c 65 2c 20 74 68 65 | 20 66 69 72 73 74 0d 0a |ile, the| first..|
|00001770| 20 20 20 20 20 73 74 65 | 70 20 74 6f 77 61 72 64 | ste|p toward|
|00001780| 73 20 27 62 69 67 20 74 | 69 6d 65 27 20 70 72 6f |s 'big t|ime' pro|
|00001790| 67 72 61 6d 6d 69 6e 67 | 2e 0d 0a 0d 0a 20 20 20 |gramming|..... |
|000017a0| 20 20 43 6f 6e 6e 65 63 | 74 6f 72 0d 0a 0d 0a 20 | Connec|tor.... |
|000017b0| 20 20 20 20 46 6c 6f 77 | 63 68 61 72 74 73 20 75 | Flow|charts u|
|000017c0| 73 65 20 6c 69 6e 65 73 | 20 74 6f 20 74 69 65 20 |se lines| to tie |
|000017d0| 61 6c 6c 0d 0a 20 20 20 | 20 20 74 68 65 20 61 73 |all.. | the as|
|000017e0| 73 6f 72 74 65 64 20 73 | 79 6d 62 6f 6c 73 20 74 |sorted s|ymbols t|
|000017f0| 6f 67 65 74 68 65 72 20 | 61 6e 64 0d 0a 20 20 20 |ogether |and.. |
|00001800| 20 20 74 6f 20 73 68 6f | 77 20 74 68 65 20 70 61 | to sho|w the pa|
|00001810| 74 68 73 20 74 68 61 74 | 20 74 68 65 20 6c 6f 67 |ths that| the log|
|00001820| 69 63 0d 0a 20 20 20 20 | 20 63 61 6e 20 66 6f 6c |ic.. | can fol|
|00001830| 6c 6f 77 2e 20 20 54 68 | 65 20 63 6f 6e 6e 65 63 |low. Th|e connec|
|00001840| 74 6f 72 20 28 41 4b 41 | 0d 0a 20 20 20 20 20 6c |tor (AKA|.. l|
|00001850| 69 74 74 6c 65 20 63 69 | 72 63 6c 65 29 20 62 72 |ittle ci|rcle) br|
|00001860| 69 6e 67 73 20 74 77 6f | 2c 20 61 6e 64 0d 0a 20 |ings two|, and.. |
|00001870| 20 20 20 20 6f 6e 6c 79 | 20 74 77 6f 2c 20 70 61 | only| two, pa|
|00001880| 74 68 73 20 62 61 63 6b | 20 74 6f 67 65 74 68 65 |ths back| togethe|
|00001890| 72 20 61 67 61 69 6e 2e | 0d 0a 0d 0a 20 20 20 20 |r again.|.... |
|000018a0| 20 4f 66 66 20 50 61 67 | 65 20 43 6f 6e 6e 65 63 | Off Pag|e Connec|
|000018b0| 74 6f 72 0d 0a 0d 0a 20 | 20 20 20 20 50 69 65 63 |tor.... | Piec|
|000018c0| 65 73 20 6f 66 20 70 61 | 70 65 72 20 61 72 65 20 |es of pa|per are |
|000018d0| 73 6d 61 6c 6c 20 61 6e | 64 20 70 72 6f 67 72 61 |small an|d progra|
|000018e0| 6d 73 0d 0a 20 20 20 20 | 20 67 72 6f 77 20 6c 61 |ms.. | grow la|
|000018f0| 72 67 65 2e 20 20 54 68 | 69 73 20 72 65 73 75 6c |rge. Th|is resul|
|00001900| 74 73 20 69 6e 20 76 65 | 72 79 20 74 69 6e 79 0d |ts in ve|ry tiny.|
|00001910| 0a 20 20 20 20 20 66 6c | 6f 77 63 68 61 72 74 73 |. fl|owcharts|
|00001920| 2c 20 6f 72 20 6d 75 6c | 74 69 70 6c 65 20 70 69 |, or mul|tiple pi|
|00001930| 65 63 65 73 20 6f 66 20 | 70 61 70 65 72 2e 0d 0a |eces of |paper...|
|00001940| 20 20 20 20 20 53 69 6e | 63 65 20 74 68 65 20 6c | Sin|ce the l|
|00001950| 61 74 74 65 72 20 61 72 | 65 20 70 72 65 66 65 72 |atter ar|e prefer|
|00001960| 72 65 64 2c 20 77 65 20 | 6e 65 65 64 0d 0a 20 20 |red, we |need.. |
|00001970| 20 20 20 6f 66 66 20 70 | 61 67 65 20 63 6f 6e 6e | off p|age conn|
|00001980| 65 63 74 6f 72 73 2e 0d | 0a 0d 0a 20 20 20 20 20 |ectors..|... |
|00001990| 54 68 61 74 27 73 20 6f | 75 72 20 6c 69 73 74 2e |That's o|ur list.|
|000019a0| 20 20 41 73 20 79 6f 75 | 20 63 61 6e 20 73 65 65 | As you| can see|
|000019b0| 2c 20 77 65 20 64 6f 6e | 27 74 20 6e 65 65 64 20 |, we don|'t need |
|000019c0| 74 6f 6f 20 6d 61 6e 79 | 20 73 79 6d 62 6f 6c 73 |too many| symbols|
|000019d0| 20 74 6f 0d 0a 20 20 20 | 20 20 64 69 61 67 72 61 | to.. | diagra|
|000019e0| 6d 20 61 20 70 72 6f 67 | 72 61 6d 2e 20 20 54 68 |m a prog|ram. Th|
|000019f0| 65 72 65 20 61 72 65 20 | 6d 6f 72 65 20 62 75 74 |ere are |more but|
|00001a00| 20 74 68 6f 73 65 20 63 | 61 6e 20 62 65 20 6c 65 | those c|an be le|
|00001a10| 61 72 6e 65 64 20 73 6f | 6d 65 20 6f 74 68 65 72 |arned so|me other|
|00001a20| 0d 0a 20 20 20 20 20 74 | 69 6d 65 2e 0d 0a 0d 0a |.. t|ime.....|
|00001a30| 20 20 20 20 20 4c 65 74 | 27 73 20 63 72 65 61 74 | Let|'s creat|
|00001a40| 65 20 61 20 66 6c 6f 77 | 63 68 61 72 74 2e 20 20 |e a flow|chart. |
|00001a50| 48 6f 77 20 61 62 6f 75 | 74 20 64 69 61 67 72 61 |How abou|t diagra|
|00001a60| 6d 6d 69 6e 67 20 61 20 | 70 61 69 6e 66 75 6c 6c |mming a |painfull|
|00001a70| 79 20 66 61 6d 69 6c 69 | 61 72 0d 0a 20 20 20 20 |y famili|ar.. |
|00001a80| 20 70 72 6f 63 65 73 73 | 3b 20 63 68 61 6e 67 69 | process|; changi|
|00001a90| 6e 67 20 61 20 66 6c 61 | 74 20 74 69 72 65 2e 20 |ng a fla|t tire. |
|00001aa0| 20 54 72 79 20 69 74 20 | 79 6f 75 72 73 65 6c 66 | Try it |yourself|
|00001ab0| 20 66 69 72 73 74 2c 20 | 61 6e 64 20 74 68 65 6e | first, |and then|
|00001ac0| 20 74 75 72 6e 20 74 68 | 65 0d 0a 20 20 20 20 20 | turn th|e.. |
|00001ad0| 70 61 67 65 20 61 6e 64 | 20 63 6f 6d 70 61 72 65 |page and| compare|
|00001ae0| 20 74 68 65 20 72 65 73 | 75 6c 74 73 2e 20 20 4d | the res|ults. M|
|00001af0| 61 6b 65 20 73 75 72 65 | 20 79 6f 75 20 69 6e 63 |ake sure| you inc|
|00001b00| 6c 75 64 65 20 61 6c 6c | 20 74 68 65 20 6e 65 63 |lude all| the nec|
|00001b10| 65 73 73 61 72 79 0d 0a | 20 20 20 20 20 70 72 6f |essary..| pro|
|00001b20| 63 65 73 73 65 73 20 61 | 6e 64 20 63 6f 6e 73 65 |cesses a|nd conse|
|00001b30| 71 75 65 6e 63 65 73 20 | 61 6e 64 20 6f 6e 6c 79 |quences |and only|
|00001b40| 20 75 73 65 20 74 77 6f | 20 70 61 74 68 73 20 66 | use two| paths f|
|00001b50| 72 6f 6d 20 61 6e 79 20 | 64 65 63 69 73 69 6f 6e |rom any |decision|
|00001b60| 2e 0d 0a 20 20 20 20 20 | 57 61 69 74 69 6e 67 20 |... |Waiting |
|00001b70| 66 6f 72 20 68 65 6c 70 | 20 66 72 6f 6d 20 61 20 |for help| from a |
|00001b80| 73 74 61 74 65 20 74 72 | 6f 6f 70 65 72 20 69 73 |state tr|ooper is|
|00001b90| 20 6e 6f 74 20 61 20 76 | 69 61 62 6c 65 20 6f 70 | not a v|iable op|
|00001ba0| 74 69 6f 6e 20 69 6e 20 | 74 68 69 73 0d 0a 20 20 |tion in |this.. |
|00001bb0| 20 20 20 63 61 73 65 2e | 0d 0a 0d 0a 20 20 20 20 | case.|.... |
|00001bc0| 20 52 65 6d 65 6d 62 65 | 72 2c 20 79 6f 75 20 63 | Remembe|r, you c|
|00001bd0| 61 6e 27 74 20 70 72 6f | 67 72 61 6d 20 61 6e 79 |an't pro|gram any|
|00001be0| 20 70 72 6f 63 65 73 73 | 20 74 68 61 74 20 79 6f | process| that yo|
|00001bf0| 75 20 64 6f 6e 27 74 20 | 75 6e 64 65 72 73 74 61 |u don't |understa|
|00001c00| 6e 64 2e 0d 0a 20 20 20 | 20 20 46 6c 6f 77 63 68 |nd... | Flowch|
|00001c10| 61 72 74 73 20 61 72 65 | 20 74 68 65 20 62 65 67 |arts are| the beg|
|00001c20| 69 6e 6e 69 6e 67 20 6f | 66 20 74 68 61 74 20 75 |inning o|f that u|
|00001c30| 6e 64 65 72 73 74 61 6e | 64 69 6e 67 2e 0d 0a 0d |nderstan|ding....|
|00001c40| 0a 0d 0a 0d 0a 0d 0a 20 | 20 20 20 20 20 20 20 20 |....... | |
|00001c50| 20 20 20 20 20 20 20 20 | 1b 45 20 20 20 20 20 20 | |.E |
|00001c60| 20 20 20 20 20 20 20 20 | 20 20 1b 46 20 20 20 20 | | .F |
|00001c70| 20 1b 45 20 20 20 33 0d | 0a 0d 0a 0c 0d 0a 0d 0a | .E 3.|........|
|00001c80| 0d 0a 0d 0a 1b 46 20 20 | 20 20 20 1b 45 43 48 41 |.....F | .ECHA|
|00001c90| 50 54 45 52 20 31 1b 46 | 20 20 20 20 20 20 20 20 |PTER 1.F| |
|00001ca0| 20 20 20 20 20 20 20 20 | 20 1b 45 20 20 53 4f 4d | | .E SOM|
|00001cb0| 45 20 42 41 53 49 43 20 | 42 41 53 49 43 53 20 1b |E BASIC |BASICS .|
|00001cc0| 46 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |F | |
|00001cd0| 20 20 1b 45 43 48 41 50 | 54 45 52 20 31 0d 0a 0d | .ECHAP|TER 1...|
|00001ce0| 0a 0d 0a 0d 0a 0d 0a 0d | 0a 0d 0a 0d 0a 0d 0a 0d |........|........|
|00001cf0| 0a 0d 0a 0d 0a 0d 0a 0d | 0a 0d 0a 0d 0a 0d 0a 0d |........|........|
|00001d00| 0a 0d 0a 0d 0a 0d 0a 0d | 0a 0d 0a 0d 0a 0d 0a 0d |........|........|
|00001d10| 0a 0d 0a 0d 0a 0d 0a 0d | 0a 0d 0a 0d 0a 0d 0a 0d |........|........|
|00001d20| 0a 0d 0a 0d 0a 0d 0a 0d | 0a 0d 0a 0d 0a 0d 0a 0d |........|........|
|00001d30| 0a 0d 0a 0d 0a 0d 0a 0d | 0a 0d 0a 0d 0a 0d 0a 0d |........|........|
|00001d40| 0a 0d 0a 0d 0a 0d 0a 20 | 20 20 20 20 1b 46 48 6f |....... | .FHo|
|00001d50| 77 20 64 69 64 20 79 6f | 75 20 64 6f 20 63 6f 6d |w did yo|u do com|
|00001d60| 70 61 72 65 64 20 74 6f | 20 77 68 61 74 20 79 6f |pared to| what yo|
|00001d70| 75 20 73 65 65 20 61 62 | 6f 76 65 3f 20 20 44 69 |u see ab|ove? Di|
|00001d80| 64 20 79 6f 75 20 64 6f | 20 69 74 20 61 74 20 61 |d you do| it at a|
|00001d90| 6c 6c 3f 0d 0a 20 20 20 | 20 20 53 68 61 6d 65 20 |ll?.. | Shame |
|00001da0| 6f 6e 20 79 6f 75 2e 0d | 0a 0d 0a 0d 0a 0d 0a 20 |on you..|....... |
|00001db0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001dc0| 1b 45 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.E | |
|00001dd0| 20 20 1b 46 20 20 20 20 | 20 1b 45 20 20 20 34 0d | .F | .E 4.|
|00001de0| 0a 0d 0a 0c 0d 0a 0d 0a | 0d 0a 0d 0a 1b 46 20 20 |........|.....F |
|00001df0| 20 20 20 1b 45 43 48 41 | 50 54 45 52 20 31 1b 46 | .ECHA|PTER 1.F|
|00001e00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001e10| 20 1b 45 20 20 53 4f 4d | 45 20 42 41 53 49 43 20 | .E SOM|E BASIC |
|00001e20| 42 41 53 49 43 53 20 1b | 46 20 20 20 20 20 20 20 |BASICS .|F |
|00001e30| 20 20 20 20 20 20 20 20 | 20 20 1b 45 43 48 41 50 | | .ECHAP|
|00001e40| 54 45 52 20 31 0d 0a 0d | 0a 0d 0a 20 20 20 20 20 |TER 1...|... |
|00001e50| 53 54 52 55 43 54 55 52 | 45 0d 0a 0d 0a 20 20 20 |STRUCTUR|E.... |
|00001e60| 20 20 1b 46 54 68 65 20 | 6d 6f 73 74 20 69 6d 70 | .FThe |most imp|
|00001e70| 6f 72 74 61 6e 74 20 63 | 6f 6e 63 65 70 74 20 79 |ortant c|oncept y|
|00001e80| 6f 75 20 77 69 6c 6c 20 | 65 76 65 72 20 6c 65 61 |ou will |ever lea|
|00001e90| 72 6e 20 69 6e 20 74 68 | 65 20 66 69 65 6c 64 20 |rn in th|e field |
|00001ea0| 6f 66 20 64 61 74 61 0d | 0a 20 20 20 20 20 70 72 |of data.|. pr|
|00001eb0| 6f 63 65 73 73 69 6e 67 | 20 69 73 20 73 74 72 75 |ocessing| is stru|
|00001ec0| 63 74 75 72 65 2e 20 20 | 41 20 73 74 72 75 63 74 |cture. |A struct|
|00001ed0| 75 72 65 64 20 70 72 6f | 67 72 61 6d 20 69 73 20 |ured pro|gram is |
|00001ee0| 6e 6f 74 68 69 6e 67 20 | 6d 6f 72 65 20 74 68 61 |nothing |more tha|
|00001ef0| 6e 20 63 6f 64 65 0d 0a | 20 20 20 20 20 74 68 61 |n code..| tha|
|00001f00| 74 20 69 73 20 65 61 73 | 79 20 74 6f 20 72 65 61 |t is eas|y to rea|
|00001f10| 64 2c 20 75 6e 64 65 72 | 73 74 61 6e 64 20 61 6e |d, under|stand an|
|00001f20| 64 20 6d 61 69 6e 74 61 | 69 6e 2e 20 20 53 65 6c |d mainta|in. Sel|
|00001f30| 66 2d 64 65 66 69 6e 69 | 6e 67 20 76 61 72 69 61 |f-defini|ng varia|
|00001f40| 62 6c 65 0d 0a 20 20 20 | 20 20 6e 61 6d 65 73 2c |ble.. | names,|
|00001f50| 20 6d 6f 64 75 6c 61 72 | 69 7a 65 64 20 6c 6f 67 | modular|ized log|
|00001f60| 69 63 2c 20 61 6e 64 20 | 73 69 6d 70 6c 65 20 70 |ic, and |simple p|
|00001f70| 61 74 68 73 20 61 72 65 | 20 69 6e 74 65 67 72 61 |aths are| integra|
|00001f80| 6c 20 70 61 72 74 73 20 | 6f 66 20 74 68 69 73 0d |l parts |of this.|
|00001f90| 0a 20 20 20 20 20 64 69 | 73 63 69 70 6c 69 6e 65 |. di|scipline|
|00001fa0| 2e 20 20 45 61 63 68 20 | 70 72 6f 67 72 61 6d 20 |. Each |program |
|00001fb0| 6d 6f 64 75 6c 65 20 6d | 75 73 74 20 68 61 76 65 |module m|ust have|
|00001fc0| 20 61 20 73 69 6e 67 6c | 65 20 65 6e 74 72 79 20 | a singl|e entry |
|00001fd0| 61 6e 64 20 61 20 73 69 | 6e 67 6c 65 0d 0a 20 20 |and a si|ngle.. |
|00001fe0| 20 20 20 65 78 69 74 2e | 20 20 54 68 65 20 74 65 | exit.| The te|
|00001ff0| 63 68 6e 69 71 75 65 73 | 20 61 6c 73 6f 20 69 6e |chniques| also in|
|00002000| 63 6c 75 64 65 20 67 6f | 6f 64 20 6e 6f 6d 65 6e |clude go|od nomen|
|00002010| 63 6c 61 74 75 72 65 20 | 61 6e 64 20 73 6f 6d 65 |clature |and some|
|00002020| 20 66 61 69 72 6c 79 0d | 0a 20 20 20 20 20 73 74 | fairly.|. st|
|00002030| 61 6e 64 61 72 64 20 63 | 6f 64 65 20 66 6f 72 20 |andard c|ode for |
|00002040| 6c 6f 6f 70 73 2c 20 63 | 6f 6e 64 69 74 69 6f 6e |loops, c|ondition|
|00002050| 61 6c 20 74 65 73 74 73 | 2c 20 61 6e 64 20 73 65 |al tests|, and se|
|00002060| 6c 65 63 74 69 76 65 20 | 70 72 6f 63 65 73 73 69 |lective |processi|
|00002070| 6e 67 2e 0d 0a 0d 0a 20 | 20 20 20 20 54 68 65 20 |ng..... | The |
|00002080| 72 6f 6c 65 20 6f 66 20 | 73 74 72 75 63 74 75 72 |role of |structur|
|00002090| 65 64 20 70 72 6f 67 72 | 61 6d 6d 69 6e 67 20 62 |ed progr|amming b|
|000020a0| 65 63 6f 6d 65 73 20 6d | 6f 72 65 20 6f 62 76 69 |ecomes m|ore obvi|
|000020b0| 6f 75 73 20 61 73 20 79 | 6f 75 20 6c 6f 6f 6b 20 |ous as y|ou look |
|000020c0| 61 74 20 61 0d 0a 20 20 | 20 20 20 74 79 70 69 63 |at a.. | typic|
|000020d0| 61 6c 20 64 61 74 61 20 | 70 72 6f 63 65 73 73 69 |al data |processi|
|000020e0| 6e 67 20 73 68 6f 70 2e | 20 20 49 6e 20 74 68 69 |ng shop.| In thi|
|000020f0| 73 20 65 6e 76 69 72 6f | 6e 6d 65 6e 74 2c 20 38 |s enviro|nment, 8|
|00002100| 30 25 20 6f 66 20 74 68 | 65 20 73 74 61 66 66 0d |0% of th|e staff.|
|00002110| 0a 20 20 20 20 20 73 70 | 65 6e 64 20 74 68 65 69 |. sp|end thei|
|00002120| 72 20 74 69 6d 65 20 65 | 69 74 68 65 72 20 66 69 |r time e|ither fi|
|00002130| 78 69 6e 67 20 65 78 69 | 73 74 69 6e 67 20 70 72 |xing exi|sting pr|
|00002140| 6f 67 72 61 6d 73 20 6f | 72 20 6d 6f 64 69 66 79 |ograms o|r modify|
|00002150| 69 6e 67 20 74 68 65 73 | 65 0d 0a 20 20 20 20 20 |ing thes|e.. |
|00002160| 70 72 6f 67 72 61 6d 73 | 20 74 6f 20 68 61 6e 64 |programs| to hand|
|00002170| 6c 65 20 73 6f 6d 65 20 | 6e 65 77 20 66 75 6e 63 |le some |new func|
|00002180| 74 69 6f 6e 61 6c 69 74 | 79 2e 20 20 54 68 69 73 |tionalit|y. This|
|00002190| 20 70 6c 61 63 65 73 20 | 61 20 68 69 67 68 20 70 | places |a high p|
|000021a0| 72 65 6d 69 75 6d 0d 0a | 20 20 20 20 20 6f 6e 20 |remium..| on |
|000021b0| 72 65 61 64 61 62 69 6c | 69 74 79 20 61 6e 64 20 |readabil|ity and |
|000021c0| 6d 61 69 6e 74 61 69 6e | 61 62 69 6c 69 74 79 2e |maintain|ability.|
|000021d0| 20 20 46 72 6f 6d 20 61 | 20 70 65 72 73 6f 6e 61 | From a| persona|
|000021e0| 6c 20 70 65 72 73 70 65 | 63 74 69 76 65 2c 20 79 |l perspe|ctive, y|
|000021f0| 6f 75 0d 0a 20 20 20 20 | 20 77 69 6c 6c 20 61 70 |ou.. | will ap|
|00002200| 70 72 65 63 69 61 74 65 | 20 74 68 69 73 20 6d 6f |preciate| this mo|
|00002210| 72 65 20 77 68 65 6e 20 | 79 6f 75 20 67 65 74 20 |re when |you get |
|00002220| 61 20 63 61 6c 6c 20 66 | 72 6f 6d 20 74 68 65 20 |a call f|rom the |
|00002230| 63 6f 6d 70 75 74 65 72 | 20 72 6f 6f 6d 20 61 74 |computer| room at|
|00002240| 0d 0a 20 20 20 20 20 74 | 68 72 65 65 20 69 6e 20 |.. t|hree in |
|00002250| 74 68 65 20 6d 6f 72 6e | 69 6e 67 20 72 65 71 75 |the morn|ing requ|
|00002260| 65 73 74 69 6e 67 20 79 | 6f 75 20 74 6f 20 63 6f |esting y|ou to co|
|00002270| 6d 65 20 69 6e 20 41 53 | 41 50 20 61 6e 64 20 66 |me in AS|AP and f|
|00002280| 69 78 20 61 20 70 72 6f | 67 72 61 6d 0d 0a 20 20 |ix a pro|gram.. |
|00002290| 20 20 20 27 62 75 67 27 | 2e 0d 0a 0d 0a 20 20 20 | 'bug'|..... |
|000022a0| 20 20 53 74 72 75 63 74 | 75 72 65 64 20 74 65 63 | Struct|ured tec|
|000022b0| 68 6e 69 71 75 65 73 20 | 70 72 6f 64 75 63 65 20 |hniques |produce |
|000022c0| 62 65 74 74 65 72 20 61 | 6e 64 20 6d 6f 72 65 20 |better a|nd more |
|000022d0| 63 6f 72 72 65 63 74 20 | 63 6f 64 65 20 66 61 73 |correct |code fas|
|000022e0| 74 65 72 2e 0d 0a 20 20 | 20 20 20 54 68 65 72 65 |ter... | There|
|000022f0| 20 69 73 2c 20 68 6f 77 | 65 76 65 72 2c 20 6e 6f | is, how|ever, no|
|00002300| 20 70 61 6e 61 63 65 61 | 20 66 6f 72 20 63 72 61 | panacea| for cra|
|00002310| 6e 6b 69 6e 67 20 6f 75 | 74 20 73 74 72 75 63 74 |nking ou|t struct|
|00002320| 75 72 65 64 20 63 6f 64 | 65 2e 0d 0a 20 20 20 20 |ured cod|e... |
|00002330| 20 50 65 72 73 6f 6e 61 | 6c 20 64 69 73 63 69 70 | Persona|l discip|
|00002340| 6c 69 6e 65 20 69 73 20 | 77 68 61 74 20 73 65 70 |line is |what sep|
|00002350| 61 72 61 74 65 73 20 74 | 68 65 20 63 6f 6d 70 65 |arates t|he compe|
|00002360| 74 65 6e 74 20 70 72 6f | 67 72 61 6d 6d 65 72 20 |tent pro|grammer |
|00002370| 66 72 6f 6d 0d 0a 20 20 | 20 20 20 73 6f 6d 65 62 |from.. | someb|
|00002380| 6f 64 79 20 77 68 6f 20 | 6d 65 72 65 6c 79 20 70 |ody who |merely p|
|00002390| 72 6f 67 72 61 6d 73 2e | 20 20 53 70 61 67 68 65 |rograms.| Spaghe|
|000023a0| 74 74 69 20 63 6f 64 65 | 20 68 61 73 20 67 6f 6e |tti code| has gon|
|000023b0| 65 20 74 68 65 20 77 61 | 79 20 6f 66 20 74 68 65 |e the wa|y of the|
|000023c0| 0d 0a 20 20 20 20 20 73 | 70 61 67 68 65 74 74 69 |.. s|paghetti|
|000023d0| 20 77 65 73 74 65 72 6e | 2e 20 20 50 72 6f 66 65 | western|. Profe|
|000023e0| 73 73 69 6f 6e 61 6c 69 | 73 6d 20 65 78 74 65 6e |ssionali|sm exten|
|000023f0| 64 73 20 74 6f 20 79 6f | 75 72 20 65 6e 74 69 72 |ds to yo|ur entir|
|00002400| 65 20 70 72 6f 67 72 61 | 6d 0d 0a 20 20 20 20 20 |e progra|m.. |
|00002410| 69 6e 63 6c 75 64 69 6e | 67 20 69 6e 70 75 74 20 |includin|g input |
|00002420| 61 6e 64 20 6f 75 74 70 | 75 74 2e 20 20 41 6c 6c |and outp|ut. All|
|00002430| 20 74 68 65 20 63 6f 72 | 72 65 63 74 20 61 6e 73 | the cor|rect ans|
|00002440| 77 65 72 73 20 69 6e 20 | 74 68 65 20 77 6f 72 6c |wers in |the worl|
|00002450| 64 20 77 69 6c 6c 0d 0a | 20 20 20 20 20 6e 6f 74 |d will..| not|
|00002460| 20 64 6f 20 79 6f 75 20 | 61 6e 79 20 67 6f 6f 64 | do you |any good|
|00002470| 20 69 66 20 74 68 65 79 | 20 61 72 65 20 70 72 65 | if they| are pre|
|00002480| 73 65 6e 74 65 64 20 69 | 6e 20 61 20 73 6c 6f 70 |sented i|n a slop|
|00002490| 70 79 20 66 61 73 68 69 | 6f 6e 2e 20 20 54 68 65 |py fashi|on. The|
|000024a0| 20 65 6e 64 0d 0a 20 20 | 20 20 20 75 73 65 72 20 | end.. | user |
|000024b0| 77 69 6c 6c 20 6a 75 64 | 67 65 20 74 68 65 20 71 |will jud|ge the q|
|000024c0| 75 61 6c 69 74 79 20 62 | 79 20 74 68 65 20 61 70 |uality b|y the ap|
|000024d0| 70 65 61 72 61 6e 63 65 | 2e 20 20 59 6f 75 20 64 |pearance|. You d|
|000024e0| 6f 20 74 68 65 20 73 61 | 6d 65 20 74 68 69 6e 67 |o the sa|me thing|
|000024f0| 2c 0d 0a 20 20 20 20 20 | 64 6f 6e 27 74 20 79 6f |,.. |don't yo|
|00002500| 75 3f 0d 0a 0d 0a 20 20 | 20 20 20 54 68 65 20 66 |u?.... | The f|
|00002510| 75 6e 63 74 69 6f 6e 20 | 6f 66 20 61 20 70 72 6f |unction |of a pro|
|00002520| 67 72 61 6d 20 69 73 20 | 74 6f 20 70 72 6f 64 75 |gram is |to produ|
|00002530| 63 65 20 63 6f 72 72 65 | 63 74 20 72 65 73 75 6c |ce corre|ct resul|
|00002540| 74 73 20 62 61 73 65 64 | 20 6f 6e 0d 0a 20 20 20 |ts based| on.. |
|00002550| 20 20 70 72 65 64 65 66 | 69 6e 65 64 20 69 6e 70 | predef|ined inp|
|00002560| 75 74 2e 20 20 49 6e 20 | 61 64 64 69 74 69 6f 6e |ut. In |addition|
|00002570| 20 74 6f 20 63 6f 72 72 | 65 63 74 20 72 65 73 75 | to corr|ect resu|
|00002580| 6c 74 73 2c 20 74 68 65 | 20 70 72 6f 67 72 61 6d |lts, the| program|
|00002590| 20 6d 75 73 74 20 61 6c | 73 6f 0d 0a 20 20 20 20 | must al|so.. |
|000025a0| 20 62 65 20 61 73 20 6d | 61 69 6e 74 61 69 6e 61 | be as m|aintaina|
|000025b0| 62 6c 65 20 61 73 20 70 | 6f 73 73 69 62 6c 65 20 |ble as p|ossible |
|000025c0| 61 6e 64 20 68 61 76 65 | 20 71 75 61 6c 69 74 79 |and have| quality|
|000025d0| 20 75 73 65 72 20 69 6e | 74 65 72 66 61 63 65 73 | user in|terfaces|
|000025e0| 2e 20 20 49 6e 0d 0a 20 | 20 20 20 20 73 75 6d 6d |. In.. | summ|
|000025f0| 61 72 79 2c 20 74 68 65 | 20 74 68 72 65 65 20 62 |ary, the| three b|
|00002600| 61 73 69 63 20 63 72 69 | 74 65 72 69 61 20 66 6f |asic cri|teria fo|
|00002610| 72 20 61 20 67 6f 6f 64 | 20 73 74 72 75 63 74 75 |r a good| structu|
|00002620| 72 65 64 20 70 72 6f 67 | 72 61 6d 20 61 72 65 3a |red prog|ram are:|
|00002630| 0d 0a 0d 0a 20 20 20 20 | 20 2d 20 43 6f 72 72 65 |.... | - Corre|
|00002640| 63 74 20 72 65 73 75 6c | 74 73 0d 0a 20 20 20 20 |ct resul|ts.. |
|00002650| 20 2d 20 45 61 73 69 6c | 79 20 6d 61 69 6e 74 61 | - Easil|y mainta|
|00002660| 69 6e 65 64 20 63 6f 64 | 65 0d 0a 20 20 20 20 20 |ined cod|e.. |
|00002670| 2d 20 51 75 61 6c 69 74 | 79 20 69 6e 70 75 74 2f |- Qualit|y input/|
|00002680| 6f 75 74 70 75 74 20 69 | 6e 74 65 72 66 61 63 65 |output i|nterface|
|00002690| 73 0d 0a 0d 0a 0d 0a 20 | 20 20 20 20 1b 45 50 52 |s...... | .EPR|
|000026a0| 4f 47 52 41 4d 4d 49 4e | 47 0d 0a 0d 0a 20 20 20 |OGRAMMIN|G.... |
|000026b0| 20 20 1b 46 57 65 20 61 | 72 65 20 6e 6f 77 20 72 | .FWe a|re now r|
|000026c0| 65 61 64 79 20 74 6f 20 | 65 78 61 6d 69 6e 65 20 |eady to |examine |
|000026d0| 74 68 65 20 70 72 6f 67 | 72 61 6d 6d 69 6e 67 20 |the prog|ramming |
|000026e0| 70 72 6f 63 65 73 73 2e | 20 20 53 70 65 63 69 66 |process.| Specif|
|000026f0| 69 63 61 6c 6c 79 2c 20 | 77 65 0d 0a 20 20 20 20 |ically, |we.. |
|00002700| 20 61 72 65 20 67 6f 69 | 6e 67 20 74 6f 20 66 6f | are goi|ng to fo|
|00002710| 63 75 73 20 6f 6e 20 70 | 72 6f 67 72 61 6d 6d 69 |cus on p|rogrammi|
|00002720| 6e 67 20 75 73 69 6e 67 | 20 74 68 65 20 42 41 53 |ng using| the BAS|
|00002730| 49 43 20 6c 61 6e 67 75 | 61 67 65 20 61 73 0d 0a |IC langu|age as..|
|00002740| 20 20 20 20 20 69 6d 70 | 6c 65 6d 65 6e 74 65 64 | imp|lemented|
|00002750| 20 6f 6e 20 49 42 4d 20 | 50 43 27 73 20 61 6e 64 | on IBM |PC's and|
|00002760| 20 63 6f 6d 70 61 74 69 | 62 6c 65 73 2e 20 20 44 | compati|bles. D|
|00002770| 6f 6e 27 74 20 61 73 73 | 75 6d 65 20 74 68 61 74 |on't ass|ume that|
|00002780| 20 77 68 61 74 20 79 6f | 75 0d 0a 20 20 20 20 20 | what yo|u.. |
|00002790| 6c 65 61 72 6e 20 68 65 | 72 65 20 61 70 70 6c 69 |learn he|re appli|
|000027a0| 65 73 20 6f 6e 6c 79 20 | 74 6f 20 74 68 65 20 50 |es only |to the P|
|000027b0| 43 20 61 72 65 6e 61 2e | 20 20 54 68 65 20 63 6f |C arena.| The co|
|000027c0| 6e 63 65 70 74 73 20 61 | 6e 64 20 74 65 63 68 6e |ncepts a|nd techn|
|000027d0| 69 71 75 65 73 0d 0a 20 | 20 20 20 20 61 72 65 20 |iques.. | are |
|000027e0| 65 71 75 61 6c 6c 79 20 | 76 61 6c 69 64 20 6f 6e |equally |valid on|
|000027f0| 20 6d 69 6e 69 20 61 6e | 64 20 6d 61 69 6e 66 72 | mini an|d mainfr|
|00002800| 61 6d 65 20 63 6f 6d 70 | 75 74 65 72 73 20 61 6e |ame comp|uters an|
|00002810| 64 20 65 71 75 61 6c 6c | 79 20 61 70 70 6c 69 63 |d equall|y applic|
|00002820| 61 62 6c 65 0d 0a 20 20 | 20 20 20 74 6f 20 6f 74 |able.. | to ot|
|00002830| 68 65 72 20 70 72 6f 67 | 72 61 6d 6d 69 6e 67 20 |her prog|ramming |
|00002840| 6c 61 6e 67 75 61 67 65 | 73 20 73 75 63 68 20 61 |language|s such a|
|00002850| 73 20 46 6f 72 74 72 61 | 6e 2c 20 43 6f 62 6f 6c |s Fortra|n, Cobol|
|00002860| 2c 20 6f 72 20 50 61 73 | 63 61 6c 2e 20 20 49 6e |, or Pas|cal. In|
|00002870| 0d 0a 20 20 20 20 20 66 | 61 63 74 2c 20 73 6f 6d |.. f|act, som|
|00002880| 65 20 6f 66 20 74 68 65 | 73 65 20 6c 61 74 74 65 |e of the|se latte|
|00002890| 72 20 6c 61 6e 67 75 61 | 67 65 73 2c 20 73 75 63 |r langua|ges, suc|
|000028a0| 68 20 61 73 20 50 61 73 | 63 61 6c 2c 20 61 72 65 |h as Pas|cal, are|
|000028b0| 20 64 65 73 69 67 6e 65 | 64 20 74 6f 0d 0a 20 20 | designe|d to.. |
|000028c0| 20 20 20 66 6f 72 63 65 | 20 73 74 72 75 63 74 75 | force| structu|
|000028d0| 72 65 20 6f 6e 20 61 20 | 70 72 6f 67 72 61 6d 2e |re on a |program.|
|000028e0| 0d 0a 0d 0a 20 20 20 20 | 20 42 41 53 49 43 20 63 |.... | BASIC c|
|000028f0| 61 6e 20 62 65 20 75 73 | 65 64 20 74 6f 20 77 72 |an be us|ed to wr|
|00002900| 69 74 65 20 73 74 72 75 | 63 74 75 72 65 64 20 70 |ite stru|ctured p|
|00002910| 72 6f 67 72 61 6d 73 2e | 20 20 49 74 20 68 61 73 |rograms.| It has|
|00002920| 20 74 68 65 20 74 6f 6f | 6c 73 2e 20 20 59 6f 75 | the too|ls. You|
|00002930| 0d 0a 20 20 20 20 20 77 | 69 6c 6c 20 68 61 76 65 |.. w|ill have|
|00002940| 20 74 6f 20 70 72 6f 76 | 69 64 65 20 74 68 65 20 | to prov|ide the |
|00002950| 72 65 71 75 69 73 69 74 | 65 20 64 69 73 63 69 70 |requisit|e discip|
|00002960| 6c 69 6e 65 2e 0d 0a 0d | 0a 0d 0a 0d 0a 20 20 20 |line....|..... |
|00002970| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 1b 45 | | .E|
|00002980| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002990| 1b 46 20 20 20 20 20 1b | 45 20 20 20 35 0d 0a 0d |.F .|E 5...|
|000029a0| 0a 0c 0d 0a 0d 0a 0d 0a | 0d 0a 1b 46 20 20 20 20 |........|...F |
|000029b0| 20 1b 45 43 48 41 50 54 | 45 52 20 31 1b 46 20 20 | .ECHAPT|ER 1.F |
|000029c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 1b | | .|
|000029d0| 45 20 20 53 4f 4d 45 20 | 42 41 53 49 43 20 42 41 |E SOME |BASIC BA|
|000029e0| 53 49 43 53 20 1b 46 20 | 20 20 20 20 20 20 20 20 |SICS .F | |
|000029f0| 20 20 20 20 20 20 20 20 | 1b 45 43 48 41 50 54 45 | |.ECHAPTE|
|00002a00| 52 20 31 0d 0a 0d 0a 0d | 0a 0d 0a 20 20 20 20 20 |R 1.....|... |
|00002a10| 56 41 52 49 41 42 4c 45 | 53 0d 0a 0d 0a 20 20 20 |VARIABLE|S.... |
|00002a20| 20 20 1b 46 54 68 65 20 | 66 69 72 73 74 20 6e 69 | .FThe |first ni|
|00002a30| 74 74 79 2d 67 72 69 74 | 74 79 20 63 6f 6e 63 65 |tty-grit|ty conce|
|00002a40| 70 74 20 69 6e 20 70 72 | 6f 67 72 61 6d 6d 69 6e |pt in pr|ogrammin|
|00002a50| 67 20 69 73 20 74 68 65 | 20 76 61 72 69 61 62 6c |g is the| variabl|
|00002a60| 65 2e 20 20 42 61 63 6b | 20 69 6e 0d 0a 20 20 20 |e. Back| in.. |
|00002a70| 20 20 74 68 65 20 64 61 | 79 73 20 6f 66 20 61 6c | the da|ys of al|
|00002a80| 67 65 62 72 61 2c 20 76 | 61 72 69 61 62 6c 65 73 |gebra, v|ariables|
|00002a90| 20 77 65 72 65 20 73 6f | 6d 65 74 68 69 6e 67 20 | were so|mething |
|00002aa0| 74 68 61 74 20 77 65 20 | 75 73 65 64 20 74 6f 20 |that we |used to |
|00002ab0| 66 69 6e 64 20 74 68 65 | 0d 0a 20 20 20 20 20 76 |find the|.. v|
|00002ac0| 61 6c 75 65 20 6f 66 20 | 61 6e 20 75 6e 6b 6e 6f |alue of |an unkno|
|00002ad0| 77 6e 20 6e 75 6d 62 65 | 72 2e 20 20 52 65 6d 65 |wn numbe|r. Reme|
|00002ae0| 6d 62 65 72 20 74 68 65 | 20 6f 6c 64 20 58 20 3d |mber the| old X =|
|00002af0| 20 59 20 2b 20 32 2e 20 | 20 41 20 70 72 6f 67 72 | Y + 2. | A progr|
|00002b00| 61 6d 0d 0a 20 20 20 20 | 20 76 61 72 69 61 62 6c |am.. | variabl|
|00002b10| 65 20 69 73 20 61 20 73 | 69 6d 69 6c 61 72 20 63 |e is a s|imilar c|
|00002b20| 72 65 61 74 75 72 65 20 | 77 69 74 68 20 73 6f 6d |reature |with som|
|00002b30| 65 20 6d 69 6e 6f 72 20 | 64 69 66 66 65 72 65 6e |e minor |differen|
|00002b40| 63 65 73 3a 0d 0a 0d 0a | 20 20 20 20 20 31 2e 20 |ces:....| 1. |
|00002b50| 20 54 68 65 20 42 41 53 | 49 43 20 76 61 72 69 61 | The BAS|IC varia|
|00002b60| 62 6c 65 20 64 6f 65 73 | 20 6e 6f 74 20 68 61 76 |ble does| not hav|
|00002b70| 65 20 74 6f 20 62 65 20 | 61 20 6e 75 6d 62 65 72 |e to be |a number|
|00002b80| 2c 20 69 74 20 63 61 6e | 20 61 6c 73 6f 20 62 65 |, it can| also be|
|00002b90| 0d 0a 20 20 20 20 20 20 | 20 20 20 73 6f 6d 65 74 |.. | somet|
|00002ba0| 68 69 6e 67 20 63 61 6c | 6c 65 64 20 61 20 53 54 |hing cal|led a ST|
|00002bb0| 52 49 4e 47 2c 20 6f 72 | 20 41 4c 50 48 41 2e 20 |RING, or| ALPHA. |
|00002bc0| 20 4e 75 6d 65 72 69 63 | 73 20 61 72 65 20 66 75 | Numeric|s are fu|
|00002bd0| 72 74 68 65 72 20 73 70 | 6c 69 74 0d 0a 20 20 20 |rther sp|lit.. |
|00002be0| 20 20 20 20 20 20 69 6e | 74 6f 20 74 77 6f 20 74 | in|to two t|
|00002bf0| 79 70 65 73 2c 20 72 65 | 61 6c 73 20 61 6e 64 20 |ypes, re|als and |
|00002c00| 69 6e 74 65 67 65 72 73 | 3a 0d 0a 0d 0a 20 20 20 |integers|:.... |
|00002c10| 20 20 20 20 20 20 4e 75 | 6d 65 72 69 63 20 28 52 | Nu|meric (R|
|00002c20| 65 61 6c 29 20 20 20 20 | 54 68 69 73 20 69 73 20 |eal) |This is |
|00002c30| 61 6e 79 20 6e 75 6d 62 | 65 72 2e 20 20 49 74 20 |any numb|er. It |
|00002c40| 6d 61 79 20 68 61 76 65 | 20 61 20 66 72 61 63 74 |may have| a fract|
|00002c50| 69 6f 6e 61 6c 0d 0a 20 | 20 20 20 20 20 20 20 20 |ional.. | |
|00002c60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002c70| 20 20 63 6f 6d 70 6f 6e | 65 6e 74 20 61 73 73 6f | compon|ent asso|
|00002c80| 63 69 61 74 65 64 20 77 | 69 74 68 20 69 74 2e 20 |ciated w|ith it. |
|00002c90| 20 45 78 61 6d 70 6c 65 | 73 20 61 72 65 20 74 68 | Example|s are th|
|00002ca0| 69 6e 67 73 0d 0a 20 20 | 20 20 20 20 20 20 20 20 |ings.. | |
|00002cb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002cc0| 20 6c 69 6b 65 20 58 20 | 3d 20 32 2c 20 43 4f 53 | like X |= 2, COS|
|00002cd0| 54 20 3d 20 33 37 2e 35 | 35 2c 20 61 6e 64 20 41 |T = 37.5|5, and A|
|00002ce0| 47 45 20 3d 20 32 31 2e | 0d 0a 0d 0a 20 20 20 20 |GE = 21.|.... |
|00002cf0| 20 20 20 20 20 4e 75 6d | 65 72 69 63 20 28 49 6e | Num|eric (In|
|00002d00| 74 65 67 65 72 29 20 54 | 68 69 73 20 69 73 20 61 |teger) T|his is a|
|00002d10| 20 6e 75 6d 62 65 72 20 | 77 69 74 68 6f 75 74 20 | number |without |
|00002d20| 61 6e 79 20 66 72 61 63 | 74 69 6f 6e 61 6c 20 63 |any frac|tional c|
|00002d30| 6f 6d 70 6f 6e 65 6e 74 | 2e 0d 0a 20 20 20 20 20 |omponent|... |
|00002d40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002d50| 20 20 20 20 20 20 45 78 | 61 6d 70 6c 65 73 20 6f | Ex|amples o|
|00002d60| 66 20 74 68 69 73 20 61 | 72 65 20 43 4f 55 4e 54 |f this a|re COUNT|
|00002d70| 25 20 3d 20 35 2c 20 6f | 72 20 44 41 59 53 25 20 |% = 5, o|r DAYS% |
|00002d80| 3d 20 37 2e 0d 0a 0d 0a | 20 20 20 20 20 20 20 20 |= 7.....| |
|00002d90| 20 53 74 72 69 6e 67 20 | 28 6f 72 20 41 6c 70 68 | String |(or Alph|
|00002da0| 61 29 20 54 68 69 73 20 | 69 73 20 61 20 76 61 72 |a) This |is a var|
|00002db0| 69 61 62 6c 65 20 74 68 | 61 74 20 63 61 6e 20 62 |iable th|at can b|
|00002dc0| 65 20 6d 61 64 65 20 75 | 70 20 6f 66 20 65 69 74 |e made u|p of eit|
|00002dd0| 68 65 72 0d 0a 20 20 20 | 20 20 20 20 20 20 20 20 |her.. | |
|00002de0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002df0| 74 65 78 74 2c 20 6e 75 | 6d 62 65 72 73 20 6f 72 |text, nu|mbers or|
|00002e00| 20 61 20 63 6f 6d 62 69 | 6e 61 74 69 6f 6e 20 6f | a combi|nation o|
|00002e10| 66 20 62 6f 74 68 2e 20 | 20 49 74 20 69 73 0d 0a |f both. | It is..|
|00002e20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002e30| 20 20 20 20 20 20 20 20 | 20 20 20 61 6c 77 61 79 | | alway|
|00002e40| 73 20 74 72 65 61 74 65 | 64 20 61 73 20 74 65 78 |s treate|d as tex|
|00002e50| 74 2e 20 20 45 78 61 6d | 70 6c 65 73 20 6f 66 20 |t. Exam|ples of |
|00002e60| 73 74 72 69 6e 67 73 20 | 61 72 65 0d 0a 20 20 20 |strings |are.. |
|00002e70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002e80| 20 20 20 20 20 20 20 20 | 46 49 52 53 54 2e 4e 41 | |FIRST.NA|
|00002e90| 4d 45 24 20 3d 20 22 46 | 52 45 44 22 2c 20 41 44 |ME$ = "F|RED", AD|
|00002ea0| 44 52 24 20 3d 22 31 32 | 20 4d 41 49 4e 20 53 54 |DR$ ="12| MAIN ST|
|00002eb0| 52 45 45 54 22 2c 20 61 | 6e 64 0d 0a 20 20 20 20 |REET", a|nd.. |
|00002ec0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002ed0| 20 20 20 20 20 20 20 53 | 53 4e 24 20 3d 20 22 30 | S|SN$ = "0|
|00002ee0| 30 36 2d 31 32 2d 34 35 | 36 37 22 2e 0d 0a 0d 0a |06-12-45|67".....|
|00002ef0| 20 20 20 20 20 20 20 20 | 20 4e 6f 74 65 20 74 68 | | Note th|
|00002f00| 61 74 20 61 6c 6c 20 73 | 74 72 69 6e 67 24 20 65 |at all s|tring$ e|
|00002f10| 6e 64 20 77 69 74 68 20 | 61 20 24 20 73 69 67 6e |nd with |a $ sign|
|00002f20| 2e 20 20 54 68 61 74 27 | 73 20 68 6f 77 20 42 41 |. That'|s how BA|
|00002f30| 53 49 43 20 74 65 6c 6c | 73 0d 0a 20 20 20 20 20 |SIC tell|s.. |
|00002f40| 20 20 20 20 74 68 65 6d | 20 61 70 61 72 74 20 66 | them| apart f|
|00002f50| 72 6f 6d 20 6e 75 6d 62 | 65 72 73 2e 20 20 49 6e |rom numb|ers. In|
|00002f60| 74 65 67 65 72 73 20 65 | 6e 64 20 77 69 74 68 20 |tegers e|nd with |
|00002f70| 61 20 25 20 73 69 67 6e | 2c 20 61 6e 64 20 72 65 |a % sign|, and re|
|00002f80| 61 6c 73 0d 0a 20 20 20 | 20 20 20 20 20 20 64 65 |als.. | de|
|00002f90| 66 61 75 6c 74 20 74 6f | 20 6e 6f 20 73 70 65 63 |fault to| no spec|
|00002fa0| 69 61 6c 20 65 6e 64 69 | 6e 67 20 61 74 20 61 6c |ial endi|ng at al|
|00002fb0| 6c 2e 20 20 54 68 61 74 | 20 73 68 6f 75 6c 64 20 |l. That| should |
|00002fc0| 74 65 6c 6c 20 79 6f 75 | 20 73 6f 6d 65 74 68 69 |tell you| somethi|
|00002fd0| 6e 67 0d 0a 20 20 20 20 | 20 1b 45 20 20 20 20 1b |ng.. | .E .|
|00002fe0| 46 61 62 6f 75 74 20 72 | 65 61 6c 69 74 79 2e 0d |Fabout r|eality..|
|00002ff0| 0a 0d 0a 20 20 20 20 20 | 32 2e 20 20 54 68 65 20 |... |2. The |
|00003000| 73 65 63 6f 6e 64 20 6d | 61 6a 6f 72 20 64 69 66 |second m|ajor dif|
|00003010| 66 65 72 65 6e 63 65 20 | 62 65 74 77 65 65 6e 20 |ference |between |
|00003020| 42 41 53 49 43 20 61 6e | 64 20 61 6c 67 65 62 72 |BASIC an|d algebr|
|00003030| 61 20 69 73 20 74 68 61 | 74 20 61 0d 0a 20 20 20 |a is tha|t a.. |
|00003040| 20 20 20 20 20 20 42 41 | 53 49 43 20 76 61 72 69 | BA|SIC vari|
|00003050| 61 62 6c 65 20 63 61 6e | 20 63 68 61 6e 67 65 20 |able can| change |
|00003060| 69 6e 20 76 61 6c 75 65 | 20 64 75 72 69 6e 67 20 |in value| during |
|00003070| 74 68 65 20 63 6f 75 72 | 73 65 20 6f 66 20 79 6f |the cour|se of yo|
|00003080| 75 72 0d 0a 20 20 20 20 | 20 20 20 20 20 70 72 6f |ur.. | pro|
|00003090| 67 72 61 6d 2e 20 20 57 | 68 65 6e 20 79 6f 75 20 |gram. W|hen you |
|000030a0| 64 6f 20 61 6e 20 61 6c | 67 65 62 72 61 20 70 72 |do an al|gebra pr|
|000030b0| 6f 62 6c 65 6d 2c 20 74 | 68 65 20 73 74 61 74 65 |oblem, t|he state|
|000030c0| 6d 65 6e 74 20 58 20 3d | 20 32 20 6d 65 61 6e 73 |ment X =| 2 means|
|000030d0| 0d 0a 20 20 20 20 20 20 | 20 20 20 74 68 61 74 20 |.. | that |
|000030e0| 58 20 69 73 20 61 6c 77 | 61 79 73 20 32 20 66 6f |X is alw|ays 2 fo|
|000030f0| 72 20 74 68 65 20 72 65 | 73 74 20 6f 66 20 74 68 |r the re|st of th|
|00003100| 61 74 20 70 72 6f 62 6c | 65 6d 2e 20 20 49 6e 20 |at probl|em. In |
|00003110| 61 20 63 6f 6d 70 75 74 | 65 72 0d 0a 20 20 20 20 |a comput|er.. |
|00003120| 20 20 20 20 20 70 72 6f | 67 72 61 6d 2c 20 58 20 | pro|gram, X |
|00003130| 3d 20 32 20 6d 65 61 6e | 73 20 74 68 61 74 20 58 |= 2 mean|s that X|
|00003140| 20 77 69 6c 6c 20 62 65 | 20 32 20 75 6e 74 69 6c | will be| 2 until|
|00003150| 20 79 6f 75 20 61 73 73 | 69 67 6e 20 61 6e 6f 74 | you ass|ign anot|
|00003160| 68 65 72 20 76 61 6c 75 | 65 0d 0a 20 20 20 20 20 |her valu|e.. |
|00003170| 20 20 20 20 74 6f 20 69 | 74 2e 20 20 54 68 69 6e | to i|t. Thin|
|00003180| 6b 20 6f 66 20 61 20 42 | 41 53 49 43 20 76 61 72 |k of a B|ASIC var|
|00003190| 69 61 62 6c 65 20 61 73 | 20 61 20 62 6f 78 2c 20 |iable as| a box, |
|000031a0| 6f 72 20 63 75 62 62 79 | 20 68 6f 6c 65 2c 20 69 |or cubby| hole, i|
|000031b0| 6e 20 77 68 69 63 68 0d | 0a 20 20 20 20 20 20 20 |n which.|. |
|000031c0| 20 20 79 6f 75 20 73 74 | 6f 72 65 20 73 6f 6d 65 | you st|ore some|
|000031d0| 74 68 69 6e 67 2e 20 20 | 46 6f 72 20 65 78 61 6d |thing. |For exam|
|000031e0| 70 6c 65 2c 20 69 74 20 | 63 6f 75 6c 64 20 62 65 |ple, it |could be|
|000031f0| 20 61 20 6d 61 69 6c 62 | 6f 78 20 63 6f 6e 74 61 | a mailb|ox conta|
|00003200| 69 6e 69 6e 67 0d 0a 20 | 20 20 20 20 20 20 20 20 |ining.. | |
|00003210| 6f 6e 65 20 6c 65 74 74 | 65 72 2c 20 68 65 6e 63 |one lett|er, henc|
|00003220| 65 20 4d 41 49 4c 42 4f | 58 20 3d 20 31 20 4c 45 |e MAILBO|X = 1 LE|
|00003230| 54 54 45 52 2e 20 20 49 | 66 20 61 6e 6f 74 68 65 |TTER. I|f anothe|
|00003240| 72 20 6c 65 74 74 65 72 | 20 69 73 20 61 64 64 65 |r letter| is adde|
|00003250| 64 20 74 6f 0d 0a 20 20 | 20 20 20 20 20 20 20 74 |d to.. | t|
|00003260| 68 65 20 6d 61 69 6c 20 | 69 6e 20 74 68 65 20 62 |he mail |in the b|
|00003270| 6f 78 20 77 65 20 68 61 | 76 65 20 4d 41 49 4c 42 |ox we ha|ve MAILB|
|00003280| 4f 58 20 3d 20 32 20 4c | 45 54 54 45 52 53 2e 20 |OX = 2 L|ETTERS. |
|00003290| 20 57 68 61 74 27 73 20 | 69 6e 20 74 68 65 20 62 | What's |in the b|
|000032a0| 6f 78 0d 0a 20 20 20 20 | 20 20 20 20 20 63 68 61 |ox.. | cha|
|000032b0| 6e 67 65 73 20 61 73 20 | 79 6f 75 20 61 64 64 20 |nges as |you add |
|000032c0| 6d 61 69 6c 2c 20 65 6d | 70 74 79 20 74 68 65 20 |mail, em|pty the |
|000032d0| 62 6f 78 2c 20 6f 72 20 | 6c 65 61 76 65 20 74 68 |box, or |leave th|
|000032e0| 65 20 72 65 61 6c 20 6d | 61 69 6c 20 69 6e 0d 0a |e real m|ail in..|
|000032f0| 20 20 20 20 20 20 20 20 | 20 61 6e 64 20 74 68 72 | | and thr|
|00003300| 6f 77 20 6f 75 74 20 74 | 68 65 20 6a 75 6e 6b 2e |ow out t|he junk.|
|00003310| 0d 0a 0d 0a 20 20 20 20 | 20 47 65 74 20 63 6f 6d |.... | Get com|
|00003320| 66 6f 72 74 61 62 6c 65 | 20 77 69 74 68 20 74 68 |fortable| with th|
|00003330| 65 20 63 6f 6e 63 65 70 | 74 20 6f 66 20 70 72 6f |e concep|t of pro|
|00003340| 67 72 61 6d 20 76 61 72 | 69 61 62 6c 65 73 2e 20 |gram var|iables. |
|00003350| 20 54 68 65 79 20 72 65 | 70 72 65 73 65 6e 74 0d | They re|present.|
|00003360| 0a 20 20 20 20 20 74 68 | 65 20 63 6f 72 65 20 6f |. th|e core o|
|00003370| 66 20 79 6f 75 72 20 70 | 72 6f 67 72 61 6d 2c 20 |f your p|rogram, |
|00003380| 70 6c 61 63 65 73 20 77 | 68 65 72 65 20 74 68 69 |places w|here thi|
|00003390| 6e 67 73 20 61 72 65 20 | 73 74 6f 72 65 64 20 61 |ngs are |stored a|
|000033a0| 6e 64 20 66 72 6f 6d 20 | 77 68 69 63 68 0d 0a 20 |nd from |which.. |
|000033b0| 20 20 20 20 74 68 65 79 | 20 61 72 65 20 72 65 74 | they| are ret|
|000033c0| 72 69 65 76 65 64 20 61 | 6e 64 20 6d 61 6e 69 70 |rieved a|nd manip|
|000033d0| 75 6c 61 74 65 64 2e 0d | 0a 0d 0a 20 20 20 20 20 |ulated..|... |
|000033e0| 41 73 20 79 6f 75 20 77 | 72 69 74 65 20 79 6f 75 |As you w|rite you|
|000033f0| 72 20 70 72 6f 67 72 61 | 6d 2c 20 69 74 20 69 73 |r progra|m, it is|
|00003400| 20 61 6c 73 6f 20 69 6d | 70 6f 72 74 61 6e 74 20 | also im|portant |
|00003410| 74 68 61 74 20 79 6f 75 | 20 67 69 76 65 20 76 61 |that you| give va|
|00003420| 72 69 61 62 6c 65 73 0d | 0a 20 20 20 20 20 6d 65 |riables.|. me|
|00003430| 61 6e 69 6e 67 66 75 6c | 20 6e 61 6d 65 73 2e 20 |aningful| names. |
|00003440| 20 41 31 20 3d 20 32 37 | 20 69 73 20 6d 75 63 68 | A1 = 27| is much|
|00003450| 20 6c 65 73 73 20 6d 65 | 61 6e 69 6e 67 66 75 6c | less me|aningful|
|00003460| 20 74 68 61 6e 20 41 47 | 45 20 3d 20 32 37 2e 20 | than AG|E = 27. |
|00003470| 20 54 68 69 73 0d 0a 20 | 20 20 20 20 65 66 66 65 | This.. | effe|
|00003480| 63 74 20 69 73 20 6d 61 | 67 6e 69 66 69 65 64 20 |ct is ma|gnified |
|00003490| 69 6e 20 61 20 6c 61 72 | 67 65 20 70 72 6f 67 72 |in a lar|ge progr|
|000034a0| 61 6d 20 77 68 65 72 65 | 20 62 61 64 6c 79 20 6e |am where| badly n|
|000034b0| 61 6d 65 64 20 76 61 72 | 69 61 62 6c 65 73 20 63 |amed var|iables c|
|000034c0| 61 6e 0d 0a 20 20 20 20 | 20 64 72 69 76 65 20 79 |an.. | drive y|
|000034d0| 6f 75 20 63 72 61 7a 79 | 20 2e 20 20 49 74 27 73 |ou crazy| . It's|
|000034e0| 20 65 76 65 6e 20 77 6f | 72 73 65 20 77 68 65 6e | even wo|rse when|
|000034f0| 20 79 6f 75 20 77 6f 72 | 6b 20 77 69 74 68 20 6f | you wor|k with o|
|00003500| 74 68 65 72 20 70 65 6f | 70 6c 65 27 73 0d 0a 20 |ther peo|ple's.. |
|00003510| 20 20 20 20 70 72 6f 67 | 72 61 6d 73 2e 20 20 52 | prog|rams. R|
|00003520| 65 6d 65 6d 62 65 72 2c | 20 72 65 61 64 61 62 69 |emember,| readabi|
|00003530| 6c 69 74 79 20 69 73 20 | 6b 65 79 20 62 65 63 61 |lity is |key beca|
|00003540| 75 73 65 20 38 30 25 20 | 6f 66 20 61 70 70 6c 69 |use 80% |of appli|
|00003550| 63 61 74 69 6f 6e 73 0d | 0a 20 20 20 20 20 70 72 |cations.|. pr|
|00003560| 6f 67 72 61 6d 6d 69 6e | 67 20 69 6e 76 6f 6c 76 |ogrammin|g involv|
|00003570| 65 73 20 77 6f 72 6b 20 | 77 69 74 68 20 65 78 69 |es work |with exi|
|00003580| 73 74 69 6e 67 20 63 6f | 64 65 2e 0d 0a 0d 0a 0d |sting co|de......|
|00003590| 0a 0d 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |... | |
|000035a0| 20 20 20 20 1b 45 20 20 | 20 20 20 20 20 20 20 20 | .E | |
|000035b0| 20 20 20 20 20 20 1b 46 | 20 20 20 20 20 1b 45 20 | .F| .E |
|000035c0| 20 20 36 0d 0a 0d 0a 0c | 0d 0a 0d 0a 0d 0a 0d 0a | 6.....|........|
|000035d0| 1b 46 20 20 20 20 20 1b | 45 43 48 41 50 54 45 52 |.F .|ECHAPTER|
|000035e0| 20 31 1b 46 20 20 20 20 | 20 20 20 20 20 20 20 20 | 1.F | |
|000035f0| 20 20 20 20 20 1b 45 20 | 20 53 4f 4d 45 20 42 41 | .E | SOME BA|
|00003600| 53 49 43 20 42 41 53 49 | 43 53 20 1b 46 20 20 20 |SIC BASI|CS .F |
|00003610| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 1b 45 | | .E|
|00003620| 43 48 41 50 54 45 52 20 | 31 0d 0a 0d 0a 0d 0a 20 |CHAPTER |1...... |
|00003630| 20 20 20 20 43 41 55 54 | 49 4f 4e 0d 0a 0d 0a 20 | CAUT|ION.... |
|00003640| 20 20 20 20 1b 46 4f 6e | 20 74 68 65 20 70 72 65 | .FOn| the pre|
|00003650| 76 69 6f 75 73 20 70 61 | 67 65 20 77 65 20 73 74 |vious pa|ge we st|
|00003660| 72 65 73 73 65 64 20 74 | 68 65 20 75 73 65 20 6f |ressed t|he use o|
|00003670| 66 20 6d 65 61 6e 69 6e | 67 66 75 6c 20 6e 61 6d |f meanin|gful nam|
|00003680| 65 73 2e 20 20 4f 6e 6c | 79 20 73 6f 6d 65 0d 0a |es. Onl|y some..|
|00003690| 20 20 20 20 20 76 65 72 | 73 69 6f 6e 73 20 6f 66 | ver|sions of|
|000036a0| 20 42 41 53 49 43 2c 20 | 75 73 75 61 6c 6c 79 20 | BASIC, |usually |
|000036b0| 74 68 65 20 6e 65 77 65 | 72 20 6f 6e 65 73 2c 20 |the newe|r ones, |
|000036c0| 70 65 72 6d 69 74 20 79 | 6f 75 20 74 6f 20 64 6f |permit y|ou to do|
|000036d0| 20 74 68 69 73 2e 20 20 | 41 6e 79 0d 0a 20 20 20 | this. |Any.. |
|000036e0| 20 20 74 69 6d 65 20 79 | 6f 75 20 75 73 65 20 61 | time y|ou use a|
|000036f0| 20 76 65 72 73 69 6f 6e | 20 6f 66 20 42 41 53 49 | version| of BASI|
|00003700| 43 20 66 6f 72 20 74 68 | 65 20 66 69 72 73 74 20 |C for th|e first |
|00003710| 74 69 6d 65 20 79 6f 75 | 20 73 68 6f 75 6c 64 20 |time you| should |
|00003720| 63 68 65 63 6b 20 74 68 | 69 73 0d 0a 20 20 20 20 |check th|is.. |
|00003730| 20 6f 75 74 2e 20 20 45 | 61 72 6c 69 65 72 20 69 | out. E|arlier i|
|00003740| 6d 70 6c 65 6d 65 6e 74 | 61 74 69 6f 6e 73 20 6f |mplement|ations o|
|00003750| 6e 6c 79 20 72 65 63 6f | 67 6e 69 7a 65 20 74 68 |nly reco|gnize th|
|00003760| 65 20 66 69 72 73 74 20 | 74 77 6f 20 63 68 61 72 |e first |two char|
|00003770| 61 63 74 65 72 73 20 6f | 66 0d 0a 20 20 20 20 20 |acters o|f.. |
|00003780| 61 20 76 61 72 69 61 62 | 6c 65 20 6e 61 6d 65 20 |a variab|le name |
|00003790| 61 6e 64 20 74 72 65 61 | 74 20 41 44 44 52 45 53 |and trea|t ADDRES|
|000037a0| 53 20 61 6e 64 20 41 44 | 56 45 4e 54 55 52 45 20 |S and AD|VENTURE |
|000037b0| 61 73 20 74 68 65 20 73 | 61 6d 65 20 76 61 72 69 |as the s|ame vari|
|000037c0| 61 62 6c 65 0d 0a 20 20 | 20 20 20 62 65 63 61 75 |able.. | becau|
|000037d0| 73 65 20 74 68 65 79 20 | 62 6f 74 68 20 73 74 61 |se they |both sta|
|000037e0| 72 74 20 77 69 74 68 20 | 41 44 2e 20 20 54 68 69 |rt with |AD. Thi|
|000037f0| 73 20 69 73 20 6e 6f 74 | 20 61 20 6c 69 6d 69 74 |s is not| a limit|
|00003800| 61 74 69 6f 6e 20 75 6e | 64 65 72 0d 0a 20 20 20 |ation un|der.. |
|00003810| 20 20 27 42 41 53 49 43 | 41 27 2e 0d 0a 0d 0a 0d | 'BASIC|A'......|
|00003820| 0a 20 20 20 20 20 1b 45 | 49 4e 50 55 54 20 50 52 |. .E|INPUT PR|
|00003830| 4f 47 52 41 4d 4d 49 4e | 47 0d 0a 0d 0a 20 20 20 |OGRAMMIN|G.... |
|00003840| 20 20 1b 46 41 20 76 61 | 72 69 61 62 6c 65 20 69 | .FA va|riable i|
|00003850| 73 20 61 20 63 75 62 62 | 79 20 68 6f 6c 65 20 74 |s a cubb|y hole t|
|00003860| 68 61 74 20 68 6f 6c 64 | 73 20 74 68 69 6e 67 73 |hat hold|s things|
|00003870| 20 74 65 6d 70 6f 72 61 | 72 69 6c 79 2e 20 20 49 | tempora|rily. I|
|00003880| 6e 70 75 74 0d 0a 20 20 | 20 20 20 76 61 72 69 61 |nput.. | varia|
|00003890| 62 6c 65 73 20 63 6f 6e | 74 61 69 6e 20 65 78 74 |bles con|tain ext|
|000038a0| 65 72 6e 61 6c 20 64 61 | 74 61 20 28 6f 72 20 69 |ernal da|ta (or i|
|000038b0| 66 20 74 68 65 20 64 61 | 74 61 20 69 73 20 62 61 |f the da|ta is ba|
|000038c0| 64 2c 20 67 61 72 62 61 | 67 65 29 20 74 68 61 74 |d, garba|ge) that|
|000038d0| 27 73 0d 0a 20 20 20 20 | 20 62 72 6f 75 67 68 74 |'s.. | brought|
|000038e0| 20 69 6e 74 6f 20 79 6f | 75 72 20 70 72 6f 67 72 | into yo|ur progr|
|000038f0| 61 6d 20 2e 20 20 54 68 | 65 72 65 20 61 72 65 20 |am . Th|ere are |
|00003900| 6d 61 6e 79 20 77 61 79 | 73 20 6f 66 20 66 65 65 |many way|s of fee|
|00003910| 64 69 6e 67 20 79 6f 75 | 72 0d 0a 20 20 20 20 20 |ding you|r.. |
|00003920| 70 72 6f 67 72 61 6d 2e | 20 20 46 6f 72 20 6e 6f |program.| For no|
|00003930| 77 2c 20 77 65 20 77 69 | 6c 6c 20 63 6f 6e 63 65 |w, we wi|ll conce|
|00003940| 6e 74 72 61 74 65 20 6f | 6e 20 73 74 6f 72 69 6e |ntrate o|n storin|
|00003950| 67 20 64 61 74 61 20 77 | 69 74 68 20 74 68 65 20 |g data w|ith the |
|00003960| 63 6f 64 65 2e 0d 0a 20 | 20 20 20 20 54 68 69 73 |code... | This|
|00003970| 20 66 75 6e 63 74 69 6f | 6e 20 69 73 20 70 65 72 | functio|n is per|
|00003980| 66 6f 72 6d 65 64 20 62 | 79 20 44 41 54 41 20 73 |formed b|y DATA s|
|00003990| 74 61 74 65 6d 65 6e 74 | 73 2e 20 20 41 20 66 69 |tatement|s. A fi|
|000039a0| 72 73 74 20 6e 61 6d 65 | 2c 20 6c 61 73 74 20 6e |rst name|, last n|
|000039b0| 61 6d 65 0d 0a 20 20 20 | 20 20 61 6e 64 20 61 67 |ame.. | and ag|
|000039c0| 65 20 61 72 65 20 73 74 | 6f 72 65 64 20 61 73 20 |e are st|ored as |
|000039d0| 66 6f 6c 6c 6f 77 73 3a | 0d 0a 0d 0a 20 20 20 20 |follows:|.... |
|000039e0| 20 31 30 30 20 44 41 54 | 41 20 53 4d 49 54 48 2c | 100 DAT|A SMITH,|
|000039f0| 4a 4f 48 4e 2c 31 38 0d | 0a 0d 0a 20 20 20 20 20 |JOHN,18.|... |
|00003a00| 44 6f 6e 27 74 20 77 6f | 72 72 79 20 61 62 6f 75 |Don't wo|rry abou|
|00003a10| 74 20 74 68 65 20 31 30 | 30 20 69 6e 20 66 72 6f |t the 10|0 in fro|
|00003a20| 6e 74 20 6f 66 20 74 68 | 65 20 73 74 61 74 65 6d |nt of th|e statem|
|00003a30| 65 6e 74 2e 20 20 49 74 | 27 73 20 61 20 6c 69 6e |ent. It|'s a lin|
|00003a40| 65 0d 0a 20 20 20 20 20 | 6e 75 6d 62 65 72 2e 20 |e.. |number. |
|00003a50| 20 57 65 20 77 69 6c 6c | 20 64 69 73 63 75 73 73 | We will| discuss|
|00003a60| 20 74 68 65 73 65 20 61 | 20 6c 69 74 74 6c 65 20 | these a| little |
|00003a70| 6c 61 74 65 72 2e 20 20 | 41 73 20 66 6f 72 20 74 |later. |As for t|
|00003a80| 68 65 20 72 65 73 74 20 | 6f 66 20 69 74 2c 0d 0a |he rest |of it,..|
|00003a90| 20 20 20 20 20 6e 6f 74 | 69 63 65 20 74 68 61 74 | not|ice that|
|00003aa0| 20 74 68 65 72 65 20 61 | 72 65 20 74 68 72 65 65 | there a|re three|
|00003ab0| 20 70 69 65 63 65 73 20 | 6f 66 20 69 6e 66 6f 72 | pieces |of infor|
|00003ac0| 6d 61 74 69 6f 6e 20 6f | 6e 20 74 68 65 20 6c 69 |mation o|n the li|
|00003ad0| 6e 65 20 61 6e 64 20 74 | 68 61 74 0d 0a 20 20 20 |ne and t|hat.. |
|00003ae0| 20 20 74 68 65 73 65 20 | 61 72 65 20 73 65 70 61 | these |are sepa|
|00003af0| 72 61 74 65 64 20 62 79 | 20 63 6f 6d 6d 61 73 2e |rated by| commas.|
|00003b00| 20 20 54 68 61 74 27 73 | 20 6f 75 72 20 69 6e 70 | That's| our inp|
|00003b10| 75 74 20 64 61 74 61 2e | 20 20 57 68 65 6e 20 61 |ut data.| When a|
|00003b20| 6c 6c 20 74 68 65 0d 0a | 20 20 20 20 20 64 61 74 |ll the..| dat|
|00003b30| 61 20 6f 6e 20 74 68 65 | 20 6c 69 6e 65 20 72 65 |a on the| line re|
|00003b40| 66 65 72 73 20 74 6f 20 | 74 68 65 20 73 61 6d 65 |fers to |the same|
|00003b50| 20 74 68 69 6e 67 20 6f | 72 20 70 65 72 73 6f 6e | thing o|r person|
|00003b60| 2c 20 69 74 20 69 73 20 | 63 61 6c 6c 65 64 20 61 |, it is |called a|
|00003b70| 0d 0a 20 20 20 20 20 52 | 45 43 4f 52 44 2e 20 20 |.. R|ECORD. |
|00003b80| 54 68 65 20 69 74 65 6d | 73 20 74 68 61 74 20 6d |The item|s that m|
|00003b90| 61 6b 65 20 74 68 65 20 | 72 65 63 6f 72 64 20 61 |ake the |record a|
|00003ba0| 72 65 20 63 61 6c 6c 65 | 64 20 46 49 45 4c 44 53 |re calle|d FIELDS|
|00003bb0| 2e 0d 0a 0d 0a 20 20 20 | 20 20 54 68 65 20 44 41 |..... | The DA|
|00003bc0| 54 41 20 73 74 61 74 65 | 6d 65 6e 74 20 6f 6e 6c |TA state|ment onl|
|00003bd0| 79 20 73 74 6f 72 65 73 | 20 74 68 69 6e 67 73 2e |y stores| things.|
|00003be0| 20 20 54 68 65 20 64 61 | 74 61 20 77 69 6c 6c 20 | The da|ta will |
|00003bf0| 73 69 74 20 74 68 65 72 | 65 2c 20 61 64 0d 0a 20 |sit ther|e, ad.. |
|00003c00| 20 20 20 20 69 6e 66 69 | 6e 69 74 75 6d 20 61 64 | infi|nitum ad|
|00003c10| 20 6e 61 75 73 65 75 6d | 2c 20 75 6e 6c 65 73 73 | nauseum|, unless|
|00003c20| 20 79 6f 75 20 74 65 6c | 6c 20 79 6f 75 72 20 70 | you tel|l your p|
|00003c30| 72 6f 67 72 61 6d 20 74 | 6f 20 72 65 61 64 20 69 |rogram t|o read i|
|00003c40| 74 20 61 6e 64 20 70 75 | 74 20 69 74 0d 0a 20 20 |t and pu|t it.. |
|00003c50| 20 20 20 69 6e 74 6f 20 | 61 20 63 75 62 62 79 20 | into |a cubby |
|00003c60| 68 6f 6c 65 20 28 61 73 | 73 69 67 6e 20 74 68 61 |hole (as|sign tha|
|00003c70| 74 20 76 61 6c 75 65 20 | 74 6f 20 61 20 76 61 72 |t value |to a var|
|00003c80| 69 61 62 6c 65 20 6e 61 | 6d 65 20 66 6f 72 20 74 |iable na|me for t|
|00003c90| 68 6f 73 65 20 77 68 6f | 0d 0a 20 20 20 20 20 77 |hose who|.. w|
|00003ca0| 61 6e 74 20 74 6f 20 62 | 65 20 65 73 6f 74 65 72 |ant to b|e esoter|
|00003cb0| 69 63 29 2e 20 20 54 68 | 69 73 20 66 75 6e 63 74 |ic). Th|is funct|
|00003cc0| 69 6f 6e 20 69 73 20 70 | 65 72 66 6f 72 6d 65 64 |ion is p|erformed|
|00003cd0| 20 62 79 20 74 68 65 20 | 52 45 41 44 20 73 74 61 | by the |READ sta|
|00003ce0| 74 65 6d 65 6e 74 2e 0d | 0a 0d 0a 20 20 20 20 20 |tement..|... |
|00003cf0| 31 31 30 20 52 45 41 44 | 20 4c 41 53 54 2e 4e 41 |110 READ| LAST.NA|
|00003d00| 4d 45 24 2c 20 46 49 52 | 53 54 2e 4e 41 4d 45 24 |ME$, FIR|ST.NAME$|
|00003d10| 2c 20 41 47 45 0d 0a 0d | 0a 20 20 20 20 20 4c 65 |, AGE...|. Le|
|00003d20| 74 27 73 20 6b 65 65 70 | 20 69 67 6e 6f 72 69 6e |t's keep| ignorin|
|00003d30| 67 20 74 68 65 20 6c 69 | 6e 65 20 6e 75 6d 62 65 |g the li|ne numbe|
|00003d40| 72 20 28 74 68 65 20 31 | 31 30 29 20 61 6e 64 20 |r (the 1|10) and |
|00003d50| 65 78 61 6d 69 6e 65 20 | 74 68 65 20 72 65 73 74 |examine |the rest|
|00003d60| 20 6f 66 0d 0a 20 20 20 | 20 20 74 68 65 20 6c 69 | of.. | the li|
|00003d70| 6e 65 2e 20 20 46 69 72 | 73 74 2c 20 6e 6f 74 65 |ne. Fir|st, note|
|00003d80| 20 74 68 61 74 20 74 68 | 65 72 65 20 61 72 65 20 | that th|ere are |
|00003d90| 74 68 72 65 65 20 76 61 | 72 69 61 62 6c 65 20 6e |three va|riable n|
|00003da0| 61 6d 65 73 2e 20 20 54 | 68 65 20 66 69 72 73 74 |ames. T|he first|
|00003db0| 0d 0a 20 20 20 20 20 74 | 77 6f 20 61 72 65 20 61 |.. t|wo are a|
|00003dc0| 6c 70 68 61 73 20 6f 72 | 20 73 74 72 69 6e 67 73 |lphas or| strings|
|00003dd0| 20 28 74 68 65 79 20 65 | 6e 64 20 77 69 74 68 20 | (they e|nd with |
|00003de0| 61 20 24 29 20 61 6e 64 | 20 74 68 65 20 6c 61 73 |a $) and| the las|
|00003df0| 74 20 69 73 20 61 20 6e | 75 6d 65 72 69 63 2e 0d |t is a n|umeric..|
|00003e00| 0a 20 20 20 20 20 57 68 | 65 6e 20 65 78 65 63 75 |. Wh|en execu|
|00003e10| 74 65 64 2c 20 74 68 69 | 73 20 73 74 61 74 65 6d |ted, thi|s statem|
|00003e20| 65 6e 74 20 74 65 6c 6c | 73 20 74 68 65 20 63 6f |ent tell|s the co|
|00003e30| 6d 70 75 74 65 72 20 74 | 6f 3a 0d 0a 0d 0a 20 20 |mputer t|o:.... |
|00003e40| 20 20 20 20 20 20 20 2d | 20 46 69 6e 64 20 74 68 | -| Find th|
|00003e50| 65 20 66 69 72 73 74 20 | 44 41 54 41 20 73 74 61 |e first |DATA sta|
|00003e60| 74 65 6d 65 6e 74 0d 0a | 20 20 20 20 20 20 20 20 |tement..| |
|00003e70| 20 2d 20 54 61 6b 65 20 | 74 68 65 20 66 69 72 73 | - Take |the firs|
|00003e80| 74 20 70 69 65 63 65 20 | 6f 66 20 64 61 74 61 20 |t piece |of data |
|00003e90| 61 6e 64 20 61 73 73 69 | 67 6e 20 69 74 73 20 76 |and assi|gn its v|
|00003ea0| 61 6c 75 65 20 28 53 4d | 49 54 48 29 20 74 6f 20 |alue (SM|ITH) to |
|00003eb0| 74 68 65 0d 0a 20 20 20 | 20 20 20 20 20 20 20 20 |the.. | |
|00003ec0| 76 61 72 69 61 62 6c 65 | 20 4c 41 53 54 2e 4e 41 |variable| LAST.NA|
|00003ed0| 4d 45 24 0d 0a 20 20 20 | 20 20 20 20 20 20 2d 20 |ME$.. | - |
|00003ee0| 54 61 6b 65 20 74 68 65 | 20 73 65 63 6f 6e 64 20 |Take the| second |
|00003ef0| 70 69 65 63 65 20 6f 66 | 20 64 61 74 61 20 61 6e |piece of| data an|
|00003f00| 64 20 61 73 73 69 67 6e | 20 69 74 73 20 76 61 6c |d assign| its val|
|00003f10| 75 65 20 28 4a 4f 48 4e | 29 20 74 6f 20 74 68 65 |ue (JOHN|) to the|
|00003f20| 0d 0a 20 20 20 20 20 20 | 20 20 20 20 20 76 61 72 |.. | var|
|00003f30| 69 61 62 6c 65 20 46 49 | 52 53 54 2e 4e 41 4d 45 |iable FI|RST.NAME|
|00003f40| 24 0d 0a 20 20 20 20 20 | 20 20 20 20 2d 20 54 61 |$.. | - Ta|
|00003f50| 6b 65 20 74 68 65 20 74 | 68 69 72 64 20 70 69 65 |ke the t|hird pie|
|00003f60| 63 65 20 6f 66 20 64 61 | 74 61 20 61 6e 64 20 61 |ce of da|ta and a|
|00003f70| 73 73 69 67 6e 20 69 74 | 73 20 76 61 6c 75 65 20 |ssign it|s value |
|00003f80| 28 31 38 29 20 74 6f 20 | 74 68 65 0d 0a 20 20 20 |(18) to |the.. |
|00003f90| 20 20 20 20 20 20 20 20 | 76 61 72 69 61 62 6c 65 | |variable|
|00003fa0| 20 41 47 45 0d 0a 0d 0a | 20 20 20 20 20 42 79 20 | AGE....| By |
|00003fb0| 74 68 65 20 77 61 79 2c | 20 64 69 64 20 79 6f 75 |the way,| did you|
|00003fc0| 20 6e 6f 74 69 63 65 20 | 74 68 61 74 20 77 65 20 | notice |that we |
|00003fd0| 61 73 73 69 67 6e 65 64 | 20 73 65 6c 66 2d 64 65 |assigned| self-de|
|00003fe0| 66 69 6e 69 6e 67 20 76 | 61 72 69 61 62 6c 65 20 |fining v|ariable |
|00003ff0| 6e 61 6d 65 73 0d 0a 20 | 20 20 20 20 69 6e 20 74 |names.. | in t|
|00004000| 68 65 20 70 72 65 76 69 | 6f 75 73 20 70 61 72 61 |he previ|ous para|
|00004010| 67 72 61 70 68 2e 20 20 | 57 65 20 61 6c 73 6f 20 |graph. |We also |
|00004020| 75 73 65 64 20 61 20 70 | 65 72 69 6f 64 20 74 6f |used a p|eriod to|
|00004030| 20 62 72 65 61 6b 20 74 | 68 65 20 6e 61 6d 65 73 | break t|he names|
|00004040| 0d 0a 20 20 20 20 20 69 | 6e 74 6f 20 74 77 6f 20 |.. i|nto two |
|00004050| 70 61 72 74 73 20 74 6f | 20 6d 61 6b 65 20 74 68 |parts to| make th|
|00004060| 65 6d 20 6d 6f 72 65 20 | 72 65 61 64 61 62 6c 65 |em more |readable|
|00004070| 2e 0d 0a 0d 0a 0d 0a 0d | 0a 20 20 20 20 20 20 20 |........|. |
|00004080| 20 20 20 20 20 20 20 20 | 20 20 1b 45 20 20 20 20 | | .E |
|00004090| 20 20 20 20 20 20 20 20 | 20 20 20 20 1b 46 20 20 | | .F |
|000040a0| 20 20 20 1b 45 20 20 20 | 37 0d 0a 0d 0a 0c 0d 0a | .E |7.......|
|000040b0| 0d 0a 0d 0a 0d 0a 1b 46 | 20 20 20 20 20 1b 45 43 |.......F| .EC|
|000040c0| 48 41 50 54 45 52 20 31 | 1b 46 20 20 20 20 20 20 |HAPTER 1|.F |
|000040d0| 20 20 20 20 20 20 20 20 | 20 20 20 1b 45 20 20 53 | | .E S|
|000040e0| 4f 4d 45 20 42 41 53 49 | 43 20 42 41 53 49 43 53 |OME BASI|C BASICS|
|000040f0| 20 1b 46 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | .F | |
|00004100| 20 20 20 20 1b 45 43 48 | 41 50 54 45 52 20 31 0d | .ECH|APTER 1.|
|00004110| 0a 0d 0a 0d 0a 20 20 20 | 20 20 1b 46 41 20 52 45 |..... | .FA RE|
|00004120| 41 44 20 73 74 61 74 65 | 6d 65 6e 74 20 61 6c 77 |AD state|ment alw|
|00004130| 61 79 73 20 65 78 70 65 | 63 74 73 20 65 6e 6f 75 |ays expe|cts enou|
|00004140| 67 68 20 64 61 74 61 20 | 74 6f 20 61 73 73 69 67 |gh data |to assig|
|00004150| 6e 20 61 20 76 61 6c 75 | 65 20 74 6f 20 65 61 63 |n a valu|e to eac|
|00004160| 68 20 6f 66 0d 0a 20 20 | 20 20 20 74 68 65 20 76 |h of.. | the v|
|00004170| 61 72 69 61 62 6c 65 73 | 20 74 68 61 74 20 69 74 |ariables| that it|
|00004180| 20 63 6f 6e 74 61 69 6e | 73 2e 20 20 49 66 20 69 | contain|s. If i|
|00004190| 74 20 72 75 6e 73 20 6f | 75 74 20 6f 66 20 64 61 |t runs o|ut of da|
|000041a0| 74 61 20 69 6e 20 6f 6e | 65 20 44 41 54 41 0d 0a |ta in on|e DATA..|
|000041b0| 20 20 20 20 20 73 74 61 | 74 65 6d 65 6e 74 20 69 | sta|tement i|
|000041c0| 74 20 77 69 6c 6c 20 67 | 6f 20 74 6f 20 74 68 65 |t will g|o to the|
|000041d0| 20 6e 65 78 74 2e 20 20 | 48 65 6e 63 65 2c 20 74 | next. |Hence, t|
|000041e0| 68 65 20 64 61 74 61 20 | 63 6f 75 6c 64 20 61 6c |he data |could al|
|000041f0| 73 6f 20 62 65 20 73 74 | 6f 72 65 64 0d 0a 20 20 |so be st|ored.. |
|00004200| 20 20 20 74 68 69 73 20 | 77 61 79 3a 0d 0a 0d 0a | this |way:....|
|00004210| 20 20 20 20 20 31 30 30 | 20 44 41 54 41 20 53 4d | 100| DATA SM|
|00004220| 49 54 48 0d 0a 20 20 20 | 20 20 31 30 32 20 44 41 |ITH.. | 102 DA|
|00004230| 54 41 20 4a 4f 48 4e 0d | 0a 20 20 20 20 20 31 30 |TA JOHN.|. 10|
|00004240| 34 20 44 41 54 41 20 31 | 38 0d 0a 20 20 20 20 20 |4 DATA 1|8.. |
|00004250| 31 31 30 20 52 45 41 44 | 20 4c 41 53 54 2e 4e 41 |110 READ| LAST.NA|
|00004260| 4d 45 24 2c 20 46 49 52 | 53 54 2e 4e 41 4d 45 24 |ME$, FIR|ST.NAME$|
|00004270| 2c 20 41 47 45 0d 0a 0d | 0a 20 20 20 20 20 54 68 |, AGE...|. Th|
|00004280| 65 20 61 62 6f 76 65 20 | 63 6f 64 65 20 72 65 73 |e above |code res|
|00004290| 75 6c 74 73 20 69 6e 20 | 74 68 65 20 73 61 6d 65 |ults in |the same|
|000042a0| 20 61 73 73 69 67 6e 6d | 65 6e 74 20 6f 66 20 76 | assignm|ent of v|
|000042b0| 61 6c 75 65 73 20 61 73 | 20 6f 75 72 20 6f 72 69 |alues as| our ori|
|000042c0| 67 69 6e 61 6c 0d 0a 20 | 20 20 20 20 44 41 54 41 |ginal.. | DATA|
|000042d0| 20 73 74 61 74 65 6d 65 | 6e 74 2e 20 20 42 41 53 | stateme|nt. BAS|
|000042e0| 49 43 20 64 6f 65 73 20 | 6e 6f 74 20 63 61 72 65 |IC does |not care|
|000042f0| 20 69 66 20 74 68 65 20 | 64 61 74 61 20 69 73 20 | if the |data is |
|00004300| 6f 6e 20 6f 6e 65 20 6c | 69 6e 65 20 6f 72 20 6f |on one l|ine or o|
|00004310| 6e 0d 0a 20 20 20 20 20 | 6d 75 6c 74 69 70 6c 65 |n.. |multiple|
|00004320| 20 6c 69 6e 65 73 2e 20 | 20 57 68 65 6e 20 6f 6e | lines. | When on|
|00004330| 65 20 6c 69 6e 65 20 69 | 73 20 65 78 68 61 75 73 |e line i|s exhaus|
|00004340| 74 65 64 20 28 74 69 6d | 65 20 66 6f 72 20 61 20 |ted (tim|e for a |
|00004350| 63 6f 66 66 65 65 20 62 | 72 65 61 6b 3f 3f 29 2c |coffee b|reak??),|
|00004360| 0d 0a 20 20 20 20 20 42 | 41 53 49 43 20 67 6f 65 |.. B|ASIC goe|
|00004370| 73 20 74 6f 20 74 68 65 | 20 6e 65 78 74 20 44 41 |s to the| next DA|
|00004380| 54 41 20 73 74 61 74 65 | 6d 65 6e 74 2e 20 20 49 |TA state|ment. I|
|00004390| 74 27 73 20 70 72 65 66 | 65 72 61 62 6c 65 20 74 |t's pref|erable t|
|000043a0| 6f 20 70 75 74 20 61 6c | 6c 20 74 68 65 0d 0a 20 |o put al|l the.. |
|000043b0| 20 20 20 20 69 6e 70 75 | 74 20 64 61 74 61 20 74 | inpu|t data t|
|000043c0| 68 61 74 20 62 65 6c 6f | 6e 67 73 20 74 6f 67 65 |hat belo|ngs toge|
|000043d0| 74 68 65 72 20 6f 6e 20 | 74 68 65 20 73 61 6d 65 |ther on |the same|
|000043e0| 20 6c 69 6e 65 2e 20 20 | 45 72 72 6f 72 73 20 6f | line. |Errors o|
|000043f0| 72 20 6d 69 73 73 69 6e | 67 0d 0a 20 20 20 20 20 |r missin|g.. |
|00004400| 64 61 74 61 20 63 61 6e | 20 62 65 20 73 70 6f 74 |data can| be spot|
|00004410| 74 65 64 20 66 61 73 74 | 65 72 20 74 68 69 73 20 |ted fast|er this |
|00004420| 77 61 79 2e 0d 0a 0d 0a | 20 20 20 20 20 45 72 72 |way.....| Err|
|00004430| 6f 72 73 20 61 72 65 20 | 61 6c 73 6f 20 70 61 72 |ors are |also par|
|00004440| 74 20 6f 66 20 79 6f 75 | 72 20 74 75 72 66 2e 20 |t of you|r turf. |
|00004450| 20 42 65 69 6e 67 20 68 | 75 6d 61 6e 2c 20 77 65 | Being h|uman, we|
|00004460| 20 6d 61 6b 65 20 6d 69 | 73 74 61 6b 65 73 20 61 | make mi|stakes a|
|00004470| 6e 64 0d 0a 20 20 20 20 | 20 62 65 69 6e 67 20 61 |nd.. | being a|
|00004480| 20 6d 61 63 68 69 6e 65 | 2c 20 74 68 65 20 63 6f | machine|, the co|
|00004490| 6d 70 75 74 65 72 20 64 | 6f 65 73 20 65 78 61 63 |mputer d|oes exac|
|000044a0| 74 6c 79 20 77 68 61 74 | 20 69 74 27 73 20 74 6f |tly what| it's to|
|000044b0| 6c 64 2e 20 20 20 49 74 | 20 77 69 6c 6c 0d 0a 20 |ld. It| will.. |
|000044c0| 20 20 20 20 6d 61 6b 65 | 20 65 76 65 72 79 20 61 | make| every a|
|000044d0| 74 74 65 6d 70 74 20 74 | 6f 20 63 61 72 72 79 20 |ttempt t|o carry |
|000044e0| 6f 75 74 20 79 6f 75 72 | 20 69 6e 73 74 72 75 63 |out your| instruc|
|000044f0| 74 69 6f 6e 73 2c 20 69 | 6e 63 6c 75 64 69 6e 67 |tions, i|ncluding|
|00004500| 20 74 68 65 20 62 61 64 | 0d 0a 20 20 20 20 20 6f | the bad|.. o|
|00004510| 6e 65 73 2e 20 20 49 66 | 20 69 74 20 63 61 6e 6e |nes. If| it cann|
|00004520| 6f 74 20 63 61 72 72 79 | 20 74 68 65 6d 20 6f 75 |ot carry| them ou|
|00004530| 74 2c 20 69 74 20 75 73 | 75 61 6c 6c 79 20 74 61 |t, it us|ually ta|
|00004540| 6c 6b 73 20 62 61 63 6b | 20 74 6f 20 79 6f 75 20 |lks back| to you |
|00004550| 75 73 69 6e 67 0d 0a 20 | 20 20 20 20 6d 79 73 74 |using.. | myst|
|00004560| 69 63 61 6c 20 69 6e 63 | 61 6e 74 61 74 69 6f 6e |ical inc|antation|
|00004570| 73 20 74 68 61 74 20 6f | 6e 6c 79 20 74 68 65 20 |s that o|nly the |
|00004580| 68 69 67 68 65 73 74 20 | 64 69 73 63 69 70 6c 65 |highest |disciple|
|00004590| 73 20 6f 66 20 63 6f 6d | 70 75 74 65 72 69 73 6d |s of com|puterism|
|000045a0| 0d 0a 20 20 20 20 20 75 | 6e 64 65 72 73 74 61 6e |.. u|nderstan|
|000045b0| 64 2c 20 65 2e 67 2e 20 | 20 53 79 6e 74 61 78 20 |d, e.g. | Syntax |
|000045c0| 65 72 72 6f 72 20 2e 2e | 2e 2c 20 20 45 72 72 6f |error ..|., Erro|
|000045d0| 72 20 63 6f 64 65 20 33 | 30 32 2e 2e 2c 20 20 65 |r code 3|02.., e|
|000045e0| 74 63 2e 0d 0a 0d 0a 20 | 20 20 20 20 4f 6e 65 20 |tc..... | One |
|000045f0| 6f 66 20 74 68 65 20 66 | 65 77 20 63 6f 6d 70 72 |of the f|ew compr|
|00004600| 65 68 65 6e 73 69 62 6c | 65 20 65 72 72 6f 72 20 |ehensibl|e error |
|00004610| 6d 65 73 73 61 67 65 73 | 20 6f 63 63 75 72 73 20 |messages| occurs |
|00004620| 69 66 20 79 6f 75 20 64 | 6f 20 6e 6f 74 20 68 61 |if you d|o not ha|
|00004630| 76 65 0d 0a 20 20 20 20 | 20 65 6e 6f 75 67 68 20 |ve.. | enough |
|00004640| 64 61 74 61 20 74 6f 20 | 6d 61 74 63 68 20 74 68 |data to |match th|
|00004650| 65 20 76 61 72 69 61 62 | 6c 65 73 20 69 6e 20 61 |e variab|les in a|
|00004660| 20 52 45 41 44 20 73 74 | 61 74 65 6d 65 6e 74 2c | READ st|atement,|
|00004670| 20 65 2e 67 2e 3a 0d 0a | 0d 0a 20 20 20 20 20 31 | e.g.:..|.. 1|
|00004680| 30 30 20 44 41 54 41 20 | 4b 4f 5a 4e 4f 57 53 4b |00 DATA |KOZNOWSK|
|00004690| 49 0d 0a 20 20 20 20 20 | 31 30 35 20 44 41 54 41 |I.. |105 DATA|
|000046a0| 20 48 45 52 4d 41 4e 0d | 0a 20 20 20 20 20 31 31 | HERMAN.|. 11|
|000046b0| 30 20 52 45 41 44 20 4c | 41 53 54 2e 4e 41 4d 45 |0 READ L|AST.NAME|
|000046c0| 24 2c 20 46 49 52 53 54 | 2e 4e 41 4d 45 24 2c 20 |$, FIRST|.NAME$, |
|000046d0| 41 47 45 0d 0a 0d 0a 20 | 20 20 20 20 54 68 65 20 |AGE.... | The |
|000046e0| 61 62 6f 76 65 20 77 6f | 75 6c 64 20 72 65 73 75 |above wo|uld resu|
|000046f0| 6c 74 20 69 6e 20 61 20 | 6d 65 73 73 61 67 65 20 |lt in a |message |
|00004700| 6c 69 6b 65 0d 0a 0d 0a | 20 20 20 20 20 20 20 20 |like....| |
|00004710| 20 6f 75 74 20 6f 66 20 | 64 61 74 61 20 65 72 72 | out of |data err|
|00004720| 6f 72 20 69 6e 20 6c 69 | 6e 65 20 31 31 30 0d 0a |or in li|ne 110..|
|00004730| 0d 0a 20 20 20 20 20 4c | 69 6e 65 20 31 31 30 20 |.. L|ine 110 |
|00004740| 69 73 20 63 6f 72 72 65 | 63 74 2e 20 20 54 68 65 |is corre|ct. The|
|00004750| 20 72 65 61 6c 20 70 72 | 6f 62 6c 65 6d 20 69 73 | real pr|oblem is|
|00004760| 20 61 62 6f 76 65 20 6c | 69 6e 65 20 31 31 30 20 | above l|ine 110 |
|00004770| 77 68 65 72 65 20 79 6f | 75 20 61 72 65 0d 0a 20 |where yo|u are.. |
|00004780| 20 20 20 20 6d 69 73 73 | 69 6e 67 20 64 61 74 61 | miss|ing data|
|00004790| 2e 20 20 47 65 74 20 63 | 6f 6d 66 6f 72 74 61 62 |. Get c|omfortab|
|000047a0| 6c 65 20 77 69 74 68 20 | 65 72 72 6f 72 20 6d 65 |le with |error me|
|000047b0| 73 73 61 67 65 73 2c 20 | 74 68 65 79 20 61 72 65 |ssages, |they are|
|000047c0| 20 61 62 6f 75 74 20 74 | 6f 0d 0a 20 20 20 20 20 | about t|o.. |
|000047d0| 62 65 63 6f 6d 65 20 61 | 20 70 61 72 74 20 6f 66 |become a| part of|
|000047e0| 20 79 6f 75 20 70 72 6f | 66 65 73 73 69 6f 6e 61 | you pro|fessiona|
|000047f0| 6c 20 6c 69 66 65 2e 0d | 0a 0d 0a 0d 0a 20 20 20 |l life..|..... |
|00004800| 20 20 1b 45 4f 55 54 50 | 55 54 20 50 52 4f 47 52 | .EOUTP|UT PROGR|
|00004810| 41 4d 4d 49 4e 47 0d 0a | 0d 0a 20 20 20 20 20 1b |AMMING..|.. .|
|00004820| 46 53 6f 20 6d 75 63 68 | 20 66 6f 72 20 69 6e 70 |FSo much| for inp|
|00004830| 75 74 2e 20 20 4c 65 74 | 27 73 20 6c 6f 6f 6b 20 |ut. Let|'s look |
|00004840| 61 74 20 6f 75 74 70 75 | 74 20 61 6e 64 20 73 6f |at outpu|t and so|
|00004850| 6d 65 20 73 69 6d 70 6c | 65 20 77 61 79 73 20 74 |me simpl|e ways t|
|00004860| 6f 20 64 69 73 70 6c 61 | 79 0d 0a 20 20 20 20 20 |o displa|y.. |
|00004870| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 2e 20 20 44 6f |informat|ion. Do|
|00004880| 6e 27 74 20 77 6f 72 72 | 79 20 61 62 6f 75 74 20 |n't worr|y about |
|00004890| 61 70 70 65 61 72 61 6e | 63 65 20 79 65 74 2c 20 |appearan|ce yet, |
|000048a0| 77 65 27 6c 6c 20 67 65 | 74 20 74 6f 20 74 68 61 |we'll ge|t to tha|
|000048b0| 74 20 69 6e 0d 0a 20 20 | 20 20 20 6c 61 74 65 72 |t in.. | later|
|000048c0| 20 63 68 61 70 74 65 72 | 73 2e 0d 0a 0d 0a 20 20 | chapter|s..... |
|000048d0| 20 20 20 31 32 30 20 50 | 52 49 4e 54 20 4c 41 53 | 120 P|RINT LAS|
|000048e0| 54 2e 4e 41 4d 45 24 2c | 20 46 49 52 53 54 2e 4e |T.NAME$,| FIRST.N|
|000048f0| 41 4d 45 24 2c 20 41 47 | 45 0d 0a 0d 0a 20 20 20 |AME$, AG|E.... |
|00004900| 20 20 50 72 69 6e 74 20 | 64 6f 65 73 20 65 78 61 | Print |does exa|
|00004910| 63 74 6c 79 20 77 68 61 | 74 20 79 6f 75 20 6d 69 |ctly wha|t you mi|
|00004920| 67 68 74 20 65 78 70 65 | 63 74 2c 20 70 72 69 6e |ght expe|ct, prin|
|00004930| 74 73 20 74 68 65 20 76 | 61 6c 75 65 73 20 66 6f |ts the v|alues fo|
|00004940| 72 20 74 68 65 0d 0a 20 | 20 20 20 20 76 61 72 69 |r the.. | vari|
|00004950| 61 62 6c 65 73 20 4c 41 | 53 54 2e 4e 41 4d 45 24 |ables LA|ST.NAME$|
|00004960| 2c 20 46 49 52 53 54 2e | 4e 41 4d 45 24 20 61 6e |, FIRST.|NAME$ an|
|00004970| 64 20 41 47 45 20 6f 6e | 20 6f 6e 65 20 6c 69 6e |d AGE on| one lin|
|00004980| 65 2e 20 20 54 68 61 74 | 20 6c 69 6e 65 2c 20 62 |e. That| line, b|
|00004990| 79 0d 0a 20 20 20 20 20 | 74 68 65 20 77 61 79 2c |y.. |the way,|
|000049a0| 20 69 73 20 6f 6e 20 79 | 6f 75 72 20 50 43 20 73 | is on y|our PC s|
|000049b0| 63 72 65 65 6e 2e 20 20 | 49 66 20 79 6f 75 20 77 |creen. |If you w|
|000049c0| 61 6e 74 20 69 74 20 6f | 75 74 70 75 74 20 74 6f |ant it o|utput to|
|000049d0| 20 61 20 70 72 69 6e 74 | 65 72 20 79 6f 75 0d 0a | a print|er you..|
|000049e0| 20 20 20 20 20 68 61 76 | 65 20 74 6f 20 75 73 65 | hav|e to use|
|000049f0| 20 4c 50 52 49 4e 54 2e | 0d 0a 0d 0a 0d 0a 0d 0a | LPRINT.|........|
|00004a00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004a10| 20 1b 45 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | .E | |
|00004a20| 20 20 20 1b 46 20 20 20 | 20 20 1b 45 20 20 20 38 | .F | .E 8|
|00004a30| 0d 0a 0d 0a 0c 0d 0a 0d | 0a 0d 0a 0d 0a 1b 46 20 |........|......F |
|00004a40| 20 20 20 20 1b 45 43 48 | 41 50 54 45 52 20 31 1b | .ECH|APTER 1.|
|00004a50| 46 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |F | |
|00004a60| 20 20 1b 45 20 20 53 4f | 4d 45 20 42 41 53 49 43 | .E SO|ME BASIC|
|00004a70| 20 42 41 53 49 43 53 20 | 1b 46 20 20 20 20 20 20 | BASICS |.F |
|00004a80| 20 20 20 20 20 20 20 20 | 20 20 20 1b 45 43 48 41 | | .ECHA|
|00004a90| 50 54 45 52 20 31 0d 0a | 0d 0a 0d 0a 20 20 20 20 |PTER 1..|.... |
|00004aa0| 20 1b 46 59 6f 75 27 76 | 65 20 6c 65 61 72 6e 65 | .FYou'v|e learne|
|00004ab0| 64 20 65 6e 6f 75 67 68 | 20 74 6f 20 77 72 69 74 |d enough| to writ|
|00004ac0| 65 20 61 20 73 69 6d 70 | 6c 65 20 70 72 6f 67 72 |e a simp|le progr|
|00004ad0| 61 6d 20 73 6f 20 6c 65 | 74 27 73 20 64 6f 20 69 |am so le|t's do i|
|00004ae0| 74 2e 20 20 54 68 65 0d | 0a 20 20 20 20 20 66 6c |t. The.|. fl|
|00004af0| 6f 77 63 68 61 72 74 20 | 61 6e 64 20 70 72 6f 67 |owchart |and prog|
|00004b00| 72 61 6d 20 61 72 65 20 | 73 68 6f 77 6e 20 62 65 |ram are |shown be|
|00004b10| 6c 6f 77 3a 0d 0a 0d 0a | 0d 0a 0d 0a 0d 0a 0d 0a |low:....|........|
|00004b20| 0d 0a 0d 0a 0d 0a 0d 0a | 0d 0a 0d 0a 0d 0a 0d 0a |........|........|
|00004b30| 0d 0a 20 20 20 20 20 31 | 30 30 20 44 41 54 41 20 |.. 1|00 DATA |
|00004b40| 4a 4f 4e 45 53 2c 46 52 | 45 44 2c 32 30 0d 0a 20 |JONES,FR|ED,20.. |
|00004b50| 20 20 20 20 31 31 30 20 | 52 45 41 44 20 20 4c 41 | 110 |READ LA|
|00004b60| 53 54 2e 4e 41 4d 45 24 | 2c 20 46 49 52 53 54 2e |ST.NAME$|, FIRST.|
|00004b70| 4e 41 4d 45 24 2c 20 41 | 47 45 0d 0a 20 20 20 20 |NAME$, A|GE.. |
|00004b80| 20 31 32 30 20 50 52 49 | 4e 54 20 4c 41 53 54 2e | 120 PRI|NT LAST.|
|00004b90| 4e 41 4d 45 24 2c 20 46 | 49 52 53 54 2e 4e 41 4d |NAME$, F|IRST.NAM|
|00004ba0| 45 24 2c 20 41 47 45 0d | 0a 20 20 20 20 20 31 33 |E$, AGE.|. 13|
|00004bb0| 30 20 53 54 4f 50 0d 0a | 20 20 20 20 20 31 34 30 |0 STOP..| 140|
|00004bc0| 20 45 4e 44 0d 0a 0d 0a | 20 20 20 20 20 54 68 65 | END....| The|
|00004bd0| 20 31 33 30 20 53 54 4f | 50 20 73 74 61 74 65 6d | 130 STO|P statem|
|00004be0| 65 6e 74 20 74 65 6c 6c | 73 20 42 41 53 49 43 20 |ent tell|s BASIC |
|00004bf0| 74 6f 20 73 74 6f 70 20 | 65 78 65 63 75 74 69 6e |to stop |executin|
|00004c00| 67 20 79 6f 75 72 20 63 | 6f 64 65 3b 20 74 68 65 |g your c|ode; the|
|00004c10| 20 31 34 30 0d 0a 20 20 | 20 20 20 45 4e 44 20 69 | 140.. | END i|
|00004c20| 6e 64 69 63 61 74 65 73 | 20 74 68 65 20 65 6e 64 |ndicates| the end|
|00004c30| 20 6f 66 20 79 6f 75 72 | 20 63 6f 64 65 2e 20 20 | of your| code. |
|00004c40| 57 65 27 6c 6c 20 62 65 | 20 70 75 74 74 69 6e 67 |We'll be| putting|
|00004c50| 20 73 74 75 66 66 20 62 | 65 74 77 65 65 6e 0d 0a | stuff b|etween..|
|00004c60| 20 20 20 20 20 74 68 65 | 73 65 20 74 77 6f 20 73 | the|se two s|
|00004c70| 74 61 74 65 6d 65 6e 74 | 73 20 69 6e 20 6c 61 74 |tatement|s in lat|
|00004c80| 65 72 20 63 68 61 70 74 | 65 72 73 2e 0d 0a 0d 0a |er chapt|ers.....|
|00004c90| 20 20 20 20 20 4e 6f 74 | 65 20 74 68 61 74 20 74 | Not|e that t|
|00004ca0| 68 65 20 66 6c 6f 77 63 | 68 61 72 74 20 6c 6f 6f |he flowc|hart loo|
|00004cb0| 6b 73 20 74 72 69 76 69 | 61 6c 2e 20 20 49 74 20 |ks trivi|al. It |
|00004cc0| 69 73 2c 20 66 6f 72 20 | 6e 6f 77 2c 20 62 75 74 |is, for |now, but|
|00004cd0| 20 69 74 20 77 69 6c 6c | 0d 0a 20 20 20 20 20 72 | it will|.. r|
|00004ce0| 61 70 69 64 6c 79 20 67 | 65 74 20 6d 6f 72 65 20 |apidly g|et more |
|00004cf0| 63 6f 6d 70 6c 65 78 20 | 61 73 20 70 72 6f 67 72 |complex |as progr|
|00004d00| 61 6d 20 63 6f 6d 70 6c | 65 78 69 74 79 20 69 6e |am compl|exity in|
|00004d10| 63 72 65 61 73 65 73 2e | 20 20 49 74 20 77 69 6c |creases.| It wil|
|00004d20| 6c 20 61 6c 73 6f 0d 0a | 20 20 20 20 20 63 75 74 |l also..| cut|
|00004d30| 20 79 6f 75 72 20 63 6f | 64 69 6e 67 20 61 6e 64 | your co|ding and|
|00004d40| 20 64 65 62 75 67 67 69 | 6e 67 20 74 69 6d 65 2e | debuggi|ng time.|
|00004d50| 0d 0a 0d 0a 0d 0a 20 20 | 20 20 20 1b 45 43 4c 41 |...... | .ECLA|
|00004d60| 53 53 20 45 58 45 52 43 | 49 53 45 0d 0a 0d 0a 20 |SS EXERC|ISE.... |
|00004d70| 20 20 20 20 1b 46 54 69 | 6d 65 20 66 6f 72 20 61 | .FTi|me for a|
|00004d80| 20 62 72 65 61 6b 20 66 | 72 6f 6d 20 74 68 65 20 | break f|rom the |
|00004d90| 6d 61 6e 75 61 6c 20 73 | 6f 20 73 61 64 64 6c 65 |manual s|o saddle|
|00004da0| 20 75 70 20 79 6f 75 72 | 20 50 43 20 61 6e 64 20 | up your| PC and |
|00004db0| 65 6e 74 65 72 20 61 6e | 64 0d 0a 20 20 20 20 20 |enter an|d.. |
|00004dc0| 65 78 65 63 75 74 65 20 | 74 68 65 20 61 62 6f 76 |execute |the abov|
|00004dd0| 65 20 70 72 6f 67 72 61 | 6d 2e 20 20 49 6e 20 45 |e progra|m. In E|
|00004de0| 6e 67 6c 69 73 68 2c 20 | 74 68 69 73 20 6d 65 61 |nglish, |this mea|
|00004df0| 6e 73 20 74 79 70 65 20 | 69 74 20 69 6e 20 61 6e |ns type |it in an|
|00004e00| 64 20 74 65 6c 6c 0d 0a | 20 20 20 20 20 69 74 20 |d tell..| it |
|00004e10| 74 6f 20 52 55 4e 2e 20 | 20 4f 6e 63 65 20 79 6f |to RUN. | Once yo|
|00004e20| 75 27 72 65 20 66 69 6e | 69 73 68 65 64 2c 20 73 |u're fin|ished, s|
|00004e30| 61 76 65 20 69 74 20 61 | 6e 64 20 73 69 67 6e 20 |ave it a|nd sign |
|00004e40| 6f 66 66 2e 20 20 4e 6f | 77 20 73 69 67 6e 20 6f |off. No|w sign o|
|00004e50| 6e 0d 0a 20 20 20 20 20 | 61 67 61 69 6e 20 61 6e |n.. |again an|
|00004e60| 64 20 6c 6f 61 64 20 69 | 74 20 61 6e 64 20 72 75 |d load i|t and ru|
|00004e70| 6e 20 69 74 20 6f 6e 65 | 20 6d 6f 72 65 20 74 69 |n it one| more ti|
|00004e80| 6d 65 2e 20 20 53 65 65 | 2c 20 69 74 20 72 65 61 |me. See|, it rea|
|00004e90| 6c 6c 79 20 64 69 64 20 | 73 74 61 79 0d 0a 20 20 |lly did |stay.. |
|00004ea0| 20 20 20 74 68 65 72 65 | 2e 0d 0a 0d 0a 20 20 20 | there|..... |
|00004eb0| 20 20 4e 65 78 74 2c 20 | 63 68 61 6e 67 65 20 6c | Next, |change l|
|00004ec0| 69 6e 65 20 31 32 30 20 | 74 6f 3a 0d 0a 0d 0a 20 |ine 120 |to:.... |
|00004ed0| 20 20 20 20 31 32 30 20 | 50 52 49 4e 54 20 4c 41 | 120 |PRINT LA|
|00004ee0| 53 54 2e 4e 41 4d 45 24 | 3b 20 46 49 52 53 54 2e |ST.NAME$|; FIRST.|
|00004ef0| 4e 41 4d 45 24 3b 20 41 | 47 45 0d 0a 0d 0a 20 20 |NAME$; A|GE.... |
|00004f00| 20 20 20 61 6e 64 20 72 | 65 72 75 6e 20 79 6f 75 | and r|erun you|
|00004f10| 72 20 70 72 6f 67 72 61 | 6d 2e 0d 0a 0d 0a 20 20 |r progra|m..... |
|00004f20| 20 20 20 41 66 74 65 72 | 20 74 68 61 74 20 74 72 | After| that tr|
|00004f30| 79 3a 0d 0a 0d 0a 20 20 | 20 20 20 31 32 30 20 50 |y:.... | 120 P|
|00004f40| 52 49 4e 54 20 4c 41 53 | 54 2e 4e 41 4d 45 24 3b |RINT LAS|T.NAME$;|
|00004f50| 22 20 22 3b 46 49 52 53 | 54 2e 4e 41 4d 45 24 3b |" ";FIRS|T.NAME$;|
|00004f60| 22 20 22 3b 41 47 45 0d | 0a 0d 0a 20 20 20 20 20 |" ";AGE.|... |
|00004f70| 4e 6f 74 69 63 65 20 74 | 68 65 20 64 69 66 66 65 |Notice t|he diffe|
|00004f80| 72 65 6e 63 65 20 69 6e | 20 77 68 61 74 20 73 68 |rence in| what sh|
|00004f90| 6f 77 73 20 75 70 20 6f | 6e 20 74 68 65 20 73 63 |ows up o|n the sc|
|00004fa0| 72 65 65 6e 2e 0d 0a 0d | 0a 0d 0a 0d 0a 0d 0a 0d |reen....|........|
|00004fb0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00004fc0| 20 20 1b 45 20 20 20 20 | 20 20 20 20 20 20 20 20 | .E | |
|00004fd0| 20 20 20 20 1b 46 20 20 | 20 20 20 1b 45 20 20 20 | .F | .E |
|00004fe0| 39 0d 0a 0d 0a 0c 0d 0a | 0d 0a 0d 0a 0d 0a 1b 46 |9.......|.......F|
|00004ff0| 20 20 20 20 20 1b 45 43 | 48 41 50 54 45 52 20 31 | .EC|HAPTER 1|
|00005000| 1b 46 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.F | |
|00005010| 20 20 20 1b 45 20 20 53 | 4f 4d 45 20 42 41 53 49 | .E S|OME BASI|
|00005020| 43 20 42 41 53 49 43 53 | 20 1b 46 20 20 20 20 20 |C BASICS| .F |
|00005030| 20 20 20 20 20 20 20 20 | 20 20 20 20 1b 45 43 48 | | .ECH|
|00005040| 41 50 54 45 52 20 31 0d | 0a 0d 0a 0d 0a 20 20 20 |APTER 1.|..... |
|00005050| 20 20 4d 4f 52 45 20 4f | 4e 20 4f 55 54 50 55 54 | MORE O|N OUTPUT|
|00005060| 20 50 52 4f 47 52 41 4d | 4d 49 4e 47 0d 0a 0d 0a | PROGRAM|MING....|
|00005070| 20 20 20 20 20 1b 46 50 | 72 6f 67 72 61 6d 73 20 | .FP|rograms |
|00005080| 61 72 65 20 77 72 69 74 | 74 65 6e 20 74 6f 20 6d |are writ|ten to m|
|00005090| 61 6e 69 70 75 6c 61 74 | 65 20 69 6e 70 75 74 20 |anipulat|e input |
|000050a0| 64 61 74 61 20 61 6e 64 | 20 70 72 6f 64 75 63 65 |data and| produce|
|000050b0| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 2e 0d 0a 20 | informa|tion... |
|000050c0| 20 20 20 20 54 68 69 73 | 20 69 6e 66 6f 72 6d 61 | This| informa|
|000050d0| 74 69 6f 6e 20 69 73 20 | 79 6f 75 72 20 70 72 6f |tion is |your pro|
|000050e0| 67 72 61 6d 20 6f 75 74 | 70 75 74 2e 20 20 46 6f |gram out|put. Fo|
|000050f0| 72 20 61 20 6d 69 6e 69 | 6d 75 6d 2c 20 74 68 65 |r a mini|mum, the|
|00005100| 20 6f 75 74 70 75 74 0d | 0a 20 20 20 20 20 73 68 | output.|. sh|
|00005110| 6f 75 6c 64 20 62 65 20 | 72 65 61 64 61 62 6c 65 |ould be |readable|
|00005120| 2e 20 20 54 68 69 73 20 | 69 73 20 64 6f 6e 65 20 |. This |is done |
|00005130| 74 68 72 6f 75 67 68 20 | 74 68 65 20 50 52 49 4e |through |the PRIN|
|00005140| 54 20 73 74 61 74 65 6d | 65 6e 74 2c 20 74 68 65 |T statem|ent, the|
|00005150| 0d 0a 20 20 20 20 20 69 | 6e 73 74 72 75 63 74 69 |.. i|nstructi|
|00005160| 6f 6e 20 74 68 61 74 20 | 70 6c 61 63 65 73 20 79 |on that |places y|
|00005170| 6f 75 72 20 6f 75 74 70 | 75 74 20 6f 6e 20 74 68 |our outp|ut on th|
|00005180| 65 20 73 63 72 65 65 6e | 2e 20 20 48 65 72 65 27 |e screen|. Here'|
|00005190| 73 20 77 68 61 74 20 77 | 65 20 68 61 76 65 0d 0a |s what w|e have..|
|000051a0| 20 20 20 20 20 6c 65 61 | 72 6e 65 64 20 61 62 6f | lea|rned abo|
|000051b0| 75 74 20 50 52 49 4e 54 | 20 73 6f 20 66 61 72 3a |ut PRINT| so far:|
|000051c0| 0d 0a 0d 0a 20 20 20 20 | 20 2d 20 43 6f 6d 6d 61 |.... | - Comma|
|000051d0| 73 20 63 61 75 73 65 20 | 64 65 66 61 75 6c 74 20 |s cause |default |
|000051e0| 74 61 62 20 75 73 61 67 | 65 2e 0d 0a 0d 0a 20 20 |tab usag|e..... |
|000051f0| 20 20 20 2d 20 53 65 6d | 69 63 6f 6c 6f 6e 73 20 | - Sem|icolons |
|00005200| 6d 65 61 6e 20 27 6e 6f | 20 74 61 62 73 20 61 6e |mean 'no| tabs an|
|00005210| 64 20 6e 6f 20 63 61 72 | 72 69 61 67 65 20 72 65 |d no car|riage re|
|00005220| 74 75 72 6e 27 20 73 6f | 20 74 68 65 20 70 72 6f |turn' so| the pro|
|00005230| 67 72 61 6d 20 6f 75 74 | 70 75 74 0d 0a 20 20 20 |gram out|put.. |
|00005240| 20 20 20 20 72 75 6e 73 | 20 74 6f 67 65 74 68 65 | runs| togethe|
|00005250| 72 2e 0d 0a 0d 0a 20 20 | 20 20 20 2d 20 57 65 20 |r..... | - We |
|00005260| 63 61 6e 20 73 65 70 61 | 72 61 74 65 20 69 74 65 |can sepa|rate ite|
|00005270| 6d 73 20 62 79 20 70 72 | 69 6e 74 69 6e 67 20 6f |ms by pr|inting o|
|00005280| 75 74 20 73 70 61 63 65 | 73 20 65 6e 63 6c 6f 73 |ut space|s enclos|
|00005290| 65 64 20 69 6e 20 71 75 | 6f 74 65 73 2e 0d 0a 20 |ed in qu|otes... |
|000052a0| 20 20 20 20 20 20 49 6e | 20 66 61 63 74 2c 20 61 | In| fact, a|
|000052b0| 6e 79 74 68 69 6e 67 20 | 77 65 20 65 6e 63 6c 6f |nything |we enclo|
|000052c0| 73 65 20 69 6e 20 71 75 | 6f 74 65 73 20 67 65 74 |se in qu|otes get|
|000052d0| 73 20 72 65 70 72 6f 64 | 75 63 65 64 20 6f 6e 20 |s reprod|uced on |
|000052e0| 74 68 65 20 73 63 72 65 | 65 6e 0d 0a 20 20 20 20 |the scre|en.. |
|000052f0| 20 20 20 65 78 61 63 74 | 6c 79 20 61 73 20 69 74 | exact|ly as it|
|00005300| 20 69 73 20 69 6e 73 69 | 64 65 20 74 68 65 20 71 | is insi|de the q|
|00005310| 75 6f 74 65 73 2e 0d 0a | 0d 0a 20 20 20 20 20 43 |uotes...|.. C|
|00005320| 6f 6d 6d 61 73 2c 20 61 | 73 20 77 65 20 6d 65 6e |ommas, a|s we men|
|00005330| 74 69 6f 6e 65 64 20 61 | 62 6f 76 65 2c 20 72 65 |tioned a|bove, re|
|00005340| 73 75 6c 74 20 69 6e 20 | 74 68 65 20 75 73 65 20 |sult in |the use |
|00005350| 6f 66 20 27 64 65 66 61 | 75 6c 74 27 20 74 61 62 |of 'defa|ult' tab|
|00005360| 0d 0a 20 20 20 20 20 73 | 65 74 74 69 6e 67 73 2e |.. s|ettings.|
|00005370| 20 20 54 68 65 20 74 61 | 62 20 73 65 74 74 69 6e | The ta|b settin|
|00005380| 67 73 20 61 72 65 20 70 | 72 65 64 65 66 69 6e 65 |gs are p|redefine|
|00005390| 64 20 62 79 20 42 41 53 | 49 43 2e 20 20 49 74 27 |d by BAS|IC. It'|
|000053a0| 73 20 61 20 6e 69 63 65 | 0d 0a 20 20 20 20 20 66 |s a nice|.. f|
|000053b0| 65 61 74 75 72 65 20 62 | 75 74 20 69 74 20 63 61 |eature b|ut it ca|
|000053c0| 6e 20 61 6c 73 6f 20 62 | 65 20 61 20 70 61 69 6e |n also b|e a pain|
|000053d0| 2e 20 20 46 6f 72 20 69 | 6e 73 74 61 6e 63 65 2c |. For i|nstance,|
|000053e0| 20 69 66 20 79 6f 75 20 | 74 72 79 20 74 6f 20 70 | if you |try to p|
|000053f0| 72 69 6e 74 0d 0a 20 20 | 20 20 20 6d 6f 72 65 20 |rint.. | more |
|00005400| 74 68 61 6e 20 66 6f 75 | 72 20 69 74 65 6d 73 20 |than fou|r items |
|00005410| 70 65 72 20 6c 69 6e 65 | 20 75 73 69 6e 67 20 74 |per line| using t|
|00005420| 68 65 20 64 65 66 61 75 | 6c 74 20 74 61 62 73 2c |he defau|lt tabs,|
|00005430| 20 42 41 53 49 43 20 70 | 6c 61 63 65 73 20 74 68 | BASIC p|laces th|
|00005440| 65 0d 0a 20 20 20 20 20 | 66 69 66 74 68 20 69 74 |e.. |fifth it|
|00005450| 65 6d 20 6f 6e 20 74 68 | 65 20 6e 65 78 74 20 6c |em on th|e next l|
|00005460| 69 6e 65 2e 20 20 54 68 | 65 20 74 61 62 20 73 65 |ine. Th|e tab se|
|00005470| 74 74 69 6e 67 73 20 61 | 73 73 75 6d 65 20 6e 6f |ttings a|ssume no|
|00005480| 20 6d 6f 72 65 20 74 68 | 61 6e 20 66 6f 75 72 0d | more th|an four.|
|00005490| 0a 20 20 20 20 20 69 74 | 65 6d 73 20 70 65 72 20 |. it|ems per |
|000054a0| 6c 69 6e 65 2e 0d 0a 0d | 0a 20 20 20 20 20 4c 65 |line....|. Le|
|000054b0| 74 27 73 20 75 73 65 20 | 77 68 61 74 20 77 65 20 |t's use |what we |
|000054c0| 68 61 76 65 20 6c 65 61 | 72 6e 65 64 20 74 6f 20 |have lea|rned to |
|000054d0| 65 6e 68 61 6e 63 65 20 | 6f 75 72 20 70 72 65 76 |enhance |our prev|
|000054e0| 69 6f 75 73 20 70 72 6f | 67 72 61 6d 2e 20 20 53 |ious pro|gram. S|
|000054f0| 69 67 6e 20 6f 6e 0d 0a | 20 20 20 20 20 74 6f 20 |ign on..| to |
|00005500| 79 6f 75 72 20 50 43 20 | 61 6e 64 20 6d 61 6b 65 |your PC |and make|
|00005510| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 63 | the fol|lowing c|
|00005520| 68 61 6e 67 65 73 3a 0d | 0a 0d 0a 20 20 20 20 20 |hanges:.|... |
|00005530| 31 32 30 20 50 52 49 4e | 54 20 22 4c 41 53 54 20 |120 PRIN|T "LAST |
|00005540| 4e 41 4d 45 3a 20 20 20 | 20 22 3b 4c 41 53 54 2e |NAME: | ";LAST.|
|00005550| 4e 41 4d 45 24 0d 0a 20 | 20 20 20 20 31 32 32 20 |NAME$.. | 122 |
|00005560| 50 52 49 4e 54 20 22 46 | 49 52 53 54 20 4e 41 4d |PRINT "F|IRST NAM|
|00005570| 45 3a 20 20 20 22 3b 46 | 49 52 53 54 2e 4e 41 4d |E: ";F|IRST.NAM|
|00005580| 45 24 0d 0a 20 20 20 20 | 20 31 32 34 20 50 52 49 |E$.. | 124 PRI|
|00005590| 4e 54 20 22 43 55 52 52 | 45 4e 54 20 41 47 45 3a |NT "CURR|ENT AGE:|
|000055a0| 20 20 22 3b 41 47 45 0d | 0a 0d 0a 20 20 20 20 20 | ";AGE.|... |
|000055b0| 4e 6f 77 20 74 65 6c 6c | 20 69 74 20 74 6f 20 72 |Now tell| it to r|
|000055c0| 75 6e 2e 20 20 4e 6f 74 | 69 63 65 20 68 6f 77 20 |un. Not|ice how |
|000055d0| 74 68 65 20 73 74 75 66 | 66 20 69 6e 73 69 64 65 |the stuf|f inside|
|000055e0| 20 74 68 65 20 71 75 6f | 74 65 73 20 77 61 73 0d | the quo|tes was.|
|000055f0| 0a 20 20 20 20 20 72 65 | 70 72 6f 64 75 63 65 64 |. re|produced|
|00005600| 2c 20 61 6e 6f 74 68 65 | 72 20 68 61 6e 64 79 20 |, anothe|r handy |
|00005610| 74 65 63 68 6e 69 71 75 | 65 2e 0d 0a 0d 0a 20 20 |techniqu|e..... |
|00005620| 20 20 20 49 66 20 74 68 | 65 20 72 65 73 75 6c 74 | If th|e result|
|00005630| 20 6f 66 20 79 6f 75 72 | 20 6f 75 74 70 75 74 20 | of your| output |
|00005640| 63 6f 6e 73 69 73 74 73 | 20 6f 66 20 6c 69 73 74 |consists| of list|
|00005650| 73 2c 20 79 6f 75 20 63 | 61 6e 20 75 73 65 20 74 |s, you c|an use t|
|00005660| 68 65 20 50 52 49 4e 54 | 0d 0a 20 20 20 20 20 73 |he PRINT|.. s|
|00005670| 74 61 74 65 6d 65 6e 74 | 20 74 6f 20 63 72 65 61 |tatement| to crea|
|00005680| 74 65 20 68 65 61 64 69 | 6e 67 73 2c 20 75 6e 64 |te headi|ngs, und|
|00005690| 65 72 6c 69 6e 65 73 2c | 20 62 6c 61 6e 6b 20 6c |erlines,| blank l|
|000056a0| 69 6e 65 73 2c 20 65 74 | 63 2e 20 69 6e 20 74 68 |ines, et|c. in th|
|000056b0| 65 0d 0a 20 20 20 20 20 | 66 6f 6c 6c 6f 77 69 6e |e.. |followin|
|000056c0| 67 20 6d 61 6e 6e 65 72 | 3a 0d 0a 0d 0a 20 20 20 |g manner|:.... |
|000056d0| 20 20 31 32 30 20 50 52 | 49 4e 54 20 22 4c 41 53 | 120 PR|INT "LAS|
|000056e0| 54 20 4e 41 4d 45 20 20 | 20 20 20 20 20 20 20 46 |T NAME | F|
|000056f0| 49 52 53 54 20 4e 41 4d | 45 20 20 20 20 20 20 20 |IRST NAM|E |
|00005700| 20 41 47 45 22 0d 0a 20 | 20 20 20 20 31 32 32 20 | AGE".. | 122 |
|00005710| 50 52 49 4e 54 20 22 2d | 2d 2d 2d 2d 2d 2d 2d 2d |PRINT "-|--------|
|00005720| 20 20 20 20 20 20 20 20 | 20 2d 2d 2d 2d 2d 2d 2d | | -------|
|00005730| 2d 2d 2d 20 20 20 20 20 | 20 20 20 2d 2d 2d 22 0d |--- | ---".|
|00005740| 0a 20 20 20 20 20 31 32 | 34 20 50 52 49 4e 54 0d |. 12|4 PRINT.|
|00005750| 0a 20 20 20 20 20 31 32 | 36 20 50 52 49 4e 54 20 |. 12|6 PRINT |
|00005760| 4c 41 53 54 2e 4e 41 4d | 45 24 3b 22 20 20 20 20 |LAST.NAM|E$;" |
|00005770| 20 20 20 20 20 20 22 3b | 46 49 52 53 54 2e 4e 41 | ";|FIRST.NA|
|00005780| 4d 45 24 3b 22 20 20 20 | 20 20 20 20 20 20 22 3b |ME$;" | ";|
|00005790| 41 47 45 0d 0a 0d 0a 20 | 20 20 20 20 4c 69 6e 65 |AGE.... | Line|
|000057a0| 20 31 32 34 20 77 69 6c | 6c 20 63 61 75 73 65 20 | 124 wil|l cause |
|000057b0| 61 20 62 6c 61 6e 6b 20 | 6c 69 6e 65 20 74 6f 20 |a blank |line to |
|000057c0| 62 65 20 70 72 69 6e 74 | 65 64 2e 0d 0a 0d 0a 20 |be print|ed..... |
|000057d0| 20 20 20 20 43 75 73 74 | 6f 6d 69 7a 65 20 74 68 | Cust|omize th|
|000057e0| 65 20 70 72 6f 67 72 61 | 6d 20 77 65 27 76 65 20 |e progra|m we've |
|000057f0| 62 65 65 6e 20 77 6f 72 | 6b 69 6e 67 20 6f 6e 20 |been wor|king on |
|00005800| 62 79 20 61 64 64 69 6e | 67 20 73 6f 6d 65 20 6f |by addin|g some o|
|00005810| 66 20 74 68 65 20 61 62 | 6f 76 65 0d 0a 20 20 20 |f the ab|ove.. |
|00005820| 20 20 66 65 61 74 75 72 | 65 73 2e 20 20 55 73 65 | featur|es. Use|
|00005830| 20 79 6f 75 72 20 69 6d | 61 67 69 6e 61 74 69 6f | your im|aginatio|
|00005840| 6e 2c 20 74 68 61 74 27 | 73 20 74 68 65 20 6e 61 |n, that'|s the na|
|00005850| 6d 65 20 6f 66 20 74 68 | 65 20 67 61 6d 65 2e 20 |me of th|e game. |
|00005860| 20 42 79 20 74 68 65 0d | 0a 20 20 20 20 20 77 61 | By the.|. wa|
|00005870| 79 2c 20 74 68 69 73 20 | 69 73 20 6e 6f 74 20 74 |y, this |is not t|
|00005880| 68 65 20 62 65 73 74 20 | 77 61 79 73 20 74 6f 20 |he best |ways to |
|00005890| 66 6f 72 6d 61 74 20 6f | 75 74 70 75 74 20 68 6f |format o|utput ho|
|000058a0| 77 65 76 65 72 20 61 74 | 20 74 68 69 73 20 73 74 |wever at| this st|
|000058b0| 61 67 65 0d 0a 20 20 20 | 20 20 69 74 27 73 20 74 |age.. | it's t|
|000058c0| 68 65 20 65 61 73 69 65 | 73 74 2e 20 20 57 65 27 |he easie|st. We'|
|000058d0| 6c 6c 20 67 65 74 20 6d | 6f 72 65 20 70 72 6f 66 |ll get m|ore prof|
|000058e0| 65 73 73 69 6f 6e 61 6c | 20 69 6e 20 63 68 61 70 |essional| in chap|
|000058f0| 74 65 72 20 33 2e 0d 0a | 0d 0a 0d 0a 0d 0a 0d 0a |ter 3...|........|
|00005900| 0d 0a 0d 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |.... | |
|00005910| 20 20 20 20 20 1b 45 20 | 20 20 20 20 20 20 20 20 | .E | |
|00005920| 20 20 20 20 20 20 20 1b | 46 20 20 20 20 20 1b 45 | .|F .E|
|00005930| 20 20 31 30 0d 0a 0d 0a | 0c 0d 0a 0d 0a 0d 0a 0d | 10....|........|
|00005940| 0a 1b 46 20 20 20 20 20 | 1b 45 43 48 41 50 54 45 |..F |.ECHAPTE|
|00005950| 52 20 31 1b 46 20 20 20 | 20 20 20 20 20 20 20 20 |R 1.F | |
|00005960| 20 20 20 20 20 20 1b 45 | 20 20 53 4f 4d 45 20 42 | .E| SOME B|
|00005970| 41 53 49 43 20 42 41 53 | 49 43 53 20 1b 46 20 20 |ASIC BAS|ICS .F |
|00005980| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 1b | | .|
|00005990| 45 43 48 41 50 54 45 52 | 20 31 0d 0a 0d 0a 0d 0a |ECHAPTER| 1......|
|000059a0| 20 20 20 20 20 57 48 41 | 54 27 53 20 4d 59 20 4c | WHA|T'S MY L|
|000059b0| 49 4e 45 0d 0a 0d 0a 20 | 20 20 20 20 1b 46 4c 65 |INE.... | .FLe|
|000059c0| 74 27 73 20 66 69 6e 69 | 73 68 20 6f 66 66 20 74 |t's fini|sh off t|
|000059d0| 68 65 20 63 68 61 70 74 | 65 72 20 77 69 74 68 20 |he chapt|er with |
|000059e0| 61 20 64 69 73 63 75 73 | 73 69 6f 6e 20 6f 66 20 |a discus|sion of |
|000059f0| 74 68 6f 73 65 20 6d 79 | 73 74 65 72 69 6f 75 73 |those my|sterious|
|00005a00| 20 6c 69 6e 65 0d 0a 20 | 20 20 20 20 6e 75 6d 62 | line.. | numb|
|00005a10| 65 72 73 2e 20 20 41 73 | 20 79 6f 75 20 6d 61 79 |ers. As| you may|
|00005a20| 20 68 61 76 65 20 6e 6f | 74 69 63 65 64 2c 20 74 | have no|ticed, t|
|00005a30| 68 65 79 20 61 72 65 20 | 75 73 65 64 20 74 6f 20 |hey are |used to |
|00005a40| 73 65 71 75 65 6e 63 65 | 20 61 20 70 72 6f 67 72 |sequence| a progr|
|00005a50| 61 6d 2e 0d 0a 20 20 20 | 20 20 54 68 65 20 69 6e |am... | The in|
|00005a60| 73 74 72 75 63 74 69 6f | 6e 73 20 61 72 65 20 65 |structio|ns are e|
|00005a70| 78 65 63 75 74 65 64 20 | 28 77 69 74 68 20 61 20 |xecuted |(with a |
|00005a80| 62 6c 69 6e 64 66 6f 6c | 64 29 20 69 6e 20 74 68 |blindfol|d) in th|
|00005a90| 65 20 73 61 6d 65 20 6f | 72 64 65 72 20 61 73 0d |e same o|rder as.|
|00005aa0| 0a 20 20 20 20 20 74 68 | 65 20 6c 69 6e 65 20 6e |. th|e line n|
|00005ab0| 75 6d 62 65 72 73 2e 20 | 20 54 68 65 20 6f 72 64 |umbers. | The ord|
|00005ac0| 65 72 20 69 73 20 69 6d | 70 6f 72 74 61 6e 74 2e |er is im|portant.|
|00005ad0| 20 20 49 74 27 73 20 6c | 69 6b 65 20 67 65 74 74 | It's l|ike gett|
|00005ae0| 69 6e 67 20 64 72 65 73 | 73 65 64 2e 0d 0a 20 20 |ing dres|sed... |
|00005af0| 20 20 20 54 68 65 72 65 | 27 73 20 6e 6f 74 20 6d | There|'s not m|
|00005b00| 75 63 68 20 73 65 6e 73 | 65 20 69 6e 20 70 75 74 |uch sens|e in put|
|00005b10| 74 69 6e 67 20 79 6f 75 | 72 20 73 6f 63 6b 73 20 |ting you|r socks |
|00005b20| 6f 6e 20 62 65 66 6f 72 | 65 20 79 6f 75 72 20 73 |on befor|e your s|
|00005b30| 68 6f 65 73 2e 20 20 4c | 69 6e 65 0d 0a 20 20 20 |hoes. L|ine.. |
|00005b40| 20 20 6e 75 6d 62 65 72 | 73 20 61 6c 73 6f 20 68 | number|s also h|
|00005b50| 65 6c 70 20 69 6e 20 6f | 74 68 65 72 20 77 61 79 |elp in o|ther way|
|00005b60| 73 2e 20 20 46 6f 72 20 | 69 6e 73 74 61 6e 63 65 |s. For |instance|
|00005b70| 2c 20 69 66 20 79 6f 75 | 20 66 6f 72 67 6f 74 20 |, if you| forgot |
|00005b80| 61 6e 0d 0a 20 20 20 20 | 20 69 6e 73 74 72 75 63 |an.. | instruc|
|00005b90| 74 69 6f 6e 20 79 6f 75 | 20 63 61 6e 20 61 73 73 |tion you| can ass|
|00005ba0| 69 67 6e 20 69 74 20 61 | 20 6c 69 6e 65 20 6e 75 |ign it a| line nu|
|00005bb0| 6d 62 65 72 20 74 68 61 | 74 20 70 75 74 73 20 69 |mber tha|t puts i|
|00005bc0| 74 20 77 68 65 72 65 20 | 79 6f 75 20 77 61 6e 74 |t where |you want|
|00005bd0| 0d 0a 20 20 20 20 20 69 | 74 2e 0d 0a 0d 0a 20 20 |.. i|t..... |
|00005be0| 20 20 20 39 30 20 54 49 | 54 4c 45 24 20 3d 20 22 | 90 TI|TLE$ = "|
|00005bf0| 20 20 20 20 20 20 20 20 | 54 48 49 53 20 49 53 20 | |THIS IS |
|00005c00| 41 20 54 49 54 4c 45 22 | 0d 0a 20 20 20 20 20 39 |A TITLE"|.. 9|
|00005c10| 35 20 50 52 49 4e 54 20 | 54 49 54 4c 45 24 0d 0a |5 PRINT |TITLE$..|
|00005c20| 0d 0a 20 20 20 20 20 41 | 73 73 75 6d 65 20 74 68 |.. A|ssume th|
|00005c30| 61 74 20 74 68 65 20 61 | 62 6f 76 65 20 77 61 73 |at the a|bove was|
|00005c40| 20 70 61 72 74 20 6f 66 | 20 61 20 70 72 6f 67 72 | part of| a progr|
|00005c50| 61 6d 20 61 6e 64 20 74 | 68 61 74 20 79 6f 75 20 |am and t|hat you |
|00005c60| 66 6f 72 67 6f 74 20 74 | 6f 0d 0a 20 20 20 20 20 |forgot t|o.. |
|00005c70| 75 6e 64 65 72 6c 69 6e | 65 20 74 68 65 20 68 65 |underlin|e the he|
|00005c80| 61 64 69 6e 67 20 61 6e | 64 20 70 75 74 20 61 20 |ading an|d put a |
|00005c90| 62 6c 61 6e 6b 20 6c 69 | 6e 65 20 62 65 6c 6f 77 |blank li|ne below|
|00005ca0| 20 74 68 65 20 75 6e 64 | 65 72 6c 69 6e 65 2e 20 | the und|erline. |
|00005cb0| 20 41 6c 6c 20 79 6f 75 | 0d 0a 20 20 20 20 20 68 | All you|.. h|
|00005cc0| 61 76 65 20 74 6f 20 64 | 6f 20 74 6f 20 66 69 78 |ave to d|o to fix|
|00005cd0| 20 69 74 20 69 73 3a 0d | 0a 0d 0a 20 20 20 20 20 | it is:.|... |
|00005ce0| 39 36 20 50 52 49 4e 54 | 20 22 20 20 20 20 20 20 |96 PRINT| " |
|00005cf0| 20 20 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d | ------|--------|
|00005d00| 2d 22 0d 0a 20 20 20 20 | 20 39 37 20 50 52 49 4e |-".. | 97 PRIN|
|00005d10| 54 0d 0a 0d 0a 20 20 20 | 20 20 59 6f 75 20 63 61 |T.... | You ca|
|00005d20| 6e 20 61 6c 73 6f 20 72 | 75 6e 20 6f 75 74 20 6f |n also r|un out o|
|00005d30| 66 20 73 70 61 63 65 20 | 62 65 74 77 65 65 6e 20 |f space |between |
|00005d40| 6c 69 6e 65 20 6e 75 6d | 62 65 72 73 2e 20 20 42 |line num|bers. B|
|00005d50| 41 53 49 43 20 61 6c 6c | 6f 77 73 20 79 6f 75 20 |ASIC all|ows you |
|00005d60| 74 6f 0d 0a 20 20 20 20 | 20 72 65 73 65 71 75 65 |to.. | reseque|
|00005d70| 6e 63 65 2c 20 6f 72 20 | 72 65 6e 75 6d 62 65 72 |nce, or |renumber|
|00005d80| 2c 20 61 20 70 72 6f 67 | 72 61 6d 20 77 68 65 6e |, a prog|ram when|
|00005d90| 20 74 68 69 73 20 68 61 | 70 70 65 6e 73 2e 20 20 | this ha|ppens. |
|00005da0| 49 66 2c 20 66 6f 72 20 | 65 78 61 6d 70 6c 65 2c |If, for |example,|
|00005db0| 0d 0a 20 20 20 20 20 79 | 6f 75 20 68 61 76 65 20 |.. y|ou have |
|00005dc0| 61 6c 72 65 61 64 79 20 | 75 73 65 64 20 6c 69 6e |already |used lin|
|00005dd0| 65 20 6e 75 6d 62 65 72 | 73 20 31 31 30 20 74 68 |e number|s 110 th|
|00005de0| 72 6f 75 67 68 20 31 31 | 36 2c 20 79 6f 75 20 63 |rough 11|6, you c|
|00005df0| 61 6e 27 74 20 61 64 64 | 0d 0a 20 20 20 20 20 61 |an't add|.. a|
|00005e00| 6e 79 74 68 69 6e 67 20 | 62 65 74 77 65 65 6e 20 |nything |between |
|00005e10| 74 68 65 6d 2e 20 20 54 | 68 65 20 63 6f 6d 6d 61 |them. T|he comma|
|00005e20| 6e 64 20 74 68 61 74 20 | 63 68 61 6e 67 65 73 20 |nd that |changes |
|00005e30| 6c 69 6e 65 20 6e 75 6d | 62 65 72 73 20 28 61 6e |line num|bers (an|
|00005e40| 64 20 61 20 6c 6f 74 0d | 0a 20 20 20 20 20 6f 66 |d a lot.|. of|
|00005e50| 20 6f 74 68 65 72 20 67 | 6f 6f 64 20 73 74 75 66 | other g|ood stuf|
|00005e60| 66 29 20 63 61 6e 20 62 | 65 20 66 6f 75 6e 64 20 |f) can b|e found |
|00005e70| 65 69 74 68 65 72 20 69 | 6e 20 79 6f 75 72 20 42 |either i|n your B|
|00005e80| 41 53 49 43 20 6d 61 6e | 75 61 6c 20 6f 72 20 69 |ASIC man|ual or i|
|00005e90| 6e 20 74 68 65 0d 0a 20 | 20 20 20 20 61 70 70 65 |n the.. | appe|
|00005ea0| 6e 64 69 63 65 73 20 6f | 66 20 74 68 69 73 20 62 |ndices o|f this b|
|00005eb0| 6f 6f 6b 2e 20 20 20 57 | 68 79 20 64 6f 6e 27 74 |ook. W|hy don't|
|00005ec0| 20 79 6f 75 20 73 69 67 | 6e 20 62 61 63 6b 20 6f | you sig|n back o|
|00005ed0| 6e 2c 20 6c 6f 6f 6b 20 | 69 74 20 75 70 2c 20 61 |n, look |it up, a|
|00005ee0| 6e 64 0d 0a 20 20 20 20 | 20 70 72 61 63 74 69 63 |nd.. | practic|
|00005ef0| 65 20 61 20 6c 69 74 74 | 6c 65 20 62 69 74 2e 0d |e a litt|le bit..|
|00005f00| 0a 0d 0a 0d 0a 20 20 20 | 20 20 1b 45 53 50 45 43 |..... | .ESPEC|
|00005f10| 49 46 49 43 41 54 49 4f | 4e 0d 0a 0d 0a 20 20 20 |IFICATIO|N.... |
|00005f20| 20 20 1b 46 53 69 67 6e | 20 6f 6e 20 79 6f 75 72 | .FSign| on your|
|00005f30| 20 50 43 20 61 6e 64 20 | 65 6e 74 65 72 20 61 6e | PC and |enter an|
|00005f40| 64 20 72 75 6e 20 74 68 | 65 20 66 6f 6c 6c 6f 77 |d run th|e follow|
|00005f50| 69 6e 67 20 70 72 6f 67 | 72 61 6d 3a 0d 0a 0d 0a |ing prog|ram:....|
|00005f60| 20 20 20 20 20 31 30 30 | 20 44 41 54 41 20 46 52 | 100| DATA FR|
|00005f70| 45 44 2c 20 53 4d 49 54 | 48 2c 20 35 0d 0a 20 20 |ED, SMIT|H, 5.. |
|00005f80| 20 20 20 31 31 30 20 44 | 41 54 41 20 54 4f 4d 2c | 110 D|ATA TOM,|
|00005f90| 20 4a 4f 4e 45 53 2c 20 | 32 34 0d 0a 20 20 20 20 | JONES, |24.. |
|00005fa0| 20 31 32 30 20 44 41 54 | 41 20 41 4e 4e 2c 20 44 | 120 DAT|A ANN, D|
|00005fb0| 4f 45 2c 20 31 38 0d 0a | 20 20 20 20 20 31 33 30 |OE, 18..| 130|
|00005fc0| 20 44 41 54 41 20 45 4f | 46 2c 20 58 2c 20 30 0d | DATA EO|F, X, 0.|
|00005fd0| 0a 20 20 20 20 20 31 34 | 30 20 27 0d 0a 20 20 20 |. 14|0 '.. |
|00005fe0| 20 20 31 35 30 20 52 45 | 41 44 20 46 49 52 53 54 | 150 RE|AD FIRST|
|00005ff0| 2e 4e 41 4d 45 24 2c 20 | 4c 41 53 54 2e 4e 41 4d |.NAME$, |LAST.NAM|
|00006000| 45 24 2c 20 41 47 45 0d | 0a 20 20 20 20 20 31 36 |E$, AGE.|. 16|
|00006010| 30 20 27 0d 0a 20 20 20 | 20 20 31 37 30 20 57 48 |0 '.. | 170 WH|
|00006020| 49 4c 45 20 46 49 52 53 | 54 2e 4e 41 4d 45 24 20 |ILE FIRS|T.NAME$ |
|00006030| 3c 3e 20 22 45 4f 46 22 | 0d 0a 20 20 20 20 20 31 |<> "EOF"|.. 1|
|00006040| 38 30 20 20 20 20 50 52 | 49 4e 54 20 46 49 52 53 |80 PR|INT FIRS|
|00006050| 54 2e 4e 41 4d 45 24 2c | 20 4c 41 53 54 2e 4e 41 |T.NAME$,| LAST.NA|
|00006060| 4d 45 24 2c 20 41 47 45 | 0d 0a 20 20 20 20 20 31 |ME$, AGE|.. 1|
|00006070| 39 30 20 20 20 20 52 45 | 41 44 20 20 46 49 52 53 |90 RE|AD FIRS|
|00006080| 54 2e 4e 41 4d 45 24 2c | 20 4c 41 53 54 2e 4e 41 |T.NAME$,| LAST.NA|
|00006090| 4d 45 24 2c 20 41 47 45 | 0d 0a 20 20 20 20 20 32 |ME$, AGE|.. 2|
|000060a0| 30 30 20 57 45 4e 44 0d | 0a 20 20 20 20 20 32 31 |00 WEND.|. 21|
|000060b0| 30 20 27 0d 0a 20 20 20 | 20 20 32 32 30 20 50 52 |0 '.. | 220 PR|
|000060c0| 49 4e 54 0d 0a 20 20 20 | 20 20 32 33 30 20 50 52 |INT.. | 230 PR|
|000060d0| 49 4e 54 20 22 54 48 41 | 54 27 53 20 41 4c 4c 20 |INT "THA|T'S ALL |
|000060e0| 46 4f 4c 4b 53 22 0d 0a | 20 20 20 20 20 32 34 30 |FOLKS"..| 240|
|000060f0| 20 53 54 4f 50 0d 0a 20 | 20 20 20 20 32 35 30 20 | STOP.. | 250 |
|00006100| 45 4e 44 0d 0a 0d 0a 0d | 0a 0d 0a 0d 0a 20 20 20 |END.....|..... |
|00006110| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 1b 45 | | .E|
|00006120| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00006130| 1b 46 20 20 20 20 20 1b | 45 20 20 31 31 0d 0a 0d |.F .|E 11...|
|00006140| 0a 0c 0d 0a 0d 0a 0d 0a | 0d 0a 1b 46 20 20 20 20 |........|...F |
|00006150| 20 1b 45 43 48 41 50 54 | 45 52 20 31 1b 46 20 20 | .ECHAPT|ER 1.F |
|00006160| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 1b | | .|
|00006170| 45 20 20 53 4f 4d 45 20 | 42 41 53 49 43 20 42 41 |E SOME |BASIC BA|
|00006180| 53 49 43 53 20 1b 46 20 | 20 20 20 20 20 20 20 20 |SICS .F | |
|00006190| 20 20 20 20 20 20 20 20 | 1b 45 43 48 41 50 54 45 | |.ECHAPTE|
|000061a0| 52 20 31 0d 0a 0d 0a 0d | 0a 20 20 20 20 20 1b 46 |R 1.....|. .F|
|000061b0| 4f 6e 63 65 20 79 6f 75 | 27 76 65 20 66 69 6e 69 |Once you|'ve fini|
|000061c0| 73 68 65 64 20 74 68 65 | 20 70 72 65 76 69 6f 75 |shed the| previou|
|000061d0| 73 20 70 72 6f 67 72 61 | 6d 2c 20 77 72 69 74 65 |s progra|m, write|
|000061e0| 20 64 6f 77 6e 20 77 68 | 61 74 20 66 65 61 74 75 | down wh|at featu|
|000061f0| 72 65 73 20 6d 61 6b 65 | 0d 0a 20 20 20 20 20 69 |res make|.. i|
|00006200| 74 20 61 20 73 74 72 75 | 63 74 75 72 65 64 20 70 |t a stru|ctured p|
|00006210| 72 6f 67 72 61 6d 2e 20 | 20 54 72 79 20 74 6f 20 |rogram. | Try to |
|00006220| 66 69 67 75 72 65 20 6f | 75 74 20 77 68 61 74 20 |figure o|ut what |
|00006230| 74 68 65 20 63 6f 64 65 | 20 64 6f 65 73 20 62 75 |the code| does bu|
|00006240| 74 20 64 6f 6e 27 74 0d | 0a 20 20 20 20 20 77 6f |t don't.|. wo|
|00006250| 72 72 79 20 61 62 6f 75 | 74 20 69 74 20 69 66 20 |rry abou|t it if |
|00006260| 79 6f 75 20 63 61 6e 27 | 74 2c 20 77 65 27 6c 6c |you can'|t, we'll|
|00006270| 20 63 6f 76 65 72 20 74 | 68 61 74 20 69 6e 20 74 | cover t|hat in t|
|00006280| 68 65 20 6e 65 78 74 20 | 63 68 61 70 74 65 72 2e |he next |chapter.|
|00006290| 0d 0a 0d 0a 0d 0a 0d 0a | 0d 0a 0d 0a 0d 0a 0d 0a |........|........|
|000062a0| 0d 0a 0d 0a 0d 0a 0d 0a | 0d 0a 0d 0a 0d 0a 0d 0a |........|........|
|000062b0| 0d 0a 0d 0a 0d 0a 0d 0a | 0d 0a 0d 0a 0d 0a 0d 0a |........|........|
|000062c0| 0d 0a 0d 0a 0d 0a 0d 0a | 0d 0a 0d 0a 0d 0a 0d 0a |........|........|
|000062d0| 0d 0a 0d 0a 0d 0a 0d 0a | 0d 0a 0d 0a 0d 0a 0d 0a |........|........|
|000062e0| 0d 0a 0d 0a 0d 0a 0d 0a | 0d 0a 0d 0a 0d 0a 0d 0a |........|........|
|000062f0| 0d 0a 0d 0a 0d 0a 0d 0a | 0d 0a 20 20 20 20 20 20 |........|.. |
|00006300| 20 20 20 20 20 20 20 20 | 20 20 20 1b 45 20 20 20 | | .E |
|00006310| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 1b 46 20 | | .F |
|00006320| 20 20 20 20 1b 45 20 20 | 31 32 0d 0a 0d 0a 1b 46 | .E |12.....F|
|00006330| 20 0d 0a 1b 32 1b 55 00 | 1b 39 0c 1b 48 1a 0a 0d | ...2.U.|.9..H...|
|00006340| 0a 0c 0d 0a 0d 0a 0d 0a | 0d 0a 1b 46 20 20 20 20 |........|...F |
|00006350| 20 1b 45 43 48 41 50 54 | 45 52 20 31 1b 46 20 20 | .ECHAPT|ER 1.F |
|00006360| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 1b | | .|
|00006370| 45 20 20 53 4f 4d 45 20 | 42 41 53 49 43 20 42 41 |E SOME |BASIC BA|
|00006380| 53 49 43 53 20 1b 46 20 | 20 20 20 20 20 20 20 20 |SICS .F | |
|00006390| 20 20 20 20 20 20 20 20 | 1b 45 43 48 41 50 54 45 | |.ECHAPTE|
|000063a0| 52 20 31 0d 0a 0d 0a 0d | 0a 20 20 20 20 20 1b 46 |R 1.....|. .F|
|000063b0| 4f 6e 63 65 20 79 6f 75 | 27 76 65 20 66 69 6e 69 |Once you|'ve fini|
|000063c0| 73 68 65 64 20 74 68 65 | 20 70 72 65 76 69 6f 75 |shed the| previou|
|000063d0| 73 20 70 72 6f 67 72 61 | 6d 2c 20 77 72 69 74 65 |s progra|m, write|
|000063e0| 20 64 6f 77 6e 20 77 68 | 61 74 20 66 65 61 74 75 | down wh|at featu|
|000063f0| 72 65 73 20 6d 61 6b 65 | 0d 0a 20 20 20 20 20 69 |res make|.. i|
+--------+-------------------------+-------------------------+--------+--------+