home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / basic / compiler / apbasic / apb.hlp < prev    next >
Unknown  |  1991-01-18  |  103.8 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.

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Windows Help File (document/hlp) ext Supported
66% dexvert Multimedia Viewer Book (document/multimediaViewerBook) ext Supported
1% dexvert BDC HelpSystem (document/bdcHelpSystem) ext Unsupported
1% dexvert Eureka/Mercury Help (document/eurekaMercuryHelp) ext Unsupported
1% dexvert 4DOS Help (document/fourDOSHelp) ext Unsupported
1% dexvert OPHelp (document/opHelp) ext Unsupported
1% dexvert POP-UP DOS Help (document/popupDOSHelp) ext Unsupported
1% dexvert Quick Help (document/quickHelp) ext Unsupported
1% dexvert RMP Help (document/rmpHelp) ext Unsupported
1% dexvert Symantec DOS software help (document/symantecDOSSoftwareHelp) ext Unsupported
1% dexvert xText compiled Hypertext/Help (document/xTextCompiledHypertext) ext Unsupported
1% dexvert gfxboot compiled HTML Help (document/gfxbootCompiledHTMLHelp) ext Unsupported
1% dexvert Pure Pascal Help (document/purePascalHelp) ext Unsupported
1% dexvert WordPerfect help (document/wordPerfectHelp) ext Unsupported
1% dexvert Ashton-Tate Help data (other/ashtonTateHelpData) ext Unsupported
1% dexvert Borland Help System (other/borlandHelpSystem) ext Unsupported
1% dexvert DeskMate Filer database (other/deskMateFilerDatabase) ext Unsupported
1% dexvert Eclipse Help (other/eclipseHelp) ext Unsupported
1% dexvert Necromancer's Dos Navigator Help (other/necromancersDosNavigatorHelp) ext Unsupported
1% dexvert 1dir+ Help (other/oneDirPlusHelp) ext Unsupported
1% dexvert Qualitas Help (other/qualitasHelp) ext Unsupported
1% dexvert Turbo Pascal Help (other/turboPascalHelp) ext Unsupported
1% dexvert Vocal-Eyes Help (other/vocalEyesHelp) ext Unsupported
1% dexvert Windows Help index (other/windowsHelpIndex) ext Unsupported
1% dexvert Alpha Four Help (other/alphaFourHelp) ext Unsupported
1% dexvert FastLynx Help (other/fastLynxHelp) ext Unsupported
100% file data default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 6c 94 01 00 0d 0a 53 75 | 6d 6d 61 72 79 20 20 20 |l.....Su|mmary |
|00000010| 20 20 24 44 45 42 55 47 | 20 4f 4e 0d 0a 09 20 20 | $DEBUG| ON... |
|00000020| 20 20 24 44 45 42 55 47 | 20 4f 46 46 0d 0a 0d 0a | $DEBUG| OFF....|
|00000030| 44 65 73 63 72 69 70 74 | 69 6f 6e 20 54 68 69 73 |Descript|ion This|
|00000040| 20 6d 65 74 61 63 6f 6d | 6d 61 6e 64 20 74 65 6c | metacom|mand tel|
|00000050| 6c 73 20 74 68 65 20 63 | 6f 6d 70 69 6c 65 72 20 |ls the c|ompiler |
|00000060| 77 68 65 74 68 65 72 20 | 74 6f 20 20 70 75 74 20 |whether |to put |
|00000070| 20 64 65 62 75 67 20 20 | 69 6e 2d 0d 0a 09 20 20 | debug |in-... |
|00000080| 20 20 66 6f 72 6d 61 74 | 69 6f 6e 20 20 61 62 6f | format|ion abo|
|00000090| 75 74 20 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |ut the f|ollowing|
|000000a0| 20 73 6f 75 72 63 65 20 | 6c 69 6e 65 73 2e 20 49 | source |lines. I|
|000000b0| 66 20 74 75 72 6e 65 64 | 20 6f 66 66 2c 20 74 68 |f turned| off, th|
|000000c0| 65 0d 0a 09 20 20 20 20 | 6c 69 6e 65 73 20 77 69 |e... |lines wi|
|000000d0| 6c 6c 20 6e 6f 74 20 62 | 65 20 61 76 61 69 6c 61 |ll not b|e availa|
|000000e0| 62 6c 65 20 20 66 6f 72 | 20 20 73 69 6e 67 6c 65 |ble for| single|
|000000f0| 20 20 73 74 65 70 70 69 | 6e 67 20 20 6f 72 20 20 | steppi|ng or |
|00000100| 73 65 74 74 69 6e 67 0d | 0a 09 20 20 20 20 62 72 |setting.|.. br|
|00000110| 65 61 6b 70 6f 69 6e 74 | 73 2e 20 20 54 68 69 73 |eakpoint|s. This|
|00000120| 20 73 74 61 74 65 6d 65 | 6e 74 20 68 61 73 20 6e | stateme|nt has n|
|00000130| 6f 20 65 66 66 65 63 74 | 20 69 66 20 74 68 65 20 |o effect| if the |
|00000140| 63 6f 72 72 65 73 70 6f | 6e 64 69 6e 67 0d 0a 09 |correspo|nding...|
|00000150| 20 20 20 20 63 6f 6d 70 | 69 6c 65 72 20 6f 70 74 | comp|iler opt|
|00000160| 69 6f 6e 20 69 73 20 6e | 6f 74 20 73 65 74 2e 0d |ion is n|ot set..|
|00000170| 0a 0d 0a 45 78 61 6d 70 | 6c 65 0d 0a 09 20 20 20 |...Examp|le... |
|00000180| 20 20 20 27 20 54 75 72 | 6e 20 64 65 62 75 67 20 | ' Tur|n debug |
|00000190| 6f 66 66 20 66 6f 72 20 | 73 70 65 65 64 0d 0a 09 |off for |speed...|
|000001a0| 20 20 20 20 24 44 45 42 | 55 47 20 4f 46 46 0d 0a | $DEB|UG OFF..|
|000001b0| 09 20 20 20 20 24 52 41 | 4e 47 45 20 4f 46 46 0d |. $RA|NGE OFF.|
|000001c0| 0a 09 20 20 20 20 24 45 | 56 45 4e 54 20 4f 46 46 |.. $E|VENT OFF|
|000001d0| 0d 0a 09 20 20 20 20 44 | 45 46 20 53 75 6d 41 72 |... D|EF SumAr|
|000001e0| 72 61 79 23 28 41 72 72 | 61 79 23 28 31 29 29 0d |ray#(Arr|ay#(1)).|
|000001f0| 0a 09 20 20 20 20 20 20 | 53 75 6d 41 72 72 61 79 |.. |SumArray|
|00000200| 23 3d 30 0d 0a 09 20 20 | 20 20 20 20 46 4f 52 20 |#=0... | FOR |
|00000210| 49 25 3d 4c 42 4f 55 4e | 44 28 41 72 72 61 79 23 |I%=LBOUN|D(Array#|
|00000220| 28 31 29 29 20 74 6f 20 | 55 42 4f 55 4e 44 28 41 |(1)) to |UBOUND(A|
|00000230| 72 72 61 79 23 28 31 29 | 29 0d 0a 09 09 49 4e 43 |rray#(1)|)....INC|
|00000240| 52 20 53 75 6d 41 72 72 | 61 79 23 2c 41 72 72 61 |R SumArr|ay#,Arra|
|00000250| 79 23 28 49 25 29 0d 0a | 09 20 20 20 20 20 20 4e |y#(I%)..|. N|
|00000260| 45 58 54 20 49 25 0d 0a | 09 20 20 20 20 45 4e 44 |EXT I%..|. END|
|00000270| 20 44 45 46 0d 0a 09 20 | 20 20 20 24 44 45 42 55 | DEF... | $DEBU|
|00000280| 47 20 4f 4e 0d 0a 0d 0a | 09 20 20 20 20 24 52 41 |G ON....|. $RA|
|00000290| 4e 47 45 20 4f 4e 0d 0a | 09 20 20 20 20 24 45 56 |NGE ON..|. $EV|
|000002a0| 45 4e 54 20 4f 4e 0d 0a | 0d 0a 09 20 20 20 20 44 |ENT ON..|... D|
|000002b0| 49 4d 20 41 72 28 31 20 | 74 6f 20 32 30 30 29 0d |IM Ar(1 |to 200).|
|000002c0| 0a 09 20 20 20 20 20 20 | 27 20 4d 61 69 6e 20 70 |.. |' Main p|
|000002d0| 72 6f 67 72 61 6d 0d 0a | 09 20 20 20 20 50 52 49 |rogram..|. PRI|
|000002e0| 4e 54 20 22 46 69 6c 6c | 69 6e 67 20 74 68 65 20 |NT "Fill|ing the |
|000002f0| 61 72 72 61 79 22 0d 0a | 09 20 20 20 20 46 4f 52 |array"..|. FOR|
|00000300| 20 49 25 3d 31 20 74 6f | 20 32 30 30 0d 0a 09 20 | I%=1 to| 200... |
|00000310| 20 20 20 20 20 41 72 28 | 49 25 29 3d 49 25 2a 33 | Ar(|I%)=I%*3|
|00000320| 2e 34 0d 0a 09 20 20 20 | 20 4e 45 58 54 20 49 25 |.4... | NEXT I%|
|00000330| 0d 0a 09 20 20 20 20 58 | 23 3d 53 75 6d 41 72 72 |... X|#=SumArr|
|00000340| 61 79 23 28 41 72 28 29 | 29 0d 0a 09 20 20 20 20 |ay#(Ar()|)... |
|00000350| 50 52 49 4e 54 20 22 54 | 68 65 20 73 75 6d 3d 22 |PRINT "T|he sum="|
|00000360| 58 23 0d 0a 2a 45 4e 44 | 2a 0d 0a 0d 0a 53 75 6d |X#..*END|*....Sum|
|00000370| 6d 61 72 79 20 20 20 20 | 20 24 45 56 45 4e 54 20 |mary | $EVENT |
|00000380| 4f 4e 0d 0a 09 20 20 20 | 20 24 45 56 45 4e 54 20 |ON... | $EVENT |
|00000390| 4f 46 46 0d 0a 0d 0a 44 | 65 73 63 72 69 70 74 69 |OFF....D|escripti|
|000003a0| 6f 6e 20 54 68 69 73 20 | 66 75 6e 63 74 69 6f 6e |on This |function|
|000003b0| 20 74 65 6c 6c 73 20 74 | 68 65 20 63 6f 6d 70 69 | tells t|he compi|
|000003c0| 6c 65 72 20 77 68 65 74 | 68 65 72 20 74 6f 20 20 |ler whet|her to |
|000003d0| 63 68 65 63 6b 20 20 66 | 6f 72 20 20 65 76 65 6e |check f|or even|
|000003e0| 74 73 0d 0a 09 20 20 20 | 20 62 65 74 77 65 65 6e |ts... | between|
|000003f0| 20 65 61 63 68 20 73 74 | 61 74 65 6d 65 6e 74 20 | each st|atement |
|00000400| 69 6e 20 61 20 70 72 6f | 67 72 61 6d 2e 20 54 68 |in a pro|gram. Th|
|00000410| 65 20 63 6f 72 72 65 73 | 70 6f 6e 64 69 6e 67 20 |e corres|ponding |
|00000420| 63 6f 6d 70 69 6c 65 72 | 0d 0a 09 20 20 20 20 6f |compiler|... o|
|00000430| 70 74 69 6f 6e 20 6d 75 | 73 74 20 62 65 20 73 65 |ption mu|st be se|
|00000440| 74 2e 20 57 68 65 6e 20 | 74 68 65 20 54 52 41 50 |t. When |the TRAP|
|00000450| 20 73 74 61 74 65 6d 65 | 6e 74 20 69 73 20 75 73 | stateme|nt is us|
|00000460| 65 64 2c 20 20 74 68 65 | 20 20 63 6f 6d 2d 0d 0a |ed, the| com-..|
|00000470| 09 20 20 20 20 70 69 6c | 65 72 20 20 69 6e 73 65 |. pil|er inse|
|00000480| 72 74 73 20 20 74 77 6f | 20 62 79 74 65 73 20 6f |rts two| bytes o|
|00000490| 66 20 63 6f 64 65 20 66 | 6f 72 20 65 61 63 68 20 |f code f|or each |
|000004a0| 73 74 61 74 65 6d 65 6e | 74 2e 20 54 68 69 73 20 |statemen|t. This |
|000004b0| 61 6c 73 6f 0d 0a 09 20 | 20 20 20 63 61 75 73 65 |also... | cause|
|000004c0| 73 20 73 6f 6d 65 20 20 | 74 69 6d 65 20 20 6f 76 |s some |time ov|
|000004d0| 65 72 68 65 61 64 20 20 | 77 68 65 6e 20 20 74 68 |erhead |when th|
|000004e0| 65 20 20 70 72 6f 67 72 | 61 6d 20 20 69 73 20 20 |e progr|am is |
|000004f0| 72 75 6e 2e 20 20 54 68 | 69 73 0d 0a 09 20 20 20 |run. Th|is... |
|00000500| 20 6d 65 74 61 63 6f 6d | 6d 61 6e 64 20 20 61 6c | metacom|mand al|
|00000510| 6c 6f 77 73 20 20 74 68 | 65 20 20 70 72 6f 67 72 |lows th|e progr|
|00000520| 61 6d 20 20 74 6f 20 65 | 6c 69 6d 69 6e 61 74 65 |am to e|liminate|
|00000530| 20 74 68 65 20 6f 76 65 | 72 68 65 61 64 20 69 6e | the ove|rhead in|
|00000540| 0d 0a 09 20 20 20 20 73 | 65 63 74 69 6f 6e 73 20 |... s|ections |
|00000550| 6f 66 20 63 6f 64 65 20 | 74 68 61 74 20 77 69 6c |of code |that wil|
|00000560| 6c 20 6e 6f 74 20 68 61 | 76 65 20 65 76 65 6e 74 |l not ha|ve event|
|00000570| 20 74 72 61 70 70 69 6e | 67 2e 0d 0a 0d 0a 09 20 | trappin|g...... |
|00000580| 20 20 20 53 65 65 20 20 | 61 70 70 65 6e 64 69 78 | See |appendix|
|00000590| 20 20 41 20 20 66 6f 72 | 20 20 66 75 72 74 68 65 | A for| furthe|
|000005a0| 72 20 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 20 |r infor|mation |
|000005b0| 61 62 6f 75 74 20 20 74 | 68 65 20 20 20 65 76 65 |about t|he eve|
|000005c0| 6e 74 0d 0a 09 20 20 20 | 20 74 72 61 70 70 69 6e |nt... | trappin|
|000005d0| 67 2e 0d 0a 2a 45 4e 44 | 2a 0d 0a 0d 0a 53 75 6d |g...*END|*....Sum|
|000005e0| 6d 61 72 79 20 20 20 20 | 20 24 49 4e 43 4c 55 44 |mary | $INCLUD|
|000005f0| 45 20 46 69 6c 65 4e 61 | 6d 65 24 0d 0a 0d 0a 44 |E FileNa|me$....D|
|00000600| 65 73 63 72 69 70 74 69 | 6f 6e 20 54 68 69 73 20 |escripti|on This |
|00000610| 20 6d 65 74 61 63 6f 6d | 6d 61 6e 64 20 20 61 6c | metacom|mand al|
|00000620| 6c 6f 77 73 20 20 63 6f | 64 65 20 66 72 6f 6d 20 |lows co|de from |
|00000630| 61 20 64 69 73 6b 20 66 | 69 6c 65 20 74 6f 20 62 |a disk f|ile to b|
|00000640| 65 20 69 6e 63 6c 75 64 | 65 64 0d 0a 09 20 20 20 |e includ|ed... |
|00000650| 20 69 6e 74 6f 20 74 68 | 65 20 63 6f 6d 70 69 6c | into th|e compil|
|00000660| 65 64 20 6f 75 74 70 75 | 74 20 70 72 6f 67 72 61 |ed outpu|t progra|
|00000670| 6d 2e 20 54 68 69 73 20 | 63 6f 6d 6d 61 6e 64 20 |m. This |command |
|00000680| 20 69 73 20 20 75 73 65 | 66 75 6c 20 20 66 6f 72 | is use|ful for|
|00000690| 0d 0a 09 20 20 20 20 70 | 6c 61 63 69 6e 67 20 20 |... p|lacing |
|000006a0| 64 65 62 75 67 67 65 64 | 20 20 72 6f 75 74 69 6e |debugged| routin|
|000006b0| 65 73 20 20 69 6e 74 6f | 20 20 73 65 70 61 72 61 |es into| separa|
|000006c0| 74 65 20 20 66 69 6c 65 | 73 20 20 74 68 61 74 20 |te file|s that |
|000006d0| 63 61 6e 20 62 65 0d 0a | 09 20 20 20 20 73 69 6d |can be..|. sim|
|000006e0| 70 6c 79 20 69 6e 63 6c | 75 64 65 64 20 77 68 65 |ply incl|uded whe|
|000006f0| 6e 20 6e 65 65 64 65 64 | 2e 20 54 68 65 20 66 69 |n needed|. The fi|
|00000700| 6c 65 20 6e 61 6d 65 20 | 73 70 65 63 69 66 69 65 |le name |specifie|
|00000710| 64 20 6d 75 73 74 20 62 | 65 20 20 61 0d 0a 09 20 |d must b|e a... |
|00000720| 20 20 20 6c 69 74 65 72 | 61 6c 20 73 74 72 69 6e | liter|al strin|
|00000730| 67 2c 20 6e 6f 20 76 61 | 72 69 61 62 6c 65 73 2e |g, no va|riables.|
|00000740| 0d 0a 0d 0a 45 78 61 6d | 70 6c 65 0d 0a 09 20 20 |....Exam|ple... |
|00000750| 20 20 20 20 27 20 46 69 | 6c 65 20 53 55 4d 41 52 | ' Fi|le SUMAR|
|00000760| 2e 49 4e 43 0d 0a 09 20 | 20 20 20 44 45 46 20 53 |.INC... | DEF S|
|00000770| 75 6d 41 72 72 61 79 23 | 28 41 72 72 61 79 23 28 |umArray#|(Array#(|
|00000780| 31 29 29 0d 0a 09 20 20 | 20 20 20 20 53 75 6d 41 |1))... | SumA|
|00000790| 72 72 61 79 23 3d 30 0d | 0a 09 20 20 20 20 20 20 |rray#=0.|.. |
|000007a0| 46 4f 52 20 49 25 3d 4c | 42 4f 55 4e 44 28 41 72 |FOR I%=L|BOUND(Ar|
|000007b0| 72 61 79 23 28 31 29 29 | 20 74 6f 20 55 42 4f 55 |ray#(1))| to UBOU|
|000007c0| 4e 44 28 41 72 72 61 79 | 23 28 31 29 29 0d 0a 09 |ND(Array|#(1))...|
|000007d0| 09 49 4e 43 52 20 53 75 | 6d 41 72 72 61 79 23 2c |.INCR Su|mArray#,|
|000007e0| 41 72 72 61 79 23 28 49 | 25 29 0d 0a 09 20 20 20 |Array#(I|%)... |
|000007f0| 20 20 20 4e 45 58 54 20 | 49 25 0d 0a 09 20 20 20 | NEXT |I%... |
|00000800| 20 45 4e 44 20 44 45 46 | 0d 0a 0d 0a 0d 0a 09 20 | END DEF|....... |
|00000810| 20 20 20 20 20 27 20 4d | 61 69 6e 20 70 72 6f 67 | ' M|ain prog|
|00000820| 72 61 6d 0d 0a 09 20 20 | 20 20 24 49 4e 43 4c 55 |ram... | $INCLU|
|00000830| 44 45 20 22 53 55 4d 41 | 52 2e 49 4e 43 22 0d 0a |DE "SUMA|R.INC"..|
|00000840| 09 20 20 20 20 44 49 4d | 20 41 72 28 31 20 74 6f |. DIM| Ar(1 to|
|00000850| 20 32 30 30 29 0d 0a 0d | 0a 09 20 20 20 20 50 52 | 200)...|.. PR|
|00000860| 49 4e 54 20 22 46 69 6c | 6c 69 6e 67 20 74 68 65 |INT "Fil|ling the|
|00000870| 20 61 72 72 61 79 22 0d | 0a 09 20 20 20 20 46 4f | array".|.. FO|
|00000880| 52 20 49 25 3d 31 20 74 | 6f 20 32 30 30 0d 0a 09 |R I%=1 t|o 200...|
|00000890| 20 20 20 20 20 20 41 72 | 28 49 25 29 3d 49 25 2a | Ar|(I%)=I%*|
|000008a0| 33 2e 34 0d 0a 09 20 20 | 20 20 4e 45 58 54 20 49 |3.4... | NEXT I|
|000008b0| 25 0d 0a 09 20 20 20 20 | 58 23 3d 53 75 6d 41 72 |%... |X#=SumAr|
|000008c0| 72 61 79 23 28 41 72 28 | 29 29 0d 0a 09 20 20 20 |ray#(Ar(|))... |
|000008d0| 20 50 52 49 4e 54 20 22 | 54 68 65 20 73 75 6d 3d | PRINT "|The sum=|
|000008e0| 22 58 23 0d 0a 2a 45 4e | 44 2a 0d 0a 0d 0a 53 75 |"X#..*EN|D*....Su|
|000008f0| 6d 6d 61 72 79 20 20 20 | 20 20 24 52 41 4e 47 45 |mmary | $RANGE|
|00000900| 20 4f 4e 0d 0a 09 20 20 | 20 20 24 52 41 4e 47 45 | ON... | $RANGE|
|00000910| 20 4f 46 46 0d 0a 0d 0a | 44 65 73 63 72 69 70 74 | OFF....|Descript|
|00000920| 69 6f 6e 20 54 68 69 73 | 20 20 6d 65 74 61 63 6f |ion This| metaco|
|00000930| 6d 6d 61 6e 64 20 20 63 | 6f 6e 74 72 6f 6c 73 20 |mmand c|ontrols |
|00000940| 20 74 68 65 20 20 69 6e | 73 65 72 74 69 6f 6e 20 | the in|sertion |
|00000950| 6f 66 20 63 6f 64 65 20 | 74 6f 20 63 68 65 63 6b |of code |to check|
|00000960| 20 69 66 0d 0a 09 20 20 | 20 20 61 72 72 61 79 20 | if... | array |
|00000970| 69 6e 64 69 63 65 73 20 | 61 72 65 20 6f 75 74 20 |indices |are out |
|00000980| 6f 66 20 72 61 6e 67 65 | 2e 20 20 54 68 69 73 20 |of range|. This |
|00000990| 20 66 75 6e 63 74 69 6f | 6e 20 20 69 73 20 20 63 | functio|n is c|
|000009a0| 6f 6e 74 72 6f 6c 6c 65 | 64 0d 0a 09 20 20 20 20 |ontrolle|d... |
|000009b0| 77 69 74 68 20 61 6e 20 | 6f 70 74 69 6f 6e 20 6f |with an |option o|
|000009c0| 66 20 74 68 65 20 4f 70 | 74 69 6f 6e 73 20 6d 61 |f the Op|tions ma|
|000009d0| 69 6e 20 6d 65 6e 75 2e | 20 49 66 20 74 75 72 6e |in menu.| If turn|
|000009e0| 65 64 20 6f 6e 20 75 73 | 69 6e 67 20 74 68 65 0d |ed on us|ing the.|
|000009f0| 0a 09 20 20 20 20 6d 65 | 6e 75 2c 20 74 68 69 73 |.. me|nu, this|
|00000a00| 20 73 74 61 74 65 6d 65 | 6e 74 20 63 61 6e 20 73 | stateme|nt can s|
|00000a10| 65 6c 65 63 74 69 76 65 | 6c 79 20 74 75 72 6e 20 |elective|ly turn |
|00000a20| 6f 6e 20 61 6e 64 20 6f | 66 66 20 74 68 65 20 20 |on and o|ff the |
|00000a30| 72 61 6e 67 65 0d 0a 09 | 20 20 20 20 63 68 65 63 |range...| chec|
|00000a40| 6b 69 6e 67 20 74 68 72 | 6f 75 67 68 20 6f 75 74 |king thr|ough out|
|00000a50| 20 74 68 65 20 70 72 6f | 67 72 61 6d 2e 0d 0a 0d | the pro|gram....|
|00000a60| 0a 45 78 61 6d 70 6c 65 | 0d 0a 09 20 20 20 20 20 |.Example|... |
|00000a70| 20 27 20 54 75 72 6e 20 | 64 65 62 75 67 20 6f 66 | ' Turn |debug of|
|00000a80| 66 20 66 6f 72 20 73 70 | 65 65 64 0d 0a 09 20 20 |f for sp|eed... |
|00000a90| 20 20 24 44 45 42 55 47 | 20 4f 46 46 0d 0a 09 20 | $DEBUG| OFF... |
|00000aa0| 20 20 20 24 52 41 4e 47 | 45 20 4f 46 46 0d 0a 09 | $RANG|E OFF...|
|00000ab0| 20 20 20 20 44 45 46 20 | 53 75 6d 41 72 72 61 79 | DEF |SumArray|
|00000ac0| 23 28 41 72 72 61 79 23 | 28 31 29 29 0d 0a 09 20 |#(Array#|(1))... |
|00000ad0| 20 20 20 20 20 53 75 6d | 41 72 72 61 79 23 3d 30 | Sum|Array#=0|
|00000ae0| 0d 0a 09 20 20 20 20 20 | 20 46 4f 52 20 49 25 3d |... | FOR I%=|
|00000af0| 4c 42 4f 55 4e 44 28 41 | 72 72 61 79 23 28 31 29 |LBOUND(A|rray#(1)|
|00000b00| 29 20 74 6f 20 55 42 4f | 55 4e 44 28 41 72 72 61 |) to UBO|UND(Arra|
|00000b10| 79 23 28 31 29 29 0d 0a | 09 09 44 45 43 52 20 53 |y#(1))..|..DECR S|
|00000b20| 75 6d 41 72 72 61 79 23 | 2c 41 72 72 61 79 23 28 |umArray#|,Array#(|
|00000b30| 49 25 29 0d 0a 09 20 20 | 20 20 20 20 4e 45 58 54 |I%)... | NEXT|
|00000b40| 20 49 25 0d 0a 09 20 20 | 20 20 45 4e 44 20 44 45 | I%... | END DE|
|00000b50| 46 0d 0a 09 20 20 20 20 | 24 44 45 42 55 47 20 4f |F... |$DEBUG O|
|00000b60| 4e 0d 0a 09 20 20 20 20 | 24 52 41 4e 47 45 20 4f |N... |$RANGE O|
|00000b70| 4e 0d 0a 0d 0a 09 20 20 | 20 20 44 49 4d 20 41 72 |N..... | DIM Ar|
|00000b80| 28 31 20 74 6f 20 32 30 | 30 29 0d 0a 09 20 20 20 |(1 to 20|0)... |
|00000b90| 20 20 20 27 20 4d 61 69 | 6e 20 70 72 6f 67 72 61 | ' Mai|n progra|
|00000ba0| 6d 0d 0a 09 20 20 20 20 | 50 52 49 4e 54 20 22 46 |m... |PRINT "F|
|00000bb0| 69 6c 6c 69 6e 67 20 74 | 68 65 20 61 72 72 61 79 |illing t|he array|
|00000bc0| 22 0d 0a 09 20 20 20 20 | 46 4f 52 20 49 25 3d 31 |"... |FOR I%=1|
|00000bd0| 20 74 6f 20 32 30 30 0d | 0a 09 20 20 20 20 20 20 | to 200.|.. |
|00000be0| 41 72 28 49 25 29 3d 49 | 25 2a 33 2e 34 0d 0a 09 |Ar(I%)=I|%*3.4...|
|00000bf0| 20 20 20 20 4e 45 58 54 | 20 49 25 0d 0a 09 20 20 | NEXT| I%... |
|00000c00| 20 20 58 23 3d 53 75 6d | 41 72 72 61 79 23 28 41 | X#=Sum|Array#(A|
|00000c10| 72 28 29 29 0d 0a 09 20 | 20 20 20 50 52 49 4e 54 |r())... | PRINT|
|00000c20| 20 22 54 68 65 20 73 75 | 6d 3d 22 58 23 0d 0a 2a | "The su|m="X#..*|
|00000c30| 45 4e 44 2a 0d 0a 0d 0a | 53 75 6d 6d 61 72 79 20 |END*....|Summary |
|00000c40| 20 20 20 20 43 48 41 49 | 4e 20 46 69 6c 65 6e 61 | CHAI|N Filena|
|00000c50| 6d 65 24 0d 0a 0d 0a 44 | 65 73 63 72 69 70 74 69 |me$....D|escripti|
|00000c60| 6f 6e 20 54 68 69 73 20 | 20 20 73 74 61 74 65 6d |on This | statem|
|00000c70| 65 6e 74 20 20 61 6c 6c | 6f 77 73 20 20 61 6e 6f |ent all|ows ano|
|00000c80| 74 68 65 72 20 20 63 6f | 6d 70 69 6c 65 64 20 20 |ther co|mpiled |
|00000c90| 70 72 6f 67 72 61 6d 20 | 20 74 6f 20 20 73 74 61 |program | to sta|
|00000ca0| 72 74 0d 0a 09 20 20 20 | 20 65 78 65 63 75 74 69 |rt... | executi|
|00000cb0| 6f 6e 2e 20 54 68 65 20 | 63 75 72 72 65 6e 74 20 |on. The |current |
|00000cc0| 70 72 6f 67 72 61 6d 20 | 69 73 20 63 6c 65 61 72 |program |is clear|
|00000cd0| 65 64 20 66 72 6f 6d 20 | 6d 65 6d 6f 72 79 20 20 |ed from |memory |
|00000ce0| 61 6e 64 20 20 74 68 65 | 0d 0a 09 20 20 20 20 73 |and the|... s|
|00000cf0| 70 65 63 69 66 69 65 64 | 20 66 69 6c 65 20 69 73 |pecified| file is|
|00000d00| 20 6c 6f 61 64 65 64 2e | 20 54 68 65 20 73 70 65 | loaded.| The spe|
|00000d10| 63 69 66 69 65 64 20 66 | 69 6c 65 20 6d 75 73 74 |cified f|ile must|
|00000d20| 20 62 65 20 61 20 63 6f | 6d 70 69 6c 65 64 0d 0a | be a co|mpiled..|
|00000d30| 09 20 20 20 20 41 70 42 | 61 73 69 63 20 70 72 6f |. ApB|asic pro|
|00000d40| 67 72 61 6d 20 61 6e 64 | 20 68 61 76 65 20 20 74 |gram and| have t|
|00000d50| 68 65 20 20 64 65 66 61 | 75 6c 74 20 20 63 68 61 |he defa|ult cha|
|00000d60| 69 6e 20 20 66 69 6c 65 | 20 20 65 78 74 65 6e 73 |in file| extens|
|00000d70| 69 6f 6e 2c 0d 0a 09 20 | 20 20 20 27 2e 43 48 4e |ion,... | '.CHN|
|00000d80| 27 2e 20 20 49 66 20 74 | 68 65 20 63 68 61 69 6e |'. If t|he chain|
|00000d90| 2d 74 6f 20 70 72 6f 67 | 72 61 6d 20 68 61 73 20 |-to prog|ram has |
|00000da0| 61 6e 79 20 76 61 72 69 | 61 62 6c 65 73 20 73 70 |any vari|ables sp|
|00000db0| 65 63 69 66 69 65 64 20 | 61 73 0d 0a 09 20 20 20 |ecified |as... |
|00000dc0| 20 43 4f 4d 4d 4f 4e 2c | 20 74 68 65 20 6f 72 69 | COMMON,| the ori|
|00000dd0| 67 69 6e 61 6c 20 70 72 | 6f 67 72 61 6d 20 6d 75 |ginal pr|ogram mu|
|00000de0| 73 74 20 68 61 76 65 20 | 74 68 65 20 73 61 6d 65 |st have |the same|
|00000df0| 20 76 61 72 69 61 62 6c | 65 73 20 20 6c 69 73 2d | variabl|es lis-|
|00000e00| 0d 0a 09 20 20 20 20 74 | 65 64 20 20 61 73 20 20 |... t|ed as |
|00000e10| 63 6f 6d 6d 6f 6e 2e 20 | 20 54 68 69 73 20 20 73 |common. | This s|
|00000e20| 74 61 74 65 6d 65 6e 74 | 20 20 63 61 6e 20 20 6f |tatement| can o|
|00000e30| 6e 6c 79 20 62 65 20 65 | 78 65 63 75 74 65 64 20 |nly be e|xecuted |
|00000e40| 66 72 6f 6d 20 61 0d 0a | 09 20 20 20 20 63 6f 6d |from a..|. com|
|00000e50| 70 69 6c 65 64 2d 74 6f | 20 2e 45 58 45 20 70 72 |piled-to| .EXE pr|
|00000e60| 6f 67 72 61 6d 3b 20 69 | 74 20 63 61 6e 6e 6f 74 |ogram; i|t cannot|
|00000e70| 20 20 62 65 20 20 75 73 | 65 64 20 20 66 72 6f 6d | be us|ed from|
|00000e80| 20 20 61 20 20 70 72 6f | 67 72 61 6d 0d 0a 09 20 | a pro|gram... |
|00000e90| 20 20 20 63 6f 6d 70 69 | 6c 65 64 20 74 6f 20 6d | compi|led to m|
|00000ea0| 65 6d 6f 72 79 2e 0d 0a | 0d 0a 53 65 65 20 41 6c |emory...|..See Al|
|00000eb0| 73 6f 20 20 20 20 20 20 | 20 20 0d 0a 09 20 20 20 |so | ... |
|00000ec0| 20 52 55 4e 0d 0a 09 20 | 20 20 20 43 4f 4d 4d 4f | RUN... | COMMO|
|00000ed0| 4e 0d 0a 0d 0a 45 78 61 | 6d 70 6c 65 0d 0a 09 20 |N....Exa|mple... |
|00000ee0| 20 20 20 20 20 27 20 50 | 72 6f 67 72 61 6d 20 50 | ' P|rogram P|
|00000ef0| 52 4f 47 31 2e 45 58 45 | 0d 0a 09 20 20 20 20 43 |ROG1.EXE|... C|
|00000f00| 6f 6d 6d 6f 6e 20 41 24 | 2c 42 2c 43 25 0d 0a 09 |ommon A$|,B,C%...|
|00000f10| 20 20 20 20 50 72 69 6e | 74 20 22 49 6e 20 70 72 | Prin|t "In pr|
|00000f20| 6f 67 72 61 6d 20 23 31 | 22 0d 0a 09 20 20 20 20 |ogram #1|"... |
|00000f30| 41 24 3d 22 47 65 6f 72 | 67 65 20 57 61 73 68 69 |A$="Geor|ge Washi|
|00000f40| 6e 67 74 6f 6e 22 0d 0a | 0d 0a 09 20 20 20 20 42 |ngton"..|... B|
|00000f50| 3d 31 2e 35 0d 0a 09 20 | 20 20 20 43 25 3d 34 30 |=1.5... | C%=40|
|00000f60| 30 0d 0a 09 20 20 20 20 | 43 68 61 69 6e 20 22 50 |0... |Chain "P|
|00000f70| 52 4f 47 32 22 0d 0a 0d | 0a 0d 0a 0d 0a 09 20 20 |ROG2"...|...... |
|00000f80| 20 20 20 20 27 20 50 72 | 6f 67 72 61 6d 20 50 52 | ' Pr|ogram PR|
|00000f90| 4f 47 32 2e 43 48 4e 0d | 0a 09 20 20 20 20 43 6f |OG2.CHN.|.. Co|
|00000fa0| 6d 6d 6f 6e 20 41 24 2c | 42 2c 43 25 0d 0a 09 20 |mmon A$,|B,C%... |
|00000fb0| 20 20 20 50 72 69 6e 74 | 20 22 49 6e 20 70 72 6f | Print| "In pro|
|00000fc0| 67 72 61 6d 20 23 32 22 | 0d 0a 09 20 20 20 20 50 |gram #2"|... P|
|00000fd0| 72 69 6e 74 20 41 24 2c | 42 2c 43 25 0d 0a 2a 45 |rint A$,|B,C%..*E|
|00000fe0| 4e 44 2a 0d 0a 0d 0a 53 | 75 6d 6d 61 72 79 20 20 |ND*....S|ummary |
|00000ff0| 20 20 20 43 48 44 49 52 | 20 50 61 74 68 24 0d 0a | CHDIR| Path$..|
|00001000| 0d 0a 44 65 73 63 72 69 | 70 74 69 6f 6e 20 43 68 |..Descri|ption Ch|
|00001010| 61 6e 67 65 73 20 20 74 | 68 65 20 20 63 75 72 72 |anges t|he curr|
|00001020| 65 6e 74 20 20 64 69 72 | 65 63 74 6f 72 79 2e 20 |ent dir|ectory. |
|00001030| 20 50 61 74 68 24 20 69 | 73 20 61 20 73 74 72 69 | Path$ i|s a stri|
|00001040| 6e 67 20 65 78 70 72 65 | 73 73 69 6f 6e 0d 0a 09 |ng expre|ssion...|
|00001050| 20 20 20 20 74 68 61 74 | 20 65 76 61 6c 75 61 74 | that| evaluat|
|00001060| 65 73 20 74 6f 20 61 20 | 76 61 6c 69 64 20 70 61 |es to a |valid pa|
|00001070| 74 68 20 6e 61 6d 65 2e | 20 54 68 69 73 20 63 6f |th name.| This co|
|00001080| 6d 6d 61 6e 64 20 69 73 | 20 20 69 64 65 6e 74 69 |mmand is| identi|
|00001090| 63 61 6c 0d 0a 09 20 20 | 20 20 74 6f 20 20 74 68 |cal... | to th|
|000010a0| 65 20 20 44 4f 53 20 20 | 43 48 44 49 52 20 20 63 |e DOS |CHDIR c|
|000010b0| 6f 6d 6d 61 6e 64 2e 20 | 54 68 65 20 6e 65 77 20 |ommand. |The new |
|000010c0| 70 61 74 68 20 6e 61 6d | 65 20 6d 75 73 74 20 65 |path nam|e must e|
|000010d0| 78 69 73 74 20 6f 72 20 | 61 0d 0a 09 20 20 20 20 |xist or |a... |
|000010e0| 72 75 6e 2d 74 69 6d 65 | 20 65 72 72 6f 72 20 77 |run-time| error w|
|000010f0| 69 6c 6c 20 6f 63 63 75 | 72 2e 0d 0a 0d 0a 53 65 |ill occu|r.....Se|
|00001100| 65 20 41 6c 73 6f 20 20 | 20 20 20 20 20 20 0d 0a |e Also | ..|
|00001110| 09 20 20 20 20 45 4e 56 | 24 28 29 0d 0a 09 20 20 |. ENV|$()... |
|00001120| 20 20 43 44 49 52 24 28 | 29 0d 0a 09 20 20 20 20 | CDIR$(|)... |
|00001130| 4d 4b 44 49 52 0d 0a 09 | 20 20 20 20 52 4d 44 49 |MKDIR...| RMDI|
|00001140| 52 0d 0a 0d 0a 45 78 61 | 6d 70 6c 65 0d 0a 09 20 |R....Exa|mple... |
|00001150| 20 20 20 4f 6c 64 44 69 | 72 24 3d 43 44 49 52 24 | OldDi|r$=CDIR$|
|00001160| 28 30 29 20 20 20 20 20 | 20 20 20 27 20 47 65 74 |(0) | ' Get|
|00001170| 20 64 69 72 65 63 74 6f | 72 79 20 6f 66 20 63 75 | directo|ry of cu|
|00001180| 72 72 65 6e 74 20 64 72 | 69 76 65 0d 0a 09 20 20 |rrent dr|ive... |
|00001190| 20 20 49 4e 50 55 54 20 | 22 45 6e 74 65 72 20 61 | INPUT |"Enter a|
|000011a0| 20 6e 65 77 20 64 69 72 | 65 63 74 6f 72 79 20 22 | new dir|ectory "|
|000011b0| 3b 4e 65 77 44 69 72 24 | 0d 0a 09 20 20 20 20 43 |;NewDir$|... C|
|000011c0| 48 44 49 52 20 4e 65 77 | 44 69 72 24 0d 0a 09 20 |HDIR New|Dir$... |
|000011d0| 20 20 20 49 4e 50 55 54 | 20 22 50 72 65 73 73 20 | INPUT| "Press |
|000011e0| 3c 45 6e 74 65 72 3e 20 | 74 6f 20 63 68 61 6e 67 |<Enter> |to chang|
|000011f0| 65 20 62 61 63 6b 20 74 | 6f 20 6f 6c 64 20 64 69 |e back t|o old di|
|00001200| 72 65 63 74 6f 72 79 20 | 22 3b 41 24 0d 0a 09 20 |rectory |";A$... |
|00001210| 20 20 20 43 48 44 49 52 | 20 4f 6c 64 44 69 72 24 | CHDIR| OldDir$|
|00001220| 0d 0a 2a 45 4e 44 2a 0d | 0a 0d 0a 53 75 6d 6d 61 |..*END*.|...Summa|
|00001230| 72 79 20 20 20 20 20 43 | 4c 4f 53 45 20 5b 46 69 |ry C|LOSE [Fi|
|00001240| 6c 65 6e 6f 25 5d 0d 0a | 0d 0a 44 65 73 63 72 69 |leno%]..|..Descri|
|00001250| 70 74 69 6f 6e 20 43 6c | 6f 73 65 73 20 61 20 66 |ption Cl|oses a f|
|00001260| 69 6c 65 20 6f 70 65 6e | 65 64 20 77 69 74 68 20 |ile open|ed with |
|00001270| 74 68 65 20 4f 50 45 4e | 20 73 74 61 74 65 6d 65 |the OPEN| stateme|
|00001280| 6e 74 2e 20 49 66 20 61 | 20 66 69 6c 65 20 20 6e |nt. If a| file n|
|00001290| 75 6d 62 65 72 0d 0a 09 | 20 20 20 20 69 73 20 20 |umber...| is |
|000012a0| 73 70 65 63 69 66 69 65 | 64 2c 20 20 6f 6e 6c 79 |specifie|d, only|
|000012b0| 20 74 68 61 74 20 66 69 | 6c 65 20 69 73 20 63 6c | that fi|le is cl|
|000012c0| 6f 73 65 64 2e 20 49 66 | 20 6e 6f 74 20 73 70 65 |osed. If| not spe|
|000012d0| 63 69 66 69 65 64 2c 20 | 61 6c 6c 0d 0a 09 20 20 |cified, |all... |
|000012e0| 20 20 6f 70 65 6e 20 66 | 69 6c 65 20 6e 75 6d 62 | open f|ile numb|
|000012f0| 65 72 73 20 61 72 65 20 | 63 6c 6f 73 65 64 2e 0d |ers are |closed..|
|00001300| 0a 0d 0a 53 65 65 20 41 | 6c 73 6f 20 20 20 20 20 |...See A|lso |
|00001310| 20 20 20 0d 0a 09 20 20 | 20 20 4f 50 45 4e 0d 0a | ... | OPEN..|
|00001320| 0d 0a 45 78 61 6d 70 6c | 65 0d 0a 09 20 20 20 20 |..Exampl|e... |
|00001330| 4f 50 45 4e 20 22 54 65 | 73 74 2e 64 61 74 22 20 |OPEN "Te|st.dat" |
|00001340| 46 4f 52 20 49 4e 50 55 | 54 20 41 53 20 23 31 0d |FOR INPU|T AS #1.|
|00001350| 0a 09 20 20 20 20 57 48 | 49 4c 45 20 4e 4f 54 20 |.. WH|ILE NOT |
|00001360| 45 4f 46 28 31 29 0d 0a | 09 20 20 20 20 20 20 4c |EOF(1)..|. L|
|00001370| 49 4e 45 20 49 4e 50 55 | 54 20 23 31 2c 52 65 63 |INE INPU|T #1,Rec|
|00001380| 6f 72 64 24 0d 0a 09 20 | 20 20 20 20 20 50 52 49 |ord$... | PRI|
|00001390| 4e 54 20 52 65 63 6f 72 | 64 24 0d 0a 09 20 20 20 |NT Recor|d$... |
|000013a0| 20 57 45 4e 44 0d 0a 09 | 20 20 20 20 43 4c 4f 53 | WEND...| CLOS|
|000013b0| 45 20 31 0d 0a 2a 45 4e | 44 2a 0d 0a 0d 0a 53 75 |E 1..*EN|D*....Su|
|000013c0| 6d 6d 61 72 79 20 20 20 | 20 20 43 4c 53 0d 0a 0d |mmary | CLS...|
|000013d0| 0a 44 65 73 63 72 69 70 | 74 69 6f 6e 20 54 68 65 |.Descrip|tion The|
|000013e0| 20 43 4c 53 20 63 6f 6d | 6d 61 6e 64 20 63 6c 65 | CLS com|mand cle|
|000013f0| 61 72 73 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 |ars the |current |
|00001400| 77 69 6e 64 6f 77 2e 20 | 49 66 20 6e 6f 20 57 49 |window. |If no WI|
|00001410| 4e 44 4f 57 20 20 73 74 | 61 74 65 2d 0d 0a 09 20 |NDOW st|ate-... |
|00001420| 20 20 20 6d 65 6e 74 20 | 68 61 73 20 62 65 65 6e | ment |has been|
|00001430| 20 65 78 65 63 75 74 65 | 64 2c 20 74 68 65 20 65 | execute|d, the e|
|00001440| 6e 74 69 72 65 20 73 63 | 72 65 65 6e 20 69 73 20 |ntire sc|reen is |
|00001450| 63 6c 65 61 72 65 64 2c | 20 65 6c 73 65 20 6f 6e |cleared,| else on|
|00001460| 6c 79 0d 0a 09 20 20 20 | 20 74 68 65 20 61 72 65 |ly... | the are|
|00001470| 61 20 64 65 66 69 6e 65 | 64 20 69 6e 20 74 68 65 |a define|d in the|
|00001480| 20 57 49 4e 44 4f 57 20 | 73 74 61 74 65 6d 65 6e | WINDOW |statemen|
|00001490| 74 20 69 73 20 63 6c 65 | 61 72 65 64 2e 20 20 54 |t is cle|ared. T|
|000014a0| 68 65 20 20 63 75 72 2d | 0d 0a 09 20 20 20 20 72 |he cur-|... r|
|000014b0| 65 6e 74 20 20 62 61 63 | 6b 67 72 6f 75 6e 64 20 |ent bac|kground |
|000014c0| 20 63 6f 6c 6f 72 20 73 | 65 74 20 77 69 74 68 20 | color s|et with |
|000014d0| 74 68 65 20 43 4f 4c 4f | 52 20 73 74 61 74 65 6d |the COLO|R statem|
|000014e0| 65 6e 74 20 69 73 20 75 | 73 65 64 20 69 6e 0d 0a |ent is u|sed in..|
|000014f0| 09 20 20 20 20 74 68 65 | 20 63 6c 65 61 72 65 64 |. the| cleared|
|00001500| 20 61 72 65 61 2e 0d 0a | 0d 0a 53 65 65 20 41 6c | area...|..See Al|
|00001510| 73 6f 20 20 20 20 20 20 | 20 20 0d 0a 09 20 20 20 |so | ... |
|00001520| 20 43 4f 4c 4f 52 0d 0a | 09 20 20 20 20 57 49 4e | COLOR..|. WIN|
|00001530| 44 4f 57 0d 0a 0d 0a 45 | 78 61 6d 70 6c 65 0d 0a |DOW....E|xample..|
|00001540| 09 20 20 20 20 44 45 46 | 49 4e 54 20 41 2d 5a 0d |. DEF|INT A-Z.|
|00001550| 0a 09 20 20 20 20 20 20 | 27 20 46 69 6c 6c 20 73 |.. |' Fill s|
|00001560| 63 72 65 65 6e 20 77 69 | 74 68 20 61 73 74 65 72 |creen wi|th aster|
|00001570| 69 73 6b 27 73 20 28 2a | 29 0d 0a 09 20 20 20 20 |isk's (*|)... |
|00001580| 46 4f 52 20 52 6f 77 3d | 31 20 54 4f 20 32 34 0d |FOR Row=|1 TO 24.|
|00001590| 0a 09 20 20 20 20 20 20 | 46 4f 52 20 43 6f 6c 3d |.. |FOR Col=|
|000015a0| 31 20 54 4f 20 37 39 0d | 0a 09 20 20 20 20 20 20 |1 TO 79.|.. |
|000015b0| 20 50 52 49 4e 54 20 22 | 2a 22 3b 0d 0a 09 20 20 | PRINT "|*";... |
|000015c0| 20 20 20 20 4e 45 58 54 | 20 43 6f 6c 0d 0a 09 20 | NEXT| Col... |
|000015d0| 20 20 20 20 20 50 52 49 | 4e 54 0d 0a 09 20 20 20 | PRI|NT... |
|000015e0| 20 4e 45 58 54 20 52 6f | 77 0d 0a 0d 0a 09 20 20 | NEXT Ro|w..... |
|000015f0| 20 20 20 20 27 20 44 65 | 66 69 6e 65 20 61 20 77 | ' De|fine a w|
|00001600| 69 6e 64 6f 77 0d 0a 09 | 20 20 20 20 57 49 4e 44 |indow...| WIND|
|00001610| 4f 57 20 31 2c 31 2c 31 | 35 2c 34 30 0d 0a 09 20 |OW 1,1,1|5,40... |
|00001620| 20 20 20 20 20 27 20 57 | 61 69 74 20 66 6f 72 20 | ' W|ait for |
|00001630| 61 20 6b 65 79 0d 0a 09 | 20 20 20 20 57 48 49 4c |a key...| WHIL|
|00001640| 45 20 49 4e 4b 45 59 24 | 3d 22 22 20 3a 20 57 45 |E INKEY$|="" : WE|
|00001650| 4e 44 0d 0a 09 20 20 20 | 20 20 20 27 20 43 6c 65 |ND... | ' Cle|
|00001660| 61 72 20 74 68 65 20 77 | 69 6e 64 6f 77 65 64 20 |ar the w|indowed |
|00001670| 61 72 65 61 0d 0a 09 20 | 20 20 20 43 4c 53 0d 0a |area... | CLS..|
|00001680| 09 20 20 20 20 49 4e 50 | 55 54 20 22 50 72 65 73 |. INP|UT "Pres|
|00001690| 73 20 3c 45 6e 74 65 72 | 3e 20 74 6f 20 63 6c 65 |s <Enter|> to cle|
|000016a0| 61 72 20 77 68 6f 6c 65 | 20 73 63 72 65 65 6e 22 |ar whole| screen"|
|000016b0| 3b 41 24 0d 0a 09 20 20 | 20 20 57 49 4e 44 4f 57 |;A$... | WINDOW|
|000016c0| 20 31 2c 31 2c 32 35 2c | 38 30 0d 0a 09 20 20 20 | 1,1,25,|80... |
|000016d0| 20 43 4c 53 0d 0a 2a 45 | 4e 44 2a 0d 0a 0d 0a 53 | CLS..*E|ND*....S|
|000016e0| 75 6d 6d 61 72 79 20 20 | 20 20 20 43 4f 4c 4f 52 |ummary | COLOR|
|000016f0| 20 46 6f 72 65 67 72 6f | 75 6e 64 25 20 2c 20 42 | Foregro|und% , B|
|00001700| 61 63 6b 67 72 6f 75 6e | 64 25 20 5b 2c 42 6f 72 |ackgroun|d% [,Bor|
|00001710| 64 65 72 25 5d 0d 0a 0d | 0a 44 65 73 63 72 69 70 |der%]...|.Descrip|
|00001720| 74 69 6f 6e 20 46 6f 72 | 65 67 72 6f 75 6e 64 25 |tion For|eground%|
|00001730| 20 69 73 20 74 68 65 20 | 64 65 73 69 72 65 64 20 | is the |desired |
|00001740| 66 6f 72 65 67 72 6f 75 | 6e 64 20 63 6f 6c 6f 72 |foregrou|nd color|
|00001750| 20 61 6e 64 20 42 61 63 | 6b 67 72 6f 75 6e 64 25 | and Bac|kground%|
|00001760| 20 20 69 73 0d 0a 09 20 | 20 20 20 74 68 65 20 20 | is... | the |
|00001770| 64 65 73 69 72 65 64 20 | 20 62 61 63 6b 67 72 6f |desired | backgro|
|00001780| 75 6e 64 20 63 6f 6c 6f | 72 2e 20 4f 6e 20 63 6f |und colo|r. On co|
|00001790| 6c 6f 72 20 74 79 70 65 | 20 76 69 64 65 6f 20 62 |lor type| video b|
|000017a0| 6f 61 72 64 73 2c 20 74 | 68 65 0d 0a 09 20 20 20 |oards, t|he... |
|000017b0| 20 6f 70 74 69 6f 6e 61 | 6c 20 62 6f 72 64 65 72 | optiona|l border|
|000017c0| 20 63 6f 6c 6f 72 20 63 | 61 6e 20 62 65 20 61 73 | color c|an be as|
|000017d0| 73 69 67 6e 65 64 2e 20 | 45 76 65 6e 20 74 68 6f |signed. |Even tho|
|000017e0| 75 67 68 20 20 74 68 69 | 73 20 20 69 73 20 20 61 |ugh thi|s is a|
|000017f0| 0d 0a 09 20 20 20 20 43 | 4f 4c 4f 52 20 73 74 61 |... C|OLOR sta|
|00001800| 74 65 6d 65 6e 74 2c 20 | 69 74 20 63 61 6e 20 62 |tement, |it can b|
|00001810| 65 20 65 78 65 63 75 74 | 65 64 20 6f 6e 20 61 20 |e execut|ed on a |
|00001820| 6d 6f 6e 6f 63 68 72 6f | 6d 65 20 6d 6f 6e 69 74 |monochro|me monit|
|00001830| 6f 72 2e 20 49 74 0d 0a | 09 20 20 20 20 63 6f 6e |or. It..|. con|
|00001840| 74 72 6f 6c 73 20 61 74 | 74 72 69 62 75 74 65 73 |trols at|tributes|
|00001850| 20 73 75 63 68 20 61 73 | 20 75 6e 64 65 72 6c 69 | such as| underli|
|00001860| 6e 65 2c 20 69 6e 76 65 | 72 73 65 20 61 6e 64 20 |ne, inve|rse and |
|00001870| 62 72 69 67 68 74 6e 65 | 73 73 2e 0d 0a 0d 0a 09 |brightne|ss......|
|00001880| 20 20 20 20 54 68 65 20 | 66 6f 6c 6c 6f 77 69 6e | The |followin|
|00001890| 67 20 66 6f 72 65 67 72 | 6f 75 6e 64 20 76 61 6c |g foregr|ound val|
|000018a0| 75 65 73 20 61 72 65 20 | 20 61 76 61 69 6c 61 62 |ues are | availab|
|000018b0| 6c 65 20 20 66 6f 72 20 | 20 6d 6f 6e 6f 63 68 72 |le for | monochr|
|000018c0| 6f 6d 65 0d 0a 09 20 20 | 20 20 6d 6f 6e 69 74 6f |ome... | monito|
|000018d0| 72 73 3a 0d 0a 0d 0a 09 | 09 20 20 20 20 20 20 30 |rs:.....|. 0|
|000018e0| 20 20 20 20 20 20 20 62 | 6c 61 63 6b 0d 0a 09 09 | b|lack....|
|000018f0| 20 20 20 20 20 20 31 20 | 20 20 20 20 20 20 75 6e | 1 | un|
|00001900| 64 65 72 6c 69 6e 65 0d | 0a 09 09 20 20 20 20 20 |derline.|... |
|00001910| 20 32 2d 37 20 20 20 20 | 20 77 68 69 74 65 0d 0a | 2-7 | white..|
|00001920| 0d 0a 09 20 20 20 20 54 | 68 65 20 20 66 6f 72 65 |... T|he fore|
|00001930| 67 72 6f 75 6e 64 20 20 | 63 6f 6c 6f 72 20 63 61 |ground |color ca|
|00001940| 6e 20 62 65 20 70 6c 61 | 63 65 64 20 69 6e 74 6f |n be pla|ced into|
|00001950| 20 68 69 67 68 20 69 6e | 74 65 6e 73 69 74 79 20 | high in|tensity |
|00001960| 62 79 20 61 64 2d 0d 0a | 09 20 20 20 20 64 69 6e |by ad-..|. din|
|00001970| 67 20 65 69 67 68 74 20 | 28 38 29 20 61 6e 64 20 |g eight |(8) and |
|00001980| 74 68 65 20 63 68 61 72 | 61 63 74 65 72 73 20 63 |the char|acters c|
|00001990| 61 6e 20 62 65 20 6d 61 | 64 65 20 62 6c 69 6e 6b |an be ma|de blink|
|000019a0| 69 6e 67 20 20 62 79 20 | 20 61 64 2d 0d 0a 09 20 |ing by | ad-... |
|000019b0| 20 20 20 64 69 6e 67 20 | 73 69 78 74 65 65 6e 20 | ding |sixteen |
|000019c0| 28 31 36 29 20 74 6f 20 | 74 68 65 20 66 6f 72 65 |(16) to |the fore|
|000019d0| 67 72 6f 75 6e 64 20 63 | 6f 6c 6f 72 2e 0d 0a 0d |ground c|olor....|
|000019e0| 0a 09 20 20 20 20 54 68 | 65 20 62 61 63 6b 67 72 |.. Th|e backgr|
|000019f0| 6f 75 6e 64 20 76 61 6c | 75 65 73 20 6f 66 20 6f |ound val|ues of o|
|00001a00| 6e 65 20 74 6f 20 73 69 | 78 20 73 65 74 73 20 61 |ne to si|x sets a|
|00001a10| 20 62 6c 61 63 6b 20 62 | 61 63 6b 67 72 6f 75 6e | black b|ackgroun|
|00001a20| 64 20 61 6e 64 0d 0a 09 | 20 20 20 20 61 20 76 61 |d and...| a va|
|00001a30| 6c 75 65 20 6f 66 20 73 | 65 76 65 6e 20 73 65 74 |lue of s|even set|
|00001a40| 73 20 61 20 77 68 69 74 | 65 20 62 61 63 6b 67 72 |s a whit|e backgr|
|00001a50| 6f 75 6e 64 2e 20 49 66 | 20 74 68 65 20 62 61 63 |ound. If| the bac|
|00001a60| 6b 67 72 6f 75 6e 64 20 | 61 6e 64 0d 0a 0d 0a 09 |kground |and.....|
|00001a70| 20 20 20 20 66 6f 72 65 | 67 72 6f 75 6e 64 20 20 | fore|ground |
|00001a80| 20 76 61 6c 75 65 73 20 | 20 61 72 65 20 20 74 68 | values | are th|
|00001a90| 65 20 20 73 61 6d 65 2c | 20 20 74 68 65 20 20 63 |e same,| the c|
|00001aa0| 68 61 72 61 63 74 65 72 | 73 20 20 77 69 6c 6c 20 |haracter|s will |
|00001ab0| 20 62 65 0d 0a 09 20 20 | 20 20 69 6e 76 69 73 69 | be... | invisi|
|00001ac0| 62 6c 65 2e 0d 0a 0d 0a | 09 20 20 20 20 4f 6e 20 |ble.....|. On |
|00001ad0| 20 61 20 20 63 6f 6c 6f | 72 20 20 6d 6f 6e 69 74 | a colo|r monit|
|00001ae0| 6f 72 2c 20 20 74 68 65 | 20 20 66 6f 6c 6c 6f 77 |or, the| follow|
|00001af0| 69 6e 67 20 20 66 6f 72 | 65 67 72 6f 75 6e 64 20 |ing for|eground |
|00001b00| 20 63 6f 6c 6f 72 73 20 | 20 61 72 65 0d 0a 09 20 | colors | are... |
|00001b10| 20 20 20 61 76 61 69 6c | 61 62 6c 65 3a 0d 0a 0d | avail|able:...|
|00001b20| 0a 09 09 20 20 20 20 20 | 20 30 20 20 20 20 20 20 |... | 0 |
|00001b30| 20 20 42 6c 61 63 6b 20 | 20 20 20 38 20 20 20 20 | Black | 8 |
|00001b40| 20 20 20 20 47 72 61 79 | 0d 0a 09 09 20 20 20 20 | Gray|.... |
|00001b50| 20 20 31 20 20 20 20 20 | 20 20 20 42 6c 75 65 20 | 1 | Blue |
|00001b60| 20 20 20 20 39 20 20 20 | 20 20 20 20 20 4c 69 67 | 9 | Lig|
|00001b70| 68 74 20 42 6c 75 65 0d | 0a 09 09 20 20 20 20 20 |ht Blue.|... |
|00001b80| 20 32 20 20 20 20 20 20 | 20 20 47 72 65 65 6e 20 | 2 | Green |
|00001b90| 20 20 20 31 30 20 20 20 | 20 20 20 20 4c 69 67 68 | 10 | Ligh|
|00001ba0| 74 20 47 72 65 65 6e 0d | 0a 09 09 20 20 20 20 20 |t Green.|... |
|00001bb0| 20 33 20 20 20 20 20 20 | 20 20 43 79 61 6e 20 20 | 3 | Cyan |
|00001bc0| 20 20 20 31 31 20 20 20 | 20 20 20 20 4c 69 67 68 | 11 | Ligh|
|00001bd0| 74 20 43 79 61 6e 0d 0a | 09 09 20 20 20 20 20 20 |t Cyan..|.. |
|00001be0| 34 20 20 20 20 20 20 20 | 20 52 65 64 20 20 20 20 |4 | Red |
|00001bf0| 20 20 31 32 20 20 20 20 | 20 20 20 4c 69 67 68 74 | 12 | Light|
|00001c00| 20 52 65 64 0d 0a 09 09 | 20 20 20 20 20 20 35 20 | Red....| 5 |
|00001c10| 20 20 20 20 20 20 20 4d | 61 67 65 6e 74 61 20 20 | M|agenta |
|00001c20| 31 33 20 20 20 20 20 20 | 20 4c 69 67 68 74 20 4d |13 | Light M|
|00001c30| 61 67 65 6e 74 61 0d 0a | 09 09 20 20 20 20 20 20 |agenta..|.. |
|00001c40| 36 20 20 20 20 20 20 20 | 20 42 72 6f 77 6e 20 20 |6 | Brown |
|00001c50| 20 20 31 34 20 20 20 20 | 20 20 20 59 65 6c 6c 6f | 14 | Yello|
|00001c60| 77 0d 0a 09 09 20 20 20 | 20 20 20 37 20 20 20 20 |w.... | 7 |
|00001c70| 20 20 20 20 57 68 69 74 | 65 20 20 20 20 31 35 20 | Whit|e 15 |
|00001c80| 20 20 20 20 20 20 48 69 | 67 68 20 49 6e 74 65 6e | Hi|gh Inten|
|00001c90| 73 69 74 79 20 57 68 69 | 74 65 0d 0a 0d 0a 09 20 |sity Whi|te..... |
|00001ca0| 20 20 20 4e 6f 74 69 63 | 65 20 20 74 68 61 74 20 | Notic|e that |
|00001cb0| 62 79 20 61 64 64 69 6e | 67 20 65 69 67 68 74 20 |by addin|g eight |
|00001cc0| 74 6f 20 74 68 65 20 62 | 61 73 69 63 20 65 69 67 |to the b|asic eig|
|00001cd0| 68 74 20 63 6f 6c 6f 72 | 73 2c 20 61 20 6c 69 67 |ht color|s, a lig|
|00001ce0| 68 74 0d 0a 09 20 20 20 | 20 6f 72 20 68 69 67 68 |ht... | or high|
|00001cf0| 20 69 6e 74 65 6e 73 69 | 74 79 20 63 6f 6c 6f 72 | intensi|ty color|
|00001d00| 20 69 73 20 67 65 6e 65 | 72 61 74 65 64 2e 20 54 | is gene|rated. T|
|00001d10| 68 65 20 76 61 6c 75 65 | 20 63 61 6e 20 20 61 6c |he value| can al|
|00001d20| 73 6f 20 20 68 61 76 65 | 0d 0a 09 20 20 20 20 73 |so have|... s|
|00001d30| 69 78 74 65 65 6e 20 61 | 64 64 65 64 20 74 6f 20 |ixteen a|dded to |
|00001d40| 69 74 20 74 6f 20 70 72 | 6f 64 75 63 65 20 61 20 |it to pr|oduce a |
|00001d50| 62 6c 69 6e 6b 69 6e 67 | 20 63 68 61 72 61 63 74 |blinking| charact|
|00001d60| 65 72 2e 0d 0a 0d 0a 53 | 65 65 20 41 6c 73 6f 20 |er.....S|ee Also |
|00001d70| 20 20 20 20 20 20 20 0d | 0a 09 20 20 20 20 50 52 | .|.. PR|
|00001d80| 49 4e 54 0d 0a 09 20 20 | 20 20 57 49 4e 44 4f 57 |INT... | WINDOW|
|00001d90| 0d 0a 0d 0a 0d 0a 45 78 | 61 6d 70 6c 65 0d 0a 09 |......Ex|ample...|
|00001da0| 20 20 20 20 43 4f 4c 4f | 52 20 37 2c 30 0d 0a 09 | COLO|R 7,0...|
|00001db0| 20 20 20 20 50 52 49 4e | 54 20 22 4e 6f 72 6d 61 | PRIN|T "Norma|
|00001dc0| 6c 20 63 68 61 72 61 63 | 74 65 72 73 22 0d 0a 09 |l charac|ters"...|
|00001dd0| 20 20 20 20 43 4f 4c 4f | 52 20 30 2c 37 0d 0a 09 | COLO|R 0,7...|
|00001de0| 20 20 20 20 50 52 49 4e | 54 20 22 49 6e 76 65 72 | PRIN|T "Inver|
|00001df0| 73 65 20 63 68 61 72 61 | 63 74 65 72 73 22 0d 0a |se chara|cters"..|
|00001e00| 09 20 20 20 20 43 4f 4c | 4f 52 20 32 2b 31 36 2c |. COL|OR 2+16,|
|00001e10| 37 0d 0a 09 20 20 20 20 | 50 52 49 4e 54 20 22 42 |7... |PRINT "B|
|00001e20| 6c 69 6e 6b 69 6e 67 20 | 67 72 65 65 6e 20 63 68 |linking |green ch|
|00001e30| 61 72 61 63 74 65 72 73 | 20 6f 6e 20 61 20 77 68 |aracters| on a wh|
|00001e40| 69 74 65 20 62 61 63 6b | 67 72 6f 75 6e 64 22 0d |ite back|ground".|
|00001e50| 0a 09 20 20 20 20 43 4f | 4c 4f 52 20 31 32 2c 32 |.. CO|LOR 12,2|
|00001e60| 0d 0a 09 20 20 20 20 50 | 52 49 4e 54 20 22 4c 69 |... P|RINT "Li|
|00001e70| 67 68 74 20 72 65 64 20 | 63 68 61 72 61 63 74 65 |ght red |characte|
|00001e80| 72 73 20 6f 6e 20 67 72 | 65 65 6e 20 62 61 63 6b |rs on gr|een back|
|00001e90| 67 72 6f 75 6e 64 22 0d | 0a 09 20 20 20 20 43 4f |ground".|.. CO|
|00001ea0| 4c 4f 52 20 37 2c 30 20 | 20 20 20 20 27 20 62 61 |LOR 7,0 | ' ba|
|00001eb0| 63 6b 20 74 6f 20 6e 6f | 72 6d 61 6c 0d 0a 2a 45 |ck to no|rmal..*E|
|00001ec0| 4e 44 2a 0d 0a 0d 0a 53 | 75 6d 6d 61 72 79 20 20 |ND*....S|ummary |
|00001ed0| 20 20 20 43 4f 4d 4d 4f | 4e 20 56 61 72 69 61 62 | COMMO|N Variab|
|00001ee0| 6c 65 20 4c 69 73 74 0d | 0a 0d 0a 44 65 73 63 72 |le List.|...Descr|
|00001ef0| 69 70 74 69 6f 6e 20 54 | 68 69 73 20 20 73 74 61 |iption T|his sta|
|00001f00| 74 65 6d 65 6e 74 20 20 | 73 70 65 63 69 66 69 65 |tement |specifie|
|00001f10| 73 20 74 68 65 20 76 61 | 72 69 61 62 6c 65 73 20 |s the va|riables |
|00001f20| 74 6f 20 62 65 20 73 61 | 76 65 64 20 61 6e 64 20 |to be sa|ved and |
|00001f30| 70 61 73 73 65 64 0d 0a | 09 20 20 20 20 74 6f 20 |passed..|. to |
|00001f40| 74 68 65 20 63 68 61 69 | 6e 65 64 2d 74 6f 20 70 |the chai|ned-to p|
|00001f50| 72 6f 67 72 61 6d 2e 20 | 41 6c 6c 20 20 6f 74 68 |rogram. |All oth|
|00001f60| 65 72 20 20 76 61 72 69 | 61 62 6c 65 73 20 20 75 |er vari|ables u|
|00001f70| 73 65 64 20 20 62 79 20 | 20 74 68 65 0d 0a 09 20 |sed by | the... |
|00001f80| 20 20 20 70 72 6f 67 72 | 61 6d 20 20 61 72 65 20 | progr|am are |
|00001f90| 20 64 69 73 63 61 72 64 | 65 64 20 61 66 74 65 72 | discard|ed after|
|00001fa0| 20 61 20 43 48 41 49 4e | 20 73 74 61 74 65 6d 65 | a CHAIN| stateme|
|00001fb0| 6e 74 20 69 73 20 65 78 | 65 63 75 74 65 64 2e 20 |nt is ex|ecuted. |
|00001fc0| 49 66 0d 0a 09 20 20 20 | 20 61 6e 20 61 72 72 61 |If... | an arra|
|00001fd0| 79 20 76 61 72 69 61 62 | 6c 65 20 69 73 20 74 6f |y variab|le is to|
|00001fe0| 20 62 65 20 70 61 73 73 | 65 64 2c 20 69 74 20 6e | be pass|ed, it n|
|00001ff0| 65 65 64 73 20 74 6f 20 | 20 62 65 20 20 64 69 6d |eeds to | be dim|
|00002000| 65 6e 73 69 6f 6e 65 64 | 0d 0a 09 20 20 20 20 62 |ensioned|... b|
|00002010| 65 66 6f 72 65 20 74 68 | 65 20 43 4f 4d 4d 4f 4e |efore th|e COMMON|
|00002020| 20 73 74 61 74 65 6d 65 | 6e 74 2e 0d 0a 0d 0a 53 | stateme|nt.....S|
|00002030| 65 65 20 41 6c 73 6f 20 | 20 20 20 20 20 20 20 0d |ee Also | .|
|00002040| 0a 09 20 20 20 20 43 48 | 41 49 4e 0d 0a 09 20 20 |.. CH|AIN... |
|00002050| 20 20 44 49 4d 0d 0a 09 | 20 20 20 20 52 55 4e 0d | DIM...| RUN.|
|00002060| 0a 0d 0a 45 78 61 6d 70 | 6c 65 0d 0a 09 20 20 20 |...Examp|le... |
|00002070| 20 20 20 27 20 50 72 6f | 67 72 61 6d 20 50 52 4f | ' Pro|gram PRO|
|00002080| 47 31 2e 45 58 45 0d 0a | 09 20 20 20 20 43 4f 4d |G1.EXE..|. COM|
|00002090| 4d 4f 4e 20 41 24 2c 42 | 2c 43 25 0d 0a 09 20 20 |MON A$,B|,C%... |
|000020a0| 20 20 50 52 49 4e 54 20 | 22 49 6e 20 70 72 6f 67 | PRINT |"In prog|
|000020b0| 72 61 6d 20 23 31 22 0d | 0a 09 20 20 20 20 41 24 |ram #1".|.. A$|
|000020c0| 3d 22 47 65 6f 72 67 65 | 20 57 61 73 68 69 6e 67 |="George| Washing|
|000020d0| 74 6f 6e 22 0d 0a 09 20 | 20 20 20 42 3d 31 2e 35 |ton"... | B=1.5|
|000020e0| 0d 0a 09 20 20 20 20 43 | 25 3d 34 30 30 0d 0a 09 |... C|%=400...|
|000020f0| 20 20 20 20 43 48 41 49 | 4e 20 22 50 72 6f 67 32 | CHAI|N "Prog2|
|00002100| 22 0d 0a 0d 0a 09 20 20 | 20 20 20 20 27 20 50 72 |"..... | ' Pr|
|00002110| 6f 67 72 61 6d 20 50 52 | 4f 47 32 2e 43 48 4e 0d |ogram PR|OG2.CHN.|
|00002120| 0a 09 20 20 20 20 43 4f | 4d 4d 4f 4e 20 41 24 2c |.. CO|MMON A$,|
|00002130| 42 2c 43 25 0d 0a 09 20 | 20 20 20 50 52 49 4e 54 |B,C%... | PRINT|
|00002140| 20 22 49 6e 20 70 72 6f | 67 72 61 6d 20 23 32 22 | "In pro|gram #2"|
|00002150| 0d 0a 09 20 20 20 20 50 | 52 49 4e 54 20 41 24 2c |... P|RINT A$,|
|00002160| 42 2c 43 25 0d 0a 2a 45 | 4e 44 2a 0d 0a 0d 0a 53 |B,C%..*E|ND*....S|
|00002170| 75 6d 6d 61 72 79 20 20 | 20 20 20 43 4f 4e 53 54 |ummary | CONST|
|00002180| 20 49 64 65 6e 74 69 66 | 69 65 72 20 3d 20 43 6f | Identif|ier = Co|
|00002190| 6e 73 74 61 6e 74 20 45 | 78 70 72 65 73 73 69 6f |nstant E|xpressio|
|000021a0| 6e 0d 0a 0d 0a 44 65 73 | 63 72 69 70 74 69 6f 6e |n....Des|cription|
|000021b0| 20 54 68 69 73 20 20 73 | 74 61 74 65 6d 65 6e 74 | This s|tatement|
|000021c0| 20 20 61 6c 6c 6f 77 73 | 20 6e 75 6d 65 72 69 63 | allows| numeric|
|000021d0| 20 63 6f 6e 73 74 61 6e | 74 73 20 74 6f 20 62 65 | constan|ts to be|
|000021e0| 20 61 73 73 69 67 6e 65 | 64 20 6e 61 6d 65 73 2e | assigne|d names.|
|000021f0| 0d 0a 09 20 20 20 20 54 | 68 69 73 20 6d 61 6b 65 |... T|his make|
|00002200| 73 20 70 72 6f 67 72 61 | 6d 73 20 65 61 73 69 65 |s progra|ms easie|
|00002210| 72 20 74 6f 20 63 68 61 | 6e 67 65 20 69 66 20 74 |r to cha|nge if t|
|00002220| 68 65 20 20 63 6f 6e 73 | 74 61 6e 74 20 20 69 73 |he cons|tant is|
|00002230| 20 20 75 73 65 64 0d 0a | 09 20 20 20 20 77 69 74 | used..|. wit|
|00002240| 68 69 6e 20 20 6e 6f 72 | 6d 61 6c 20 65 78 70 72 |hin nor|mal expr|
|00002250| 65 73 73 69 6f 6e 73 2e | 20 41 6e 79 20 70 6c 61 |essions.| Any pla|
|00002260| 63 65 20 74 68 61 74 20 | 72 65 71 75 69 72 65 73 |ce that |requires|
|00002270| 20 61 20 63 6f 6e 73 74 | 61 6e 74 2c 0d 0a 09 20 | a const|ant,... |
|00002280| 20 20 20 73 75 63 68 20 | 61 73 20 20 44 49 4d 65 | such |as DIMe|
|00002290| 6e 73 69 6f 6e 69 6e 67 | 20 20 61 20 20 76 61 72 |nsioning| a var|
|000022a0| 69 61 62 6c 65 2c 20 20 | 77 69 6c 6c 20 20 74 61 |iable, |will ta|
|000022b0| 6b 65 20 20 61 20 20 43 | 4f 4e 53 54 2e 20 20 54 |ke a C|ONST. T|
|000022c0| 68 65 0d 0a 09 20 20 20 | 20 43 6f 6e 73 74 61 6e |he... | Constan|
|000022d0| 74 20 20 45 78 70 72 65 | 73 73 69 6f 6e 20 20 69 |t Expre|ssion i|
|000022e0| 73 20 20 61 6e 20 65 78 | 70 72 65 73 73 69 6f 6e |s an ex|pression|
|000022f0| 20 74 68 61 74 20 69 73 | 20 6d 61 64 65 20 75 70 | that is| made up|
|00002300| 20 6f 66 20 63 6f 6e 2d | 0d 0a 09 20 20 20 20 73 | of con-|... s|
|00002310| 74 61 6e 74 20 76 61 72 | 69 61 62 6c 65 73 20 6f |tant var|iables o|
|00002320| 72 20 6c 69 74 65 72 61 | 6c 20 6e 75 6d 62 65 72 |r litera|l number|
|00002330| 73 2e 20 54 68 65 20 20 | 41 70 42 61 73 69 63 20 |s. The |ApBasic |
|00002340| 20 63 6f 6d 70 69 6c 65 | 72 20 20 61 74 2d 0d 0a | compile|r at-..|
|00002350| 09 20 20 20 20 74 65 6d | 70 74 73 20 20 74 6f 20 |. tem|pts to |
|00002360| 63 6f 6e 76 65 72 74 20 | 61 6c 6c 20 65 78 70 72 |convert |all expr|
|00002370| 65 73 73 69 6f 6e 73 20 | 74 6f 20 63 6f 6e 73 74 |essions |to const|
|00002380| 61 6e 74 73 20 74 6f 20 | 6d 69 6e 69 6d 69 7a 65 |ants to |minimize|
|00002390| 20 65 78 2d 0d 0a 09 20 | 20 20 20 65 63 75 74 69 | ex-... | ecuti|
|000023a0| 6f 6e 20 73 70 65 65 64 | 20 61 6e 64 20 63 6f 64 |on speed| and cod|
|000023b0| 65 20 73 69 7a 65 2e 0d | 0a 0d 0a 53 65 65 20 41 |e size..|...See A|
|000023c0| 6c 73 6f 20 20 20 20 20 | 20 20 20 0d 0a 09 20 20 |lso | ... |
|000023d0| 20 20 44 49 4d 0d 0a 0d | 0a 45 78 61 6d 70 6c 65 | DIM...|.Example|
|000023e0| 0d 0a 09 20 20 20 20 20 | 20 27 20 4d 61 78 69 6d |... | ' Maxim|
|000023f0| 75 6d 20 6e 75 6d 62 65 | 72 20 6f 66 20 6e 61 6d |um numbe|r of nam|
|00002400| 65 73 0d 0a 09 20 20 20 | 20 43 4f 4e 53 54 20 4d |es... | CONST M|
|00002410| 61 78 2e 4e 61 6d 65 73 | 20 3d 20 31 30 0d 0a 0d |ax.Names| = 10...|
|00002420| 0a 09 20 20 20 20 44 49 | 4d 20 4d 65 6d 62 65 72 |.. DI|M Member|
|00002430| 2e 4e 61 6d 65 73 24 28 | 31 20 54 4f 20 4d 61 78 |.Names$(|1 TO Max|
|00002440| 2e 4e 61 6d 65 73 29 0d | 0a 09 20 20 20 20 46 4f |.Names).|.. FO|
|00002450| 52 20 49 25 3d 31 20 74 | 6f 20 4d 61 78 2e 4e 61 |R I%=1 t|o Max.Na|
|00002460| 6d 65 73 0d 0a 09 20 20 | 20 20 20 20 50 52 49 4e |mes... | PRIN|
|00002470| 54 20 22 45 6e 74 65 72 | 20 6d 65 6d 62 65 72 20 |T "Enter| member |
|00002480| 6e 61 6d 65 20 23 22 3b | 49 25 3b 22 20 6f 66 20 |name #";|I%;" of |
|00002490| 22 3b 4d 61 78 2e 4e 61 | 6d 65 73 3b 22 20 20 3a |";Max.Na|mes;" :|
|000024a0| 22 3b 0d 0a 0d 0a 09 20 | 20 20 20 20 20 49 4e 50 |";..... | INP|
|000024b0| 55 54 20 4d 65 6d 62 65 | 72 2e 4e 61 6d 65 73 24 |UT Membe|r.Names$|
|000024c0| 28 49 25 29 0d 0a 09 20 | 20 20 20 4e 45 58 54 20 |(I%)... | NEXT |
|000024d0| 49 25 0d 0a 2a 45 4e 44 | 2a 0d 0a 0d 0a 53 75 6d |I%..*END|*....Sum|
|000024e0| 6d 61 72 79 20 20 20 20 | 20 43 4f 4e 54 49 4e 55 |mary | CONTINU|
|000024f0| 45 20 44 4f 0d 0a 0d 0a | 44 65 73 63 72 69 70 74 |E DO....|Descript|
|00002500| 69 6f 6e 20 46 6f 72 63 | 65 73 20 65 78 65 63 75 |ion Forc|es execu|
|00002510| 74 69 6f 6e 20 6f 66 20 | 61 20 44 4f 2f 4c 4f 4f |tion of |a DO/LOO|
|00002520| 50 20 74 6f 20 73 74 61 | 72 74 20 6f 76 65 72 20 |P to sta|rt over |
|00002530| 62 61 63 6b 20 61 74 20 | 74 68 65 20 74 6f 70 2e |back at |the top.|
|00002540| 0d 0a 0d 0a 53 65 65 20 | 41 6c 73 6f 20 20 20 20 |....See |Also |
|00002550| 20 20 20 20 0d 0a 09 20 | 20 20 20 44 4f 2f 4c 4f | ... | DO/LO|
|00002560| 4f 50 0d 0a 09 20 20 20 | 20 45 58 49 54 20 44 4f |OP... | EXIT DO|
|00002570| 0d 0a 0d 0a 45 78 61 6d | 70 6c 65 0d 0a 09 20 20 |....Exam|ple... |
|00002580| 20 20 20 20 27 20 54 65 | 73 74 20 44 4f 20 4c 4f | ' Te|st DO LO|
|00002590| 4f 50 0d 0a 09 20 20 20 | 20 44 4f 0d 0a 09 20 20 |OP... | DO... |
|000025a0| 20 20 20 20 49 4e 50 55 | 54 20 22 45 6e 74 65 72 | INPU|T "Enter|
|000025b0| 20 61 20 6e 75 6d 62 65 | 72 20 62 65 74 77 65 65 | a numbe|r betwee|
|000025c0| 6e 20 31 20 61 6e 64 20 | 31 30 30 2e 20 28 30 3d |n 1 and |100. (0=|
|000025d0| 73 74 6f 70 29 20 22 3b | 4e 75 6d 62 65 72 0d 0a |stop) ";|Number..|
|000025e0| 09 20 20 20 20 20 20 49 | 46 20 4e 75 6d 62 65 72 |. I|F Number|
|000025f0| 3c 30 20 4f 52 20 4e 75 | 6d 62 65 72 3e 31 30 30 |<0 OR Nu|mber>100|
|00002600| 20 54 48 45 4e 0d 0a 09 | 09 43 4f 4e 54 49 4e 55 | THEN...|.CONTINU|
|00002610| 45 20 44 4f 0d 0a 09 20 | 20 20 20 20 20 45 4e 44 |E DO... | END|
|00002620| 20 49 46 0d 0a 09 20 20 | 20 20 20 20 49 46 20 4e | IF... | IF N|
|00002630| 75 6d 62 65 72 3d 30 20 | 54 48 45 4e 0d 0a 09 09 |umber=0 |THEN....|
|00002640| 45 58 49 54 20 44 4f 0d | 0a 09 20 20 20 20 20 20 |EXIT DO.|.. |
|00002650| 45 4e 44 20 49 46 0d 0a | 09 20 20 20 20 20 20 50 |END IF..|. P|
|00002660| 52 49 4e 54 20 4e 75 6d | 62 65 72 0d 0a 09 20 20 |RINT Num|ber... |
|00002670| 20 20 4c 4f 4f 50 0d 0a | 2a 45 4e 44 2a 0d 0a 0d | LOOP..|*END*...|
|00002680| 0a 53 75 6d 6d 61 72 79 | 20 20 20 20 20 43 4f 4e |.Summary| CON|
|00002690| 54 49 4e 55 45 20 46 4f | 52 0d 0a 0d 0a 44 65 73 |TINUE FO|R....Des|
|000026a0| 63 72 69 70 74 69 6f 6e | 20 46 6f 72 63 65 73 20 |cription| Forces |
|000026b0| 65 78 65 63 75 74 69 6f | 6e 20 6f 66 20 61 20 20 |executio|n of a |
|000026c0| 46 4f 52 2f 4e 45 58 54 | 20 20 6c 6f 6f 70 20 20 |FOR/NEXT| loop |
|000026d0| 74 6f 20 20 64 6f 20 20 | 74 68 65 20 20 6e 65 78 |to do |the nex|
|000026e0| 74 20 20 6c 6f 6f 70 2e | 0d 0a 09 20 20 20 20 46 |t loop.|... F|
|000026f0| 4f 52 2f 4e 45 58 54 20 | 20 6c 6f 6f 70 73 20 20 |OR/NEXT | loops |
|00002700| 63 61 6e 20 68 61 76 65 | 20 6f 6e 6c 79 20 6f 6e |can have| only on|
|00002710| 65 20 4e 45 58 54 20 73 | 74 61 74 65 6d 65 6e 74 |e NEXT s|tatement|
|00002720| 2e 20 54 68 65 20 43 4f | 4e 54 49 4e 55 45 0d 0a |. The CO|NTINUE..|
|00002730| 09 20 20 20 20 46 4f 52 | 20 73 74 61 74 65 6d 65 |. FOR| stateme|
|00002740| 6e 74 20 69 73 20 61 20 | 77 61 79 20 6f 66 20 6a |nt is a |way of j|
|00002750| 75 6d 70 69 6e 67 20 20 | 64 6f 77 6e 20 20 74 6f |umping |down to|
|00002760| 20 20 74 68 65 20 20 63 | 6f 72 72 65 73 70 6f 6e | the c|orrespon|
|00002770| 64 69 6e 67 0d 0a 09 20 | 20 20 20 4e 45 58 54 20 |ding... | NEXT |
|00002780| 73 74 61 74 65 6d 65 6e | 74 20 77 69 74 68 6f 75 |statemen|t withou|
|00002790| 74 20 68 61 76 69 6e 67 | 20 74 6f 20 64 65 63 6c |t having| to decl|
|000027a0| 61 72 65 20 61 20 6c 61 | 62 65 6c 2e 0d 0a 0d 0a |are a la|bel.....|
|000027b0| 53 65 65 20 41 6c 73 6f | 20 20 20 20 20 20 20 20 |See Also| |
|000027c0| 0d 0a 09 20 20 20 20 46 | 4f 52 2f 4e 45 58 54 0d |... F|OR/NEXT.|
|000027d0| 0a 09 20 20 20 20 45 58 | 49 54 20 46 4f 52 0d 0a |.. EX|IT FOR..|
|000027e0| 0d 0a 45 78 61 6d 70 6c | 65 0d 0a 09 20 20 20 20 |..Exampl|e... |
|000027f0| 20 20 27 20 54 65 73 74 | 20 46 6f 72 20 4e 65 78 | ' Test| For Nex|
|00002800| 74 20 6c 6f 6f 70 0d 0a | 09 20 20 20 20 46 4f 52 |t loop..|. FOR|
|00002810| 20 49 3d 31 20 54 4f 20 | 32 35 0d 0a 09 20 20 20 | I=1 TO |25... |
|00002820| 20 20 20 49 46 20 28 49 | 20 4d 4f 44 20 35 29 3d | IF (I| MOD 5)=|
|00002830| 30 20 54 48 45 4e 0d 0a | 09 09 43 4f 4e 54 49 4e |0 THEN..|..CONTIN|
|00002840| 55 45 20 46 4f 52 20 20 | 20 20 20 20 20 20 27 20 |UE FOR | ' |
|00002850| 53 6b 69 70 20 6d 75 6c | 74 69 70 6c 65 73 20 6f |Skip mul|tiples o|
|00002860| 66 20 35 0d 0a 09 20 20 | 20 20 20 20 45 4e 44 20 |f 5... | END |
|00002870| 49 46 0d 0a 09 20 20 20 | 20 20 20 50 52 49 4e 54 |IF... | PRINT|
|00002880| 20 49 0d 0a 09 20 20 20 | 20 4e 45 58 54 20 49 0d | I... | NEXT I.|
|00002890| 0a 2a 45 4e 44 2a 0d 0a | 0d 0a 53 75 6d 6d 61 72 |.*END*..|..Summar|
|000028a0| 79 20 20 20 20 20 43 4f | 4e 54 49 4e 55 45 20 57 |y CO|NTINUE W|
|000028b0| 48 49 4c 45 0d 0a 0d 0a | 44 65 73 63 72 69 70 74 |HILE....|Descript|
|000028c0| 69 6f 6e 20 46 6f 72 63 | 65 73 20 20 65 78 65 63 |ion Forc|es exec|
|000028d0| 75 74 69 6f 6e 20 20 74 | 6f 20 20 73 74 61 72 74 |ution t|o start|
|000028e0| 20 20 62 61 63 6b 20 20 | 61 74 20 20 74 68 65 20 | back |at the |
|000028f0| 20 74 6f 70 20 6f 66 20 | 74 68 65 20 63 75 72 72 | top of |the curr|
|00002900| 65 6e 74 0d 0a 09 20 20 | 20 20 57 48 49 4c 45 2f |ent... | WHILE/|
|00002910| 57 45 4e 44 20 6c 6f 6f | 70 2e 0d 0a 0d 0a 53 65 |WEND loo|p.....Se|
|00002920| 65 20 41 6c 73 6f 20 20 | 20 20 20 20 20 20 0d 0a |e Also | ..|
|00002930| 09 20 20 20 20 57 48 49 | 4c 45 2f 57 45 4e 44 0d |. WHI|LE/WEND.|
|00002940| 0a 09 20 20 20 20 45 58 | 49 54 20 57 48 49 4c 45 |.. EX|IT WHILE|
|00002950| 0d 0a 0d 0a 45 78 61 6d | 70 6c 65 0d 0a 09 20 20 |....Exam|ple... |
|00002960| 20 20 20 20 27 20 57 61 | 69 74 20 66 6f 72 20 61 | ' Wa|it for a|
|00002970| 20 6e 75 6d 62 65 72 20 | 74 68 65 6e 20 70 72 69 | number |then pri|
|00002980| 6e 74 20 69 74 20 6f 75 | 74 0d 0a 09 20 20 20 20 |nt it ou|t... |
|00002990| 57 48 49 4c 45 20 31 20 | 20 20 20 20 20 20 27 20 |WHILE 1 | ' |
|000029a0| 46 6f 72 65 76 65 72 0d | 0a 09 20 20 20 20 20 20 |Forever.|.. |
|000029b0| 43 68 61 72 24 3d 49 4e | 4b 45 59 24 0d 0a 09 20 |Char$=IN|KEY$... |
|000029c0| 20 20 20 20 20 49 46 20 | 43 68 61 72 24 3c 22 30 | IF |Char$<"0|
|000029d0| 22 20 4f 52 20 43 68 61 | 72 24 3e 22 39 22 20 54 |" OR Cha|r$>"9" T|
|000029e0| 48 45 4e 0d 0a 09 09 43 | 4f 4e 54 49 4e 55 45 20 |HEN....C|ONTINUE |
|000029f0| 57 48 49 4c 45 0d 0a 09 | 20 20 20 20 20 20 45 4e |WHILE...| EN|
|00002a00| 44 20 49 46 0d 0a 09 20 | 20 20 20 20 20 50 52 49 |D IF... | PRI|
|00002a10| 4e 54 20 43 68 61 72 24 | 0d 0a 09 20 20 20 20 20 |NT Char$|... |
|00002a20| 20 45 58 49 54 20 57 48 | 49 4c 45 0d 0a 09 20 20 | EXIT WH|ILE... |
|00002a30| 20 20 57 45 4e 44 0d 0a | 2a 45 4e 44 2a 0d 0a 0d | WEND..|*END*...|
|00002a40| 0a 53 75 6d 6d 61 72 79 | 20 20 20 20 20 44 41 54 |.Summary| DAT|
|00002a50| 41 20 43 6f 6e 73 74 61 | 6e 74 20 5b 2c 43 6f 6e |A Consta|nt [,Con|
|00002a60| 73 74 61 6e 74 2e 2e 2e | 2e 5d 0d 0a 0d 0a 44 65 |stant...|.]....De|
|00002a70| 73 63 72 69 70 74 69 6f | 6e 20 54 68 69 73 20 73 |scriptio|n This s|
|00002a80| 74 61 74 65 6d 65 6e 74 | 20 64 65 66 69 6e 65 73 |tatement| defines|
|00002a90| 20 63 6f 6e 73 74 61 6e | 74 20 64 61 74 61 20 74 | constan|t data t|
|00002aa0| 68 61 74 20 77 69 6c 6c | 20 62 65 20 72 65 61 64 |hat will| be read|
|00002ab0| 20 20 62 79 20 20 74 68 | 65 0d 0a 09 20 20 20 20 | by th|e... |
|00002ac0| 70 72 6f 67 72 61 6d 20 | 61 74 20 72 75 6e 2d 74 |program |at run-t|
|00002ad0| 69 6d 65 2e 20 54 68 65 | 20 63 6f 6e 73 74 61 6e |ime. The| constan|
|00002ae0| 74 20 64 61 74 61 20 6d | 61 79 20 62 65 20 65 69 |t data m|ay be ei|
|00002af0| 74 68 65 72 20 6e 75 6d | 65 72 69 63 20 6f 72 0d |ther num|eric or.|
|00002b00| 0a 09 20 20 20 20 73 74 | 72 69 6e 67 20 62 75 74 |.. st|ring but|
|00002b10| 20 6d 75 73 74 20 62 65 | 20 72 65 61 64 20 69 6e | must be| read in|
|00002b20| 74 6f 20 74 68 65 20 63 | 6f 72 72 65 63 74 20 76 |to the c|orrect v|
|00002b30| 61 72 69 61 62 6c 65 20 | 74 79 70 65 20 77 68 65 |ariable |type whe|
|00002b40| 6e 20 74 68 65 0d 0a 09 | 20 20 20 20 70 72 6f 67 |n the...| prog|
|00002b50| 72 61 6d 20 20 69 73 20 | 20 72 75 6e 20 20 6f 72 |ram is | run or|
|00002b60| 20 20 61 20 20 72 75 6e | 2d 74 69 6d 65 20 65 72 | a run|-time er|
|00002b70| 72 6f 72 20 77 69 6c 6c | 20 6f 63 63 75 72 2e 20 |ror will| occur. |
|00002b80| 49 66 20 61 20 73 74 72 | 69 6e 67 0d 0a 09 20 20 |If a str|ing... |
|00002b90| 20 20 63 6f 6e 73 74 61 | 6e 74 20 69 73 20 64 65 | consta|nt is de|
|00002ba0| 63 6c 61 72 65 64 2c 20 | 69 74 20 6d 75 73 74 20 |clared, |it must |
|00002bb0| 62 65 20 65 6e 63 6c 6f | 73 65 64 20 69 6e 20 71 |be enclo|sed in q|
|00002bc0| 75 6f 74 65 73 20 69 66 | 20 69 74 20 20 63 6f 6e |uotes if| it con|
|00002bd0| 2d 0d 0a 09 20 20 20 20 | 74 61 69 6e 73 20 20 61 |-... |tains a|
|00002be0| 6e 79 20 20 6c 65 61 64 | 69 6e 67 20 20 6f 72 20 |ny lead|ing or |
|00002bf0| 74 72 61 69 6c 69 6e 67 | 20 73 70 61 63 65 73 2c |trailing| spaces,|
|00002c00| 20 63 6f 6d 6d 61 73 20 | 6f 72 20 73 69 6e 67 6c | commas |or singl|
|00002c10| 65 20 71 75 6f 74 65 0d | 0a 09 20 20 20 20 6d 61 |e quote.|.. ma|
|00002c20| 72 6b 73 2e 20 49 66 20 | 6e 6f 74 2c 20 74 68 65 |rks. If |not, the|
|00002c30| 20 73 70 61 63 65 73 20 | 77 69 6c 6c 20 62 65 20 | spaces |will be |
|00002c40| 73 74 72 69 70 70 65 64 | 2c 20 74 68 65 20 76 61 |stripped|, the va|
|00002c50| 6c 75 65 20 20 77 69 6c | 6c 20 20 62 65 0d 0a 09 |lue wil|l be...|
|00002c60| 20 20 20 20 72 65 61 64 | 20 20 75 70 20 74 6f 20 | read| up to |
|00002c70| 74 68 65 20 66 69 72 73 | 74 20 63 6f 6d 6d 61 20 |the firs|t comma |
|00002c80| 61 6e 64 20 61 6c 6c 20 | 64 61 74 61 20 61 66 74 |and all |data aft|
|00002c90| 65 72 20 74 68 65 20 73 | 69 6e 67 6c 65 20 71 75 |er the s|ingle qu|
|00002ca0| 6f 74 65 0d 0a 09 20 20 | 20 20 77 69 6c 6c 20 62 |ote... | will b|
|00002cb0| 65 20 69 67 6e 6f 72 65 | 64 2e 0d 0a 0d 0a 53 65 |e ignore|d.....Se|
|00002cc0| 65 20 41 6c 73 6f 20 20 | 20 20 20 20 20 20 0d 0a |e Also | ..|
|00002cd0| 09 20 20 20 20 52 45 41 | 44 0d 0a 09 20 20 20 20 |. REA|D... |
|00002ce0| 52 45 53 54 4f 52 45 0d | 0a 0d 0a 45 78 61 6d 70 |RESTORE.|...Examp|
|00002cf0| 6c 65 0d 0a 09 20 20 20 | 20 20 20 27 20 50 72 6f |le... | ' Pro|
|00002d00| 67 72 61 6d 20 74 6f 20 | 72 65 61 64 20 6e 61 6d |gram to |read nam|
|00002d10| 65 73 20 61 6e 64 20 73 | 63 6f 72 65 73 0d 0a 09 |es and s|cores...|
|00002d20| 20 20 20 20 20 20 27 20 | 61 6e 64 20 67 69 76 65 | ' |and give|
|00002d30| 20 74 68 65 20 61 76 65 | 72 61 67 65 73 0d 0a 09 | the ave|rages...|
|00002d40| 20 20 20 20 44 45 46 49 | 4e 54 20 41 2d 5a 0d 0a | DEFI|NT A-Z..|
|00002d50| 09 20 20 20 20 50 52 49 | 4e 54 20 22 41 76 65 72 |. PRI|NT "Aver|
|00002d60| 61 67 65 20 53 63 6f 72 | 65 20 70 72 6f 67 72 61 |age Scor|e progra|
|00002d70| 6d 22 0d 0a 0d 0a 09 20 | 20 20 20 50 52 49 4e 54 |m"..... | PRINT|
|00002d80| 0d 0a 09 20 20 20 20 52 | 45 53 54 4f 52 45 20 20 |... R|ESTORE |
|00002d90| 20 20 27 20 52 65 73 74 | 6f 72 65 20 74 68 65 20 | ' Rest|ore the |
|00002da0| 44 41 54 41 20 70 6f 69 | 6e 74 65 72 0d 0a 09 20 |DATA poi|nter... |
|00002db0| 20 20 20 46 4f 52 20 4e | 3d 31 20 74 6f 20 33 0d | FOR N|=1 to 3.|
|00002dc0| 0a 09 20 20 20 20 20 20 | 52 45 41 44 20 4d 65 6d |.. |READ Mem|
|00002dd0| 62 65 72 4e 61 6d 65 24 | 2c 53 63 6f 72 65 31 2c |berName$|,Score1,|
|00002de0| 53 63 6f 72 65 32 2c 53 | 63 6f 72 65 33 0d 0a 09 |Score2,S|core3...|
|00002df0| 20 20 20 20 20 20 50 52 | 49 4e 54 20 22 4d 65 6d | PR|INT "Mem|
|00002e00| 62 65 72 27 73 20 6e 61 | 6d 65 20 5b 22 3b 4d 65 |ber's na|me [";Me|
|00002e10| 6d 62 65 72 4e 61 6d 65 | 24 3b 22 5d 20 20 41 76 |mberName|$;"] Av|
|00002e20| 65 72 61 67 65 3d 22 3b | 0d 0a 09 20 20 20 20 20 |erage=";|... |
|00002e30| 20 50 52 49 4e 54 20 28 | 53 63 6f 72 65 31 2b 53 | PRINT (|Score1+S|
|00002e40| 63 6f 72 65 32 2b 53 63 | 6f 72 65 33 29 2f 33 0d |core2+Sc|ore3)/3.|
|00002e50| 0a 09 20 20 20 20 4e 45 | 58 54 20 4e 0d 0a 09 20 |.. NE|XT N... |
|00002e60| 20 20 20 44 41 54 41 20 | 22 46 72 65 64 20 53 6d | DATA |"Fred Sm|
|00002e70| 69 74 68 22 2c 31 34 35 | 2c 31 33 30 2c 31 38 30 |ith",145|,130,180|
|00002e80| 0d 0a 09 20 20 20 20 44 | 41 54 41 20 22 4a 6f 68 |... D|ATA "Joh|
|00002e90| 6e 20 44 6f 65 22 2c 31 | 31 32 2c 31 33 30 2c 31 |n Doe",1|12,130,1|
|00002ea0| 37 34 0d 0a 09 20 20 20 | 20 44 41 54 41 20 22 53 |74... | DATA "S|
|00002eb0| 61 72 61 68 20 44 6f 65 | 22 2c 31 34 30 2c 31 34 |arah Doe|",140,14|
|00002ec0| 35 2c 31 34 38 0d 0a 2a | 45 4e 44 2a 0d 0a 0d 0a |5,148..*|END*....|
|00002ed0| 53 75 6d 6d 61 72 79 20 | 20 20 20 20 44 45 43 52 |Summary | DECR|
|00002ee0| 20 56 61 72 69 61 62 6c | 65 20 5b 2c 4e 75 6d 65 | Variabl|e [,Nume|
|00002ef0| 72 69 63 20 45 78 70 72 | 65 73 73 69 6f 6e 5d 0d |ric Expr|ession].|
|00002f00| 0a 0d 0a 44 65 73 63 72 | 69 70 74 69 6f 6e 20 54 |...Descr|iption T|
|00002f10| 68 69 73 20 73 74 61 74 | 65 6d 65 6e 74 20 73 75 |his stat|ement su|
|00002f20| 62 74 72 61 63 74 73 20 | 74 68 65 20 6e 75 6d 65 |btracts |the nume|
|00002f30| 72 69 63 20 65 78 70 72 | 65 73 73 69 6f 6e 20 72 |ric expr|ession r|
|00002f40| 65 73 75 6c 74 20 66 72 | 6f 6d 20 74 68 65 0d 0a |esult fr|om the..|
|00002f50| 09 20 20 20 20 76 61 72 | 69 61 62 6c 65 2e 20 20 |. var|iable. |
|00002f60| 54 68 65 20 76 61 72 69 | 61 62 6c 65 20 6d 75 73 |The vari|able mus|
|00002f70| 74 20 62 65 20 61 20 6e | 75 6d 65 72 69 63 20 74 |t be a n|umeric t|
|00002f80| 79 70 65 2e 20 54 68 65 | 20 6e 75 6d 65 72 69 63 |ype. The| numeric|
|00002f90| 20 65 78 2d 0d 0a 09 20 | 20 20 20 70 72 65 73 73 | ex-... | press|
|00002fa0| 69 6f 6e 20 69 73 20 6f | 70 74 69 6f 6e 61 6c 20 |ion is o|ptional |
|00002fb0| 61 6e 64 20 64 65 66 61 | 75 6c 74 73 20 74 6f 20 |and defa|ults to |
|00002fc0| 6f 6e 65 20 28 31 29 20 | 69 66 20 6f 6d 69 74 74 |one (1) |if omitt|
|00002fd0| 65 64 2e 0d 0a 0d 0a 53 | 65 65 20 41 6c 73 6f 20 |ed.....S|ee Also |
|00002fe0| 20 20 20 20 20 20 20 0d | 0a 09 20 20 20 20 49 4e | .|.. IN|
|00002ff0| 43 52 0d 0a 0d 0a 45 78 | 61 6d 70 6c 65 0d 0a 09 |CR....Ex|ample...|
|00003000| 20 20 20 20 41 6e 73 77 | 65 72 24 3d 22 59 22 0d | Answ|er$="Y".|
|00003010| 0a 09 20 20 20 20 43 6f | 75 6e 74 65 72 25 3d 35 |.. Co|unter%=5|
|00003020| 0d 0a 09 20 20 20 20 20 | 20 27 20 4c 6f 6f 70 20 |... | ' Loop |
|00003030| 77 68 69 6c 65 20 61 6e | 73 77 65 72 20 69 73 20 |while an|swer is |
|00003040| 79 65 73 20 61 6e 64 20 | 6f 6e 6c 79 20 35 20 65 |yes and |only 5 e|
|00003050| 6e 74 65 72 65 64 0d 0a | 09 20 20 20 20 57 48 49 |ntered..|. WHI|
|00003060| 4c 45 20 41 6e 73 77 65 | 72 24 3d 22 59 22 20 41 |LE Answe|r$="Y" A|
|00003070| 4e 44 20 43 6f 75 6e 74 | 65 72 25 3c 3e 30 0d 0a |ND Count|er%<>0..|
|00003080| 09 20 20 20 20 20 20 44 | 45 43 52 20 43 6f 75 6e |. D|ECR Coun|
|00003090| 74 65 72 25 0d 0a 09 20 | 20 20 20 20 20 49 4e 50 |ter%... | INP|
|000030a0| 55 54 20 22 45 6e 74 65 | 72 20 61 20 6e 75 6d 62 |UT "Ente|r a numb|
|000030b0| 65 72 20 22 3b 6e 75 6d | 62 65 72 0d 0a 09 20 20 |er ";num|ber... |
|000030c0| 20 20 20 20 50 52 49 4e | 54 20 22 59 6f 75 20 65 | PRIN|T "You e|
|000030d0| 6e 74 65 72 65 64 20 61 | 20 22 3b 6e 75 6d 62 65 |ntered a| ";numbe|
|000030e0| 72 0d 0a 09 20 20 20 20 | 20 20 49 4e 50 55 54 20 |r... | INPUT |
|000030f0| 22 44 6f 20 79 6f 75 20 | 77 61 6e 74 20 74 6f 20 |"Do you |want to |
|00003100| 67 6f 20 61 67 61 69 6e | 20 28 59 2f 4e 29 20 22 |go again| (Y/N) "|
|00003110| 3b 41 6e 73 77 65 72 24 | 0d 0a 09 20 20 20 20 57 |;Answer$|... W|
|00003120| 45 4e 44 0d 0a 2a 45 4e | 44 2a 0d 0a 0d 0a 53 75 |END..*EN|D*....Su|
|00003130| 6d 6d 61 72 79 20 20 20 | 20 20 44 45 46 20 49 64 |mmary | DEF Id|
|00003140| 65 6e 74 69 66 69 65 72 | 20 28 5b 41 72 67 75 6d |entifier| ([Argum|
|00003150| 65 6e 74 20 4c 69 73 74 | 5d 29 0d 0a 09 20 20 20 |ent List|])... |
|00003160| 20 20 20 27 20 53 74 61 | 74 65 6d 65 6e 74 73 0d | ' Sta|tements.|
|00003170| 0a 09 20 20 20 20 45 4e | 44 20 44 45 46 0d 0a 0d |.. EN|D DEF...|
|00003180| 0a 44 65 73 63 72 69 70 | 74 69 6f 6e 20 43 72 65 |.Descrip|tion Cre|
|00003190| 61 74 65 73 20 61 20 75 | 73 65 72 20 64 65 66 69 |ates a u|ser defi|
|000031a0| 6e 65 64 20 66 75 6e 63 | 74 69 6f 6e 2e 20 46 75 |ned func|tion. Fu|
|000031b0| 6e 63 74 69 6f 6e 73 20 | 77 69 6c 6c 20 72 65 74 |nctions |will ret|
|000031c0| 75 72 6e 20 65 69 74 68 | 65 72 20 61 0d 0a 09 20 |urn eith|er a... |
|000031d0| 20 20 20 73 74 72 69 6e | 67 2c 20 20 72 65 61 6c | strin|g, real|
|000031e0| 20 20 6f 72 20 69 6e 74 | 65 67 65 72 20 76 61 6c | or int|eger val|
|000031f0| 75 65 2e 20 54 68 65 20 | 69 64 65 6e 74 69 66 69 |ue. The |identifi|
|00003200| 65 72 20 63 61 6e 20 62 | 65 20 66 6f 6c 6c 6f 77 |er can b|e follow|
|00003210| 65 64 0d 0a 09 20 20 20 | 20 77 69 74 68 20 61 20 |ed... | with a |
|00003220| 74 79 70 65 20 63 68 61 | 72 61 63 74 65 72 2c 20 |type cha|racter, |
|00003230| 6a 75 73 74 20 6c 69 6b | 65 20 61 20 76 61 72 69 |just lik|e a vari|
|00003240| 61 62 6c 65 20 6e 61 6d | 65 2e 20 54 68 69 73 20 |able nam|e. This |
|00003250| 6e 61 6d 65 20 20 69 73 | 0d 0a 09 20 20 20 20 75 |name is|... u|
|00003260| 73 65 64 20 20 6c 61 74 | 65 72 20 20 69 6e 20 20 |sed lat|er in |
|00003270| 74 68 65 20 66 75 6e 63 | 74 69 6f 6e 73 20 62 6f |the func|tions bo|
|00003280| 64 79 20 61 73 20 61 20 | 73 69 6d 70 6c 65 20 76 |dy as a |simple v|
|00003290| 61 72 69 61 62 6c 65 20 | 74 6f 20 73 65 74 0d 0a |ariable |to set..|
|000032a0| 09 20 20 20 20 74 68 65 | 20 72 65 74 75 72 6e 20 |. the| return |
|000032b0| 76 61 6c 75 65 20 6f 66 | 20 74 68 65 20 66 75 6e |value of| the fun|
|000032c0| 63 74 69 6f 6e 2e 0d 0a | 0d 0a 09 20 20 20 20 41 |ction...|... A|
|000032d0| 72 67 75 6d 65 6e 74 73 | 20 63 61 6e 20 62 65 20 |rguments| can be |
|000032e0| 70 61 73 73 65 64 20 62 | 79 20 20 70 6c 61 63 69 |passed b|y placi|
|000032f0| 6e 67 20 20 76 61 72 69 | 61 62 6c 65 73 20 20 62 |ng vari|ables b|
|00003300| 65 74 77 65 65 6e 20 20 | 70 61 72 65 6e 2d 0d 0a |etween |paren-..|
|00003310| 09 20 20 20 20 74 68 65 | 73 65 73 20 20 61 66 74 |. the|ses aft|
|00003320| 65 72 20 74 68 65 20 66 | 75 6e 63 74 69 6f 6e 20 |er the f|unction |
|00003330| 6e 61 6d 65 2e 20 54 68 | 65 73 65 20 76 61 72 69 |name. Th|ese vari|
|00003340| 61 62 6c 65 73 20 61 72 | 65 20 6c 6f 63 61 6c 20 |ables ar|e local |
|00003350| 6f 6e 6c 79 0d 0a 09 20 | 20 20 20 74 6f 20 74 68 |only... | to th|
|00003360| 65 20 66 75 6e 63 74 69 | 6f 6e 2e 20 56 61 72 69 |e functi|on. Vari|
|00003370| 61 62 6c 65 73 20 77 69 | 74 68 20 74 68 65 20 73 |ables wi|th the s|
|00003380| 61 6d 65 20 6e 61 6d 65 | 20 75 73 65 64 20 6f 75 |ame name| used ou|
|00003390| 74 73 69 64 65 20 20 74 | 68 65 0d 0a 09 20 20 20 |tside t|he... |
|000033a0| 20 66 75 6e 63 74 69 6f | 6e 20 20 61 72 65 20 20 | functio|n are |
|000033b0| 63 6f 6e 73 69 64 65 72 | 65 64 20 20 64 69 66 66 |consider|ed diff|
|000033c0| 65 72 65 6e 74 20 20 76 | 61 72 69 61 62 6c 65 73 |erent v|ariables|
|000033d0| 2e 20 56 61 72 69 61 62 | 6c 65 73 20 75 73 65 64 |. Variab|les used|
|000033e0| 0d 0a 09 20 20 20 20 77 | 69 74 68 69 6e 20 74 68 |... w|ithin th|
|000033f0| 65 20 66 75 6e 63 74 69 | 6f 6e 20 62 75 74 20 6e |e functi|on but n|
|00003400| 6f 74 20 20 64 65 66 69 | 6e 65 64 20 20 61 73 20 |ot defi|ned as |
|00003410| 20 70 61 72 61 6d 65 74 | 65 72 73 20 20 61 72 65 | paramet|ers are|
|00003420| 20 20 63 6f 6e 2d 0d 0a | 09 20 20 20 20 73 69 64 | con-..|. sid|
|00003430| 65 72 65 64 20 20 53 54 | 41 54 49 43 20 20 75 6e |ered ST|ATIC un|
|00003440| 6c 65 73 73 20 64 65 63 | 6c 61 72 65 64 20 64 69 |less dec|lared di|
|00003450| 66 66 65 72 65 6e 74 6c | 79 20 62 65 66 6f 72 65 |fferentl|y before|
|00003460| 20 62 65 69 6e 67 20 75 | 73 65 64 2e 0d 0a 09 20 | being u|sed.... |
|00003470| 20 20 20 41 72 72 61 79 | 73 20 75 73 65 64 20 69 | Array|s used i|
|00003480| 6e 20 74 68 65 20 66 75 | 6e 63 74 69 6f 6e 20 61 |n the fu|nction a|
|00003490| 72 65 20 64 65 66 69 6e | 65 64 20 77 69 74 68 20 |re defin|ed with |
|000034a0| 74 68 65 20 44 49 4d 20 | 20 73 74 61 74 65 6d 65 |the DIM | stateme|
|000034b0| 6e 74 0d 0a 09 20 20 20 | 20 77 69 74 68 69 6e 20 |nt... | within |
|000034c0| 20 74 68 65 20 20 66 75 | 6e 63 74 69 6f 6e 2e 20 | the fu|nction. |
|000034d0| 53 48 41 52 45 44 20 76 | 61 72 69 61 62 6c 65 73 |SHARED v|ariables|
|000034e0| 20 61 72 65 20 6b 6e 6f | 77 6e 20 74 6f 20 74 68 | are kno|wn to th|
|000034f0| 65 20 69 6e 73 69 64 65 | 0d 0a 09 20 20 20 20 6f |e inside|... o|
|00003500| 66 20 74 68 65 20 66 75 | 6e 63 74 69 6f 6e 20 61 |f the fu|nction a|
|00003510| 73 20 77 65 6c 6c 20 61 | 73 20 6f 75 74 73 69 64 |s well a|s outsid|
|00003520| 65 2e 20 4c 4f 43 41 4c | 20 76 61 72 69 61 62 6c |e. LOCAL| variabl|
|00003530| 65 73 20 75 73 65 64 20 | 77 69 74 68 69 6e 0d 0a |es used |within..|
|00003540| 09 20 20 20 20 74 68 65 | 20 20 66 75 6e 63 74 69 |. the| functi|
|00003550| 6f 6e 20 20 6c 6f 73 65 | 20 20 74 68 65 69 72 20 |on lose| their |
|00003560| 20 64 61 74 61 20 77 68 | 65 6e 20 74 68 65 20 66 | data wh|en the f|
|00003570| 75 6e 63 74 69 6f 6e 20 | 65 6e 64 73 2e 20 53 54 |unction |ends. ST|
|00003580| 41 54 49 43 0d 0a 09 20 | 20 20 20 76 61 72 69 61 |ATIC... | varia|
|00003590| 62 6c 65 73 20 61 72 65 | 20 6b 6e 6f 77 6e 20 6f |bles are| known o|
|000035a0| 6e 6c 79 20 20 74 6f 20 | 20 74 68 65 20 20 66 75 |nly to | the fu|
|000035b0| 6e 63 74 69 6f 6e 20 20 | 62 75 74 20 20 72 65 74 |nction |but ret|
|000035c0| 61 69 6e 20 20 74 68 65 | 69 72 0d 0a 0d 0a 09 20 |ain the|ir..... |
|000035d0| 20 20 20 76 61 6c 75 65 | 73 20 62 65 74 77 65 65 | value|s betwee|
|000035e0| 6e 20 63 61 6c 6c 73 20 | 74 6f 20 74 68 65 20 66 |n calls |to the f|
|000035f0| 75 6e 63 74 69 6f 6e 2e | 0d 0a 0d 0a 09 20 20 20 |unction.|..... |
|00003600| 20 54 68 65 20 20 72 65 | 74 75 72 6e 20 20 76 61 | The re|turn va|
|00003610| 6c 75 65 20 6f 66 20 74 | 68 65 20 66 75 6e 63 74 |lue of t|he funct|
|00003620| 69 6f 6e 20 69 73 20 70 | 6c 61 63 65 64 20 69 6e |ion is p|laced in|
|00003630| 20 61 20 76 61 72 69 61 | 62 6c 65 20 77 69 74 68 | a varia|ble with|
|00003640| 0d 0a 09 20 20 20 20 73 | 61 6d 65 20 6e 61 6d 65 |... s|ame name|
|00003650| 20 61 73 20 74 68 65 20 | 66 75 6e 63 74 69 6f 6e | as the |function|
|00003660| 2e 20 54 68 65 20 66 75 | 6e 63 74 69 6f 6e 20 65 |. The fu|nction e|
|00003670| 6e 64 73 20 77 69 74 68 | 20 45 4e 44 20 44 45 46 |nds with| END DEF|
|00003680| 2e 20 20 41 6c 6c 0d 0a | 09 20 20 20 20 6c 61 62 |. All..|. lab|
|00003690| 65 6c 73 20 20 72 65 66 | 65 72 65 6e 63 65 64 20 |els ref|erenced |
|000036a0| 77 69 74 68 69 6e 20 74 | 68 65 20 66 75 6e 63 74 |within t|he funct|
|000036b0| 69 6f 6e 20 6d 75 73 74 | 20 62 65 20 63 6f 6e 74 |ion must| be cont|
|000036c0| 61 69 6e 65 64 20 77 69 | 74 68 69 6e 0d 0a 09 20 |ained wi|thin... |
|000036d0| 20 20 20 74 68 65 20 66 | 75 6e 63 74 69 6f 6e 2e | the f|unction.|
|000036e0| 0d 0a 0d 0a 09 20 20 20 | 20 54 68 65 20 66 75 6e |..... | The fun|
|000036f0| 63 74 69 6f 6e 20 63 61 | 6e 20 62 65 20 75 73 65 |ction ca|n be use|
|00003700| 64 20 61 6e 79 20 70 6c | 61 63 65 20 61 6e 20 65 |d any pl|ace an e|
|00003710| 78 70 72 65 73 73 69 6f | 6e 20 63 61 6e 20 20 62 |xpressio|n can b|
|00003720| 65 20 20 75 73 65 64 2e | 0d 0a 09 20 20 20 20 54 |e used.|... T|
|00003730| 68 65 20 20 74 79 70 65 | 20 20 6f 66 20 20 74 68 |he type| of th|
|00003740| 65 20 66 75 6e 63 74 69 | 6f 6e 20 6d 75 73 74 20 |e functi|on must |
|00003750| 62 65 20 74 68 65 20 73 | 61 6d 65 20 61 73 20 74 |be the s|ame as t|
|00003760| 68 65 20 74 79 70 65 20 | 6f 66 20 74 68 65 0d 0a |he type |of the..|
|00003770| 09 20 20 20 20 65 78 70 | 72 65 73 73 69 6f 6e 2e |. exp|ression.|
|00003780| 20 54 68 65 20 61 72 67 | 75 6d 65 6e 74 73 20 74 | The arg|uments t|
|00003790| 6f 20 74 68 65 20 66 75 | 6e 63 74 69 6f 6e 20 63 |o the fu|nction c|
|000037a0| 61 6e 20 62 65 20 61 20 | 76 61 72 69 61 62 6c 65 |an be a |variable|
|000037b0| 20 20 6f 72 0d 0a 09 20 | 20 20 20 61 6e 20 65 78 | or... | an ex|
|000037c0| 70 72 65 73 73 69 6f 6e | 2e 0d 0a 0d 0a 09 20 20 |pression|...... |
|000037d0| 20 20 46 6f 72 20 20 66 | 75 72 74 68 65 72 20 69 | For f|urther i|
|000037e0| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 6f 6e 20 74 68 |nformati|on on th|
|000037f0| 65 20 44 45 46 20 61 6e | 64 20 53 55 42 20 73 74 |e DEF an|d SUB st|
|00003800| 61 74 65 6d 65 6e 74 73 | 2c 20 74 75 72 6e 20 74 |atements|, turn t|
|00003810| 6f 0d 0a 09 20 20 20 20 | 74 68 65 20 53 55 42 27 |o... |the SUB'|
|00003820| 73 20 61 6e 64 20 44 45 | 46 27 73 20 73 65 63 74 |s and DE|F's sect|
|00003830| 69 6f 6e 20 69 6e 20 43 | 68 61 70 74 65 72 20 33 |ion in C|hapter 3|
|00003840| 2e 0d 0a 0d 0a 53 65 65 | 20 41 6c 73 6f 20 20 20 |.....See| Also |
|00003850| 20 20 20 20 20 0d 0a 09 | 20 20 20 20 45 58 49 54 | ...| EXIT|
|00003860| 20 44 45 46 0d 0a 09 20 | 20 20 20 4c 4f 43 41 4c | DEF... | LOCAL|
|00003870| 0d 0a 09 20 20 20 20 53 | 48 41 52 45 44 0d 0a 09 |... S|HARED...|
|00003880| 20 20 20 20 53 54 41 54 | 49 43 0d 0a 09 20 20 20 | STAT|IC... |
|00003890| 20 53 55 42 0d 0a 0d 0a | 45 78 61 6d 70 6c 65 0d | SUB....|Example.|
|000038a0| 0a 0d 0a 09 20 20 20 20 | 20 20 27 20 54 68 69 73 |.... | ' This|
|000038b0| 20 66 75 6e 63 74 69 6f | 6e 20 77 61 69 74 73 20 | functio|n waits |
|000038c0| 66 6f 72 20 61 20 6b 65 | 79 20 74 6f 20 62 65 20 |for a ke|y to be |
|000038d0| 70 72 65 73 73 65 64 2e | 0d 0a 09 20 20 20 20 20 |pressed.|... |
|000038e0| 20 27 20 41 66 74 65 72 | 20 72 65 74 72 69 65 76 | ' After| retriev|
|000038f0| 69 6e 67 20 74 68 65 20 | 6b 65 79 2c 20 69 74 20 |ing the |key, it |
|00003900| 69 73 20 63 68 65 63 6b | 65 64 20 0d 0a 09 20 20 |is check|ed ... |
|00003910| 20 20 20 20 27 20 61 67 | 61 69 6e 73 74 20 74 68 | ' ag|ainst th|
|00003920| 65 20 70 61 73 73 65 64 | 20 6c 69 73 74 20 6f 66 |e passed| list of|
|00003930| 20 63 68 61 72 61 63 74 | 65 72 73 2e 20 49 66 20 | charact|ers. If |
|00003940| 6e 6f 74 0d 0a 09 20 20 | 20 20 20 20 27 20 69 6e |not... | ' in|
|00003950| 20 74 68 65 20 6c 69 73 | 74 2c 20 74 68 65 20 6b | the lis|t, the k|
|00003960| 65 79 20 69 73 20 64 69 | 73 63 61 72 64 65 64 20 |ey is di|scarded |
|00003970| 61 6e 64 20 61 6e 6f 74 | 68 65 72 0d 0a 09 20 20 |and anot|her... |
|00003980| 20 20 20 20 27 20 69 73 | 20 67 6f 74 74 65 6e 2e | ' is| gotten.|
|00003990| 20 49 66 20 69 6e 20 74 | 68 65 20 6c 69 73 74 2c | If in t|he list,|
|000039a0| 20 74 68 65 20 6b 65 79 | 20 69 73 20 72 65 74 75 | the key| is retu|
|000039b0| 72 6e 65 64 2e 0d 0a 09 | 20 20 20 20 44 45 46 20 |rned....| DEF |
|000039c0| 57 61 69 74 2e 46 6f 72 | 2e 4b 65 79 24 28 4c 69 |Wait.For|.Key$(Li|
|000039d0| 73 74 24 29 0d 0a 09 20 | 20 20 20 20 20 44 4f 20 |st$)... | DO |
|000039e0| 20 20 20 20 20 20 27 20 | 46 6f 72 65 76 65 72 0d | ' |Forever.|
|000039f0| 0a 09 09 57 61 69 74 2e | 46 6f 72 2e 4b 65 79 24 |...Wait.|For.Key$|
|00003a00| 3d 49 4e 4b 45 59 24 0d | 0a 09 09 49 46 20 49 4e |=INKEY$.|...IF IN|
|00003a10| 53 54 52 28 4c 69 73 74 | 24 2c 57 61 69 74 2e 46 |STR(List|$,Wait.F|
|00003a20| 6f 72 2e 4b 65 79 24 29 | 3e 30 20 54 48 45 4e 0d |or.Key$)|>0 THEN.|
|00003a30| 0a 09 09 20 20 45 58 49 | 54 20 44 45 46 0d 0a 09 |... EXI|T DEF...|
|00003a40| 09 45 4e 44 20 49 46 0d | 0a 09 20 20 20 20 20 20 |.END IF.|.. |
|00003a50| 4c 4f 4f 50 0d 0a 09 20 | 20 20 20 45 4e 44 20 44 |LOOP... | END D|
|00003a60| 45 46 0d 0a 2a 45 4e 44 | 2a 0d 0a 0d 0a 53 75 6d |EF..*END|*....Sum|
|00003a70| 6d 61 72 79 20 20 20 20 | 20 44 45 46 20 53 45 47 |mary | DEF SEG|
|00003a80| 20 5b 3d 20 4e 75 6d 65 | 72 69 63 20 45 78 70 72 | [= Nume|ric Expr|
|00003a90| 65 73 73 69 6f 6e 5d 0d | 0a 0d 0a 44 65 73 63 72 |ession].|...Descr|
|00003aa0| 69 70 74 69 6f 6e 20 54 | 68 69 73 20 73 74 61 74 |iption T|his stat|
|00003ab0| 65 6d 65 6e 74 20 63 68 | 61 6e 67 65 73 20 74 68 |ement ch|anges th|
|00003ac0| 65 20 73 65 67 6d 65 6e | 74 20 75 73 65 64 20 66 |e segmen|t used f|
|00003ad0| 6f 72 20 74 68 65 20 50 | 45 45 4b 28 29 20 66 75 |or the P|EEK() fu|
|00003ae0| 6e 63 74 69 6f 6e 0d 0a | 09 20 20 20 20 61 6e 64 |nction..|. and|
|00003af0| 20 20 74 68 65 20 20 50 | 4f 4b 45 20 73 74 61 74 | the P|OKE stat|
|00003b00| 65 6d 65 6e 74 2e 20 49 | 66 20 74 68 65 20 6e 75 |ement. I|f the nu|
|00003b10| 6d 65 72 69 63 20 65 78 | 70 72 65 73 73 69 6f 6e |meric ex|pression|
|00003b20| 20 69 73 20 6f 6d 69 74 | 74 65 64 2c 0d 0a 09 20 | is omit|ted,... |
|00003b30| 20 20 20 74 68 65 20 64 | 65 66 61 75 6c 74 20 64 | the d|efault d|
|00003b40| 61 74 61 20 73 65 67 6d | 65 6e 74 20 69 73 20 75 |ata segm|ent is u|
|00003b50| 73 65 64 2e 20 53 65 65 | 20 74 68 65 20 61 70 70 |sed. See| the app|
|00003b60| 65 6e 64 69 78 20 6f 6e | 20 61 73 73 65 6d 62 6c |endix on| assembl|
|00003b70| 65 72 0d 0a 09 20 20 20 | 20 70 72 6f 67 72 61 6d |er... | program|
|00003b80| 6d 69 6e 67 20 66 6f 72 | 20 66 75 72 74 68 65 72 |ming for| further|
|00003b90| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 2e 0d 0a 0d | informa|tion....|
|00003ba0| 0a 53 65 65 20 41 6c 73 | 6f 20 20 20 20 20 20 20 |.See Als|o |
|00003bb0| 20 0d 0a 09 20 20 20 20 | 50 45 45 4b 28 29 0d 0a | ... |PEEK()..|
|00003bc0| 09 20 20 20 20 50 4f 4b | 45 0d 0a 0d 0a 45 78 61 |. POK|E....Exa|
|00003bd0| 6d 70 6c 65 0d 0a 09 20 | 20 20 20 44 65 66 49 6e |mple... | DefIn|
|00003be0| 74 20 41 2d 5a 0d 0a 09 | 20 20 20 20 20 20 27 20 |t A-Z...| ' |
|00003bf0| 46 75 6e 63 74 69 6f 6e | 20 74 6f 20 50 65 65 6b |Function| to Peek|
|00003c00| 20 61 74 20 61 20 77 6f | 72 64 0d 0a 09 20 20 20 | at a wo|rd... |
|00003c10| 20 44 65 66 20 50 65 65 | 6b 57 6f 72 64 28 41 64 | Def Pee|kWord(Ad|
|00003c20| 64 72 65 73 73 29 0d 0a | 09 20 20 20 20 20 20 50 |dress)..|. P|
|00003c30| 65 65 6b 57 6f 72 64 3d | 50 65 65 6b 28 41 64 64 |eekWord=|Peek(Add|
|00003c40| 72 65 73 73 29 2b 50 65 | 65 6b 28 41 64 64 72 65 |ress)+Pe|ek(Addre|
|00003c50| 73 73 2b 31 29 2a 32 35 | 36 0d 0a 09 20 20 20 20 |ss+1)*25|6... |
|00003c60| 45 6e 64 20 44 65 66 0d | 0a 0d 0a 09 20 20 20 20 |End Def.|.... |
|00003c70| 50 72 69 6e 74 20 22 43 | 6f 6e 74 65 6e 74 73 20 |Print "C|ontents |
|00003c80| 6f 66 20 69 6e 74 65 72 | 72 75 70 74 20 74 61 62 |of inter|rupt tab|
|00003c90| 6c 65 22 0d 0a 09 20 20 | 20 20 44 65 66 20 53 65 |le"... | Def Se|
|00003ca0| 67 3d 30 0d 0a 09 20 20 | 20 20 46 6f 72 20 43 6f |g=0... | For Co|
|00003cb0| 75 6e 74 65 72 3d 30 20 | 74 6f 20 26 68 66 66 0d |unter=0 |to &hff.|
|00003cc0| 0a 0d 0a 09 20 20 20 20 | 20 20 4f 66 66 73 65 74 |.... | Offset|
|00003cd0| 3d 50 65 65 6b 57 6f 72 | 64 28 43 6f 75 6e 74 65 |=PeekWor|d(Counte|
|00003ce0| 72 2a 34 29 0d 0a 09 20 | 20 20 20 20 20 53 65 67 |r*4)... | Seg|
|00003cf0| 6d 65 6e 74 3d 50 65 65 | 6b 57 6f 72 64 28 43 6f |ment=Pee|kWord(Co|
|00003d00| 75 6e 74 65 72 2a 34 2b | 32 29 0d 0a 09 20 20 20 |unter*4+|2)... |
|00003d10| 20 20 20 50 72 69 6e 74 | 20 22 49 6e 74 65 72 72 | Print| "Interr|
|00003d20| 75 70 74 20 22 3b 72 69 | 67 68 74 24 28 48 65 78 |upt ";ri|ght$(Hex|
|00003d30| 24 28 43 6f 75 6e 74 65 | 72 29 2c 32 29 3b 22 3d |$(Counte|r),2);"=|
|00003d40| 22 3b 0d 0a 09 20 20 20 | 20 20 20 50 72 69 6e 74 |";... | Print|
|00003d50| 20 48 65 78 24 28 53 65 | 67 6d 65 6e 74 29 3b 0d | Hex$(Se|gment);.|
|00003d60| 0a 09 20 20 20 20 20 20 | 50 72 69 6e 74 20 22 3a |.. |Print ":|
|00003d70| 22 3b 48 65 78 24 28 4f | 66 66 73 65 74 29 3b 0d |";Hex$(O|ffset);.|
|00003d80| 0a 09 20 20 20 20 20 20 | 50 72 69 6e 74 20 22 20 |.. |Print " |
|00003d90| 42 69 6e 3d 22 3b 42 69 | 6e 24 28 53 65 67 6d 65 |Bin=";Bi|n$(Segme|
|00003da0| 6e 74 29 3b 22 3a 22 3b | 42 69 6e 24 28 4f 66 66 |nt);":";|Bin$(Off|
|00003db0| 73 65 74 29 3b 0d 0a 09 | 20 20 20 20 20 20 50 72 |set);...| Pr|
|00003dc0| 69 6e 74 20 22 20 4f 63 | 74 3d 22 3b 4f 63 74 24 |int " Oc|t=";Oct$|
|00003dd0| 28 53 65 67 6d 65 6e 74 | 29 3b 22 3a 22 3b 4f 63 |(Segment|);":";Oc|
|00003de0| 74 24 28 4f 66 66 73 65 | 74 29 0d 0a 09 20 20 20 |t$(Offse|t)... |
|00003df0| 20 4e 65 78 74 20 43 6f | 75 6e 74 65 72 0d 0a 2a | Next Co|unter..*|
|00003e00| 45 4e 44 2a 0d 0a 0d 0a | 53 75 6d 6d 61 72 79 20 |END*....|Summary |
|00003e10| 20 20 20 20 44 45 46 44 | 42 4c 0d 0a 0d 0a 44 65 | DEFD|BL....De|
|00003e20| 73 63 72 69 70 74 69 6f | 6e 20 43 68 61 6e 67 65 |scriptio|n Change|
|00003e30| 73 20 20 74 68 65 20 20 | 64 65 66 61 75 6c 74 20 |s the |default |
|00003e40| 76 61 72 69 61 62 6c 65 | 20 74 79 70 65 20 66 6f |variable| type fo|
|00003e50| 72 20 76 61 72 69 61 62 | 6c 65 73 20 73 74 61 72 |r variab|les star|
|00003e60| 74 69 6e 67 20 77 69 74 | 68 0d 0a 09 20 20 20 20 |ting wit|h... |
|00003e70| 74 68 65 20 73 70 65 63 | 69 66 69 65 64 20 6c 65 |the spec|ified le|
|00003e80| 74 74 65 72 2e 20 54 68 | 69 73 20 73 74 61 74 65 |tter. Th|is state|
|00003e90| 6d 65 6e 74 20 63 68 61 | 6e 67 65 73 20 74 68 65 |ment cha|nges the|
|00003ea0| 20 20 64 65 66 61 75 6c | 74 20 20 74 79 70 65 0d | defaul|t type.|
|00003eb0| 0a 09 20 20 20 20 74 6f | 20 64 6f 75 62 6c 65 20 |.. to| double |
|00003ec0| 70 72 65 63 69 73 69 6f | 6e 20 66 6c 6f 61 74 69 |precisio|n floati|
|00003ed0| 6e 67 20 70 6f 69 6e 74 | 2e 20 54 68 69 73 20 69 |ng point|. This i|
|00003ee0| 73 20 74 68 65 20 6e 6f | 72 6d 61 6c 20 64 65 66 |s the no|rmal def|
|00003ef0| 61 75 6c 74 2e 0d 0a 0d | 0a 53 65 65 20 41 6c 73 |ault....|.See Als|
|00003f00| 6f 20 20 20 20 20 20 20 | 20 0d 0a 09 20 20 20 20 |o | ... |
|00003f10| 44 45 46 49 4e 54 0d 0a | 09 20 20 20 20 44 45 46 |DEFINT..|. DEF|
|00003f20| 53 54 52 0d 0a 09 20 20 | 20 20 44 45 46 53 4e 47 |STR... | DEFSNG|
|00003f30| 0d 0a 0d 0a 45 78 61 6d | 70 6c 65 0d 0a 09 20 20 |....Exam|ple... |
|00003f40| 20 20 20 20 27 20 56 61 | 72 69 61 62 6c 65 73 20 | ' Va|riables |
|00003f50| 77 68 69 63 68 20 73 74 | 61 72 74 20 77 69 74 68 |which st|art with|
|00003f60| 20 41 20 74 6f 20 43 20 | 61 6e 64 20 52 0d 0a 09 | A to C |and R...|
|00003f70| 20 20 20 20 20 20 27 20 | 61 6e 64 20 68 61 76 65 | ' |and have|
|00003f80| 20 6e 6f 20 74 79 70 65 | 20 63 68 61 72 61 63 74 | no type| charact|
|00003f90| 65 72 20 77 69 6c 6c 20 | 6e 6f 77 20 64 65 66 61 |er will |now defa|
|00003fa0| 75 6c 74 0d 0a 09 20 20 | 20 20 20 20 27 20 74 6f |ult... | ' to|
|00003fb0| 20 61 20 72 65 61 6c 20 | 6e 75 6d 62 65 72 0d 0a | a real |number..|
|00003fc0| 09 20 20 20 20 44 45 46 | 44 42 4c 20 41 2d 43 2c |. DEF|DBL A-C,|
|00003fd0| 52 0d 0a 2a 45 4e 44 2a | 0d 0a 0d 0a 53 75 6d 6d |R..*END*|....Summ|
|00003fe0| 61 72 79 20 20 20 20 20 | 44 45 46 49 4e 54 0d 0a |ary |DEFINT..|
|00003ff0| 0d 0a 44 65 73 63 72 69 | 70 74 69 6f 6e 20 43 68 |..Descri|ption Ch|
|00004000| 61 6e 67 65 73 20 20 74 | 68 65 20 20 64 65 66 61 |anges t|he defa|
|00004010| 75 6c 74 20 76 61 72 69 | 61 62 6c 65 20 74 79 70 |ult vari|able typ|
|00004020| 65 20 66 6f 72 20 76 61 | 72 69 61 62 6c 65 73 20 |e for va|riables |
|00004030| 73 74 61 72 74 69 6e 67 | 20 77 69 74 68 0d 0a 09 |starting| with...|
|00004040| 20 20 20 20 74 68 65 20 | 73 70 65 63 69 66 69 65 | the |specifie|
|00004050| 64 20 6c 65 74 74 65 72 | 2e 20 54 68 69 73 20 73 |d letter|. This s|
|00004060| 74 61 74 65 6d 65 6e 74 | 20 63 68 61 6e 67 65 73 |tatement| changes|
|00004070| 20 74 68 65 20 20 64 65 | 66 61 75 6c 74 20 20 74 | the de|fault t|
|00004080| 79 70 65 0d 0a 09 20 20 | 20 20 74 6f 20 69 6e 74 |ype... | to int|
|00004090| 65 67 65 72 73 2e 0d 0a | 0d 0a 53 65 65 20 41 6c |egers...|..See Al|
|000040a0| 73 6f 20 20 20 20 20 20 | 20 20 0d 0a 09 20 20 20 |so | ... |
|000040b0| 20 44 45 46 44 42 4c 0d | 0a 09 20 20 20 20 44 45 | DEFDBL.|.. DE|
|000040c0| 46 53 54 52 0d 0a 09 20 | 20 20 20 44 45 46 53 4e |FSTR... | DEFSN|
|000040d0| 47 0d 0a 0d 0a 45 78 61 | 6d 70 6c 65 0d 0a 09 20 |G....Exa|mple... |
|000040e0| 20 20 20 20 20 27 20 56 | 61 72 69 61 62 6c 65 73 | ' V|ariables|
|000040f0| 20 77 68 69 63 68 20 68 | 61 76 65 20 6e 6f 20 74 | which h|ave no t|
|00004100| 79 70 65 20 63 68 61 72 | 61 63 74 65 72 20 77 69 |ype char|acter wi|
|00004110| 6c 6c 0d 0a 09 20 20 20 | 20 20 20 27 20 6e 6f 77 |ll... | ' now|
|00004120| 20 64 65 66 61 75 6c 74 | 20 74 6f 20 61 6e 20 69 | default| to an i|
|00004130| 6e 74 65 67 65 72 0d 0a | 09 20 20 20 20 44 45 46 |nteger..|. DEF|
|00004140| 49 4e 54 20 41 2d 5a 0d | 0a 2a 45 4e 44 2a 0d 0a |INT A-Z.|.*END*..|
|00004150| 0d 0a 53 75 6d 6d 61 72 | 79 20 20 20 20 20 44 45 |..Summar|y DE|
|00004160| 46 53 4e 47 0d 0a 0d 0a | 44 65 73 63 72 69 70 74 |FSNG....|Descript|
|00004170| 69 6f 6e 20 43 68 61 6e | 67 65 73 20 20 74 68 65 |ion Chan|ges the|
|00004180| 20 20 64 65 66 61 75 6c | 74 20 76 61 72 69 61 62 | defaul|t variab|
|00004190| 6c 65 20 74 79 70 65 20 | 66 6f 72 20 76 61 72 69 |le type |for vari|
|000041a0| 61 62 6c 65 73 20 73 74 | 61 72 74 69 6e 67 20 77 |ables st|arting w|
|000041b0| 69 74 68 0d 0a 09 20 20 | 20 20 74 68 65 20 73 70 |ith... | the sp|
|000041c0| 65 63 69 66 69 65 64 20 | 6c 65 74 74 65 72 2e 20 |ecified |letter. |
|000041d0| 54 68 69 73 20 73 74 61 | 74 65 6d 65 6e 74 20 63 |This sta|tement c|
|000041e0| 68 61 6e 67 65 73 20 74 | 68 65 20 20 64 65 66 61 |hanges t|he defa|
|000041f0| 75 6c 74 20 20 74 79 70 | 65 0d 0a 09 20 20 20 20 |ult typ|e... |
|00004200| 74 6f 20 20 64 6f 75 62 | 6c 65 20 20 70 72 65 63 |to doub|le prec|
|00004210| 69 73 69 6f 6e 20 66 6c | 6f 61 74 69 6e 67 20 70 |ision fl|oating p|
|00004220| 6f 69 6e 74 20 6e 75 6d | 65 72 69 63 73 2e 20 49 |oint num|erics. I|
|00004230| 6e 20 6f 74 68 65 72 20 | 62 61 73 69 63 73 2c 0d |n other |basics,.|
|00004240| 0a 09 20 20 20 20 74 68 | 69 73 20 73 74 61 74 65 |.. th|is state|
|00004250| 6d 65 6e 74 20 63 68 61 | 6e 67 65 73 20 74 68 65 |ment cha|nges the|
|00004260| 20 64 65 66 61 75 6c 74 | 20 74 6f 20 73 69 6e 67 | default| to sing|
|00004270| 6c 65 20 70 72 65 63 69 | 73 69 6f 6e 20 6e 75 6d |le preci|sion num|
|00004280| 62 65 72 73 2c 0d 0a 09 | 20 20 20 20 62 75 74 20 |bers,...| but |
|00004290| 20 73 69 6e 63 65 20 20 | 41 70 42 61 73 69 63 20 | since |ApBasic |
|000042a0| 20 68 61 73 20 20 64 6f | 75 62 6c 65 20 20 70 72 | has do|uble pr|
|000042b0| 65 63 69 73 69 6f 6e 20 | 20 61 6e 64 20 20 69 6e |ecision | and in|
|000042c0| 74 65 67 65 72 2c 20 74 | 68 69 73 0d 0a 09 20 20 |teger, t|his... |
|000042d0| 20 20 64 65 66 61 75 6c | 74 73 20 74 6f 20 74 68 | defaul|ts to th|
|000042e0| 65 20 6d 6f 72 65 20 70 | 72 65 63 69 73 65 20 6e |e more p|recise n|
|000042f0| 75 6d 65 72 69 63 20 74 | 79 70 65 2e 0d 0a 0d 0a |umeric t|ype.....|
|00004300| 53 65 65 20 41 6c 73 6f | 20 20 20 20 20 20 20 20 |See Also| |
|00004310| 0d 0a 09 20 20 20 20 44 | 45 46 44 42 4c 0d 0a 09 |... D|EFDBL...|
|00004320| 20 20 20 20 44 45 46 49 | 4e 54 0d 0a 09 20 20 20 | DEFI|NT... |
|00004330| 20 44 45 46 53 54 52 0d | 0a 0d 0a 45 78 61 6d 70 | DEFSTR.|...Examp|
|00004340| 6c 65 0d 0a 09 20 20 20 | 20 20 20 27 20 41 6c 6c |le... | ' All|
|00004350| 20 76 61 72 69 61 62 6c | 65 73 20 77 69 74 68 20 | variabl|es with |
|00004360| 6e 6f 20 74 79 70 65 20 | 63 68 61 72 61 63 74 65 |no type |characte|
|00004370| 72 20 77 69 6c 6c 0d 0a | 09 20 20 20 20 20 20 27 |r will..|. '|
|00004380| 20 6e 6f 77 20 64 65 66 | 61 75 6c 74 20 74 6f 20 | now def|ault to |
|00004390| 64 6f 75 62 6c 65 20 70 | 72 65 63 69 73 69 6f 6e |double p|recision|
|000043a0| 0d 0a 09 20 20 20 20 44 | 45 46 53 4e 47 20 41 2d |... D|EFSNG A-|
|000043b0| 5a 0d 0a 2a 45 4e 44 2a | 0d 0a 0d 0a 53 75 6d 6d |Z..*END*|....Summ|
|000043c0| 61 72 79 20 20 20 20 20 | 44 45 46 53 54 52 0d 0a |ary |DEFSTR..|
|000043d0| 0d 0a 44 65 73 63 72 69 | 70 74 69 6f 6e 20 43 68 |..Descri|ption Ch|
|000043e0| 61 6e 67 65 73 20 74 68 | 65 20 64 65 66 61 75 6c |anges th|e defaul|
|000043f0| 74 20 76 61 72 69 61 62 | 6c 65 20 74 79 70 65 20 |t variab|le type |
|00004400| 66 6f 72 20 76 61 72 69 | 61 62 6c 65 73 20 20 73 |for vari|ables s|
|00004410| 74 61 72 74 69 6e 67 20 | 20 77 69 74 68 0d 0a 09 |tarting | with...|
|00004420| 20 20 20 20 74 68 65 20 | 20 73 70 65 63 69 66 69 | the | specifi|
|00004430| 65 64 20 20 6c 65 74 74 | 65 72 2e 20 54 68 69 73 |ed lett|er. This|
|00004440| 20 73 74 61 74 65 6d 65 | 6e 74 20 63 68 61 6e 67 | stateme|nt chang|
|00004450| 65 73 20 74 68 65 20 64 | 65 66 61 75 6c 74 20 74 |es the d|efault t|
|00004460| 79 70 65 0d 0a 09 20 20 | 20 20 74 6f 20 73 74 72 |ype... | to str|
|00004470| 69 6e 67 73 2e 0d 0a 0d | 0a 53 65 65 20 41 6c 73 |ings....|.See Als|
|00004480| 6f 20 20 20 20 20 20 20 | 20 0d 0a 09 20 20 20 20 |o | ... |
|00004490| 44 45 46 49 4e 54 0d 0a | 09 20 20 20 20 44 45 46 |DEFINT..|. DEF|
|000044a0| 44 42 4c 0d 0a 09 20 20 | 20 20 44 45 46 53 4e 47 |DBL... | DEFSNG|
|000044b0| 0d 0a 0d 0a 45 78 61 6d | 70 6c 65 0d 0a 09 20 20 |....Exam|ple... |
|000044c0| 20 20 20 20 27 20 54 68 | 65 20 64 65 66 61 75 6c | ' Th|e defaul|
|000044d0| 74 20 74 79 70 65 20 66 | 6f 72 20 76 61 72 69 61 |t type f|or varia|
|000044e0| 62 6c 65 73 20 74 68 61 | 74 20 73 74 61 72 74 0d |bles tha|t start.|
|000044f0| 0a 09 20 20 20 20 20 20 | 27 20 77 69 74 68 20 74 |.. |' with t|
|00004500| 68 65 20 6c 65 74 74 65 | 72 20 53 20 77 69 6c 6c |he lette|r S will|
|00004510| 20 6e 6f 77 20 62 65 20 | 73 74 72 69 6e 67 73 0d | now be |strings.|
|00004520| 0a 09 20 20 20 20 44 45 | 46 53 54 52 20 53 0d 0a |.. DE|FSTR S..|
|00004530| 2a 45 4e 44 2a 0d 0a 0d | 0a 53 75 6d 6d 61 72 79 |*END*...|.Summary|
|00004540| 20 20 20 20 20 44 49 4d | 20 49 64 65 6e 74 69 66 | DIM| Identif|
|00004550| 69 65 72 20 28 43 6f 6e | 73 74 61 6e 74 20 45 78 |ier (Con|stant Ex|
|00004560| 70 72 65 73 73 69 6f 6e | 20 2c 20 5b 43 6f 6e 73 |pression| , [Cons|
|00004570| 74 61 6e 74 20 45 78 70 | 72 65 73 73 69 6f 6e 5d |tant Exp|ression]|
|00004580| 2e 2e 2e 29 0d 0a 09 20 | 20 20 20 44 49 4d 20 49 |...)... | DIM I|
|00004590| 64 65 6e 74 69 66 69 65 | 72 20 28 4d 69 6e 20 54 |dentifie|r (Min T|
|000045a0| 4f 20 4d 61 78 20 2c 20 | 5b 4d 69 6e 20 54 4f 20 |O Max , |[Min TO |
|000045b0| 4d 61 78 5d 2e 2e 2e 29 | 0d 0a 0d 0a 44 65 73 63 |Max]...)|....Desc|
|000045c0| 72 69 70 74 69 6f 6e 20 | 54 68 69 73 20 73 74 61 |ription |This sta|
|000045d0| 74 65 6d 65 6e 74 20 61 | 6c 6c 6f 77 73 20 61 72 |tement a|llows ar|
|000045e0| 72 61 79 20 76 61 72 69 | 61 62 6c 65 73 20 74 6f |ray vari|ables to|
|000045f0| 20 62 65 20 64 65 66 69 | 6e 65 64 2e 20 20 54 68 | be defi|ned. Th|
|00004600| 65 20 20 73 69 7a 65 0d | 0a 09 20 20 20 20 6f 66 |e size.|.. of|
|00004610| 20 20 74 68 65 20 61 72 | 72 61 79 20 68 61 73 20 | the ar|ray has |
|00004620| 74 6f 20 62 65 20 64 65 | 66 69 6e 65 64 20 62 65 |to be de|fined be|
|00004630| 66 6f 72 65 20 74 68 65 | 20 61 72 72 61 79 20 63 |fore the| array c|
|00004640| 61 6e 20 62 65 20 75 73 | 65 64 20 69 6e 0d 0a 09 |an be us|ed in...|
|00004650| 20 20 20 20 61 6e 20 65 | 78 70 72 65 73 73 69 6f | an e|xpressio|
|00004660| 6e 2e 20 54 68 65 20 66 | 69 72 73 74 20 66 6f 72 |n. The f|irst for|
|00004670| 6d 20 6f 66 20 74 68 65 | 20 44 49 4d 20 73 74 61 |m of the| DIM sta|
|00004680| 74 65 6d 65 6e 74 20 20 | 61 6c 6c 6f 77 73 20 20 |tement |allows |
|00004690| 61 72 2d 0d 0a 09 20 20 | 20 20 72 61 79 73 20 20 |ar-... | rays |
|000046a0| 77 69 74 68 20 20 65 6c | 65 6d 65 6e 74 73 20 73 |with el|ements s|
|000046b0| 74 61 72 74 69 6e 67 20 | 61 74 20 30 20 6f 72 20 |tarting |at 0 or |
|000046c0| 31 20 64 65 70 65 6e 64 | 69 6e 67 20 6f 6e 20 74 |1 depend|ing on t|
|000046d0| 68 65 20 4f 50 54 49 4f | 4e 0d 0a 09 20 20 20 20 |he OPTIO|N... |
|000046e0| 42 41 53 45 20 73 74 61 | 74 65 6d 65 6e 74 20 75 |BASE sta|tement u|
|000046f0| 73 65 64 2e 0d 0a 0d 0a | 09 20 20 20 20 54 68 65 |sed.....|. The|
|00004700| 20 73 65 63 6f 6e 64 20 | 66 6f 72 6d 20 61 6c 6c | second |form all|
|00004710| 6f 77 73 20 74 68 65 20 | 75 73 65 72 20 74 6f 20 |ows the |user to |
|00004720| 73 70 65 63 69 66 79 20 | 61 20 62 65 67 69 6e 6e |specify |a beginn|
|00004730| 69 6e 67 20 61 73 20 20 | 77 65 6c 6c 0d 0a 09 20 |ing as |well... |
|00004740| 20 20 20 61 73 20 20 61 | 6e 20 20 65 6e 64 69 6e | as a|n endin|
|00004750| 67 20 20 65 6c 65 6d 65 | 6e 74 2e 20 20 54 68 69 |g eleme|nt. Thi|
|00004760| 73 20 69 73 20 75 73 65 | 66 75 6c 20 77 68 65 6e |s is use|ful when|
|00004770| 20 74 68 65 20 69 6e 64 | 65 78 20 75 73 65 64 20 | the ind|ex used |
|00004780| 74 6f 0d 0a 09 20 20 20 | 20 61 63 63 65 73 73 20 |to... | access |
|00004790| 74 68 65 20 61 72 72 61 | 79 20 69 73 20 6e 6f 74 |the arra|y is not|
|000047a0| 20 73 74 61 72 74 69 6e | 67 20 77 69 74 68 20 30 | startin|g with 0|
|000047b0| 20 6f 72 20 31 2e 0d 0a | 0d 0a 53 65 65 20 41 6c | or 1...|..See Al|
|000047c0| 73 6f 20 20 20 20 20 20 | 20 20 0d 0a 09 20 20 20 |so | ... |
|000047d0| 20 43 4f 4e 53 54 0d 0a | 09 20 20 20 20 4f 50 54 | CONST..|. OPT|
|000047e0| 49 4f 4e 20 42 41 53 45 | 0d 0a 0d 0a 45 78 61 6d |ION BASE|....Exam|
|000047f0| 70 6c 65 0d 0a 09 20 20 | 20 20 44 69 6d 20 41 24 |ple... | Dim A$|
|00004800| 28 31 30 29 2c 42 25 28 | 31 30 2c 31 30 29 0d 0a |(10),B%(|10,10)..|
|00004810| 09 20 20 20 20 44 69 6d | 20 59 65 61 72 73 28 31 |. Dim| Years(1|
|00004820| 39 30 30 20 54 4f 20 32 | 30 30 30 29 0d 0a 2a 45 |900 TO 2|000)..*E|
|00004830| 4e 44 2a 0d 0a 0d 0a 53 | 75 6d 6d 61 72 79 20 20 |ND*....S|ummary |
|00004840| 20 20 20 44 4f 0d 0a 09 | 20 20 20 20 20 20 27 20 | DO...| ' |
|00004850| 73 74 61 74 65 6d 65 6e | 74 73 0d 0a 09 20 20 20 |statemen|ts... |
|00004860| 20 4c 4f 4f 50 20 57 48 | 49 4c 45 20 43 6f 6e 64 | LOOP WH|ILE Cond|
|00004870| 69 74 69 6f 6e 0d 0a 0d | 0a 09 20 20 20 20 44 4f |ition...|.. DO|
|00004880| 0d 0a 09 20 20 20 20 20 | 20 27 20 73 74 61 74 65 |... | ' state|
|00004890| 6d 65 6e 74 73 0d 0a 09 | 20 20 20 20 4c 4f 4f 50 |ments...| LOOP|
|000048a0| 20 55 4e 54 49 4c 20 43 | 6f 6e 64 69 74 69 6f 6e | UNTIL C|ondition|
|000048b0| 0d 0a 0d 0a 09 20 20 20 | 20 44 4f 20 4e 75 6d 65 |..... | DO Nume|
|000048c0| 72 69 63 20 45 78 70 72 | 65 73 73 69 6f 6e 20 54 |ric Expr|ession T|
|000048d0| 49 4d 45 53 0d 0a 09 20 | 20 20 20 20 20 27 20 73 |IMES... | ' s|
|000048e0| 74 61 74 65 6d 65 6e 74 | 73 0d 0a 09 20 20 20 20 |tatement|s... |
|000048f0| 4c 4f 4f 50 0d 0a 0d 0a | 09 20 20 20 20 44 4f 0d |LOOP....|. DO.|
|00004900| 0a 09 20 20 20 20 20 20 | 27 20 73 74 61 74 65 6d |.. |' statem|
|00004910| 65 6e 74 73 0d 0a 09 20 | 20 20 20 4c 4f 4f 50 0d |ents... | LOOP.|
|00004920| 0a 0d 0a 44 65 73 63 72 | 69 70 74 69 6f 6e 20 41 |...Descr|iption A|
|00004930| 6c 6c 6f 77 73 20 76 61 | 72 69 6f 75 73 20 74 79 |llows va|rious ty|
|00004940| 70 65 73 20 6f 66 20 70 | 72 6f 67 72 61 6d 20 6c |pes of p|rogram l|
|00004950| 6f 6f 70 73 2e 20 54 68 | 65 20 20 6c 6f 6f 70 20 |oops. Th|e loop |
|00004960| 20 63 61 6e 20 20 63 6f | 6e 74 69 6e 75 65 0d 0a | can co|ntinue..|
|00004970| 09 20 20 20 20 55 4e 54 | 49 4c 20 20 61 20 63 6f |. UNT|IL a co|
|00004980| 6e 64 69 74 69 6f 6e 20 | 69 73 20 74 72 75 65 2c |ndition |is true,|
|00004990| 20 57 48 49 4c 45 20 61 | 20 63 6f 6e 64 69 74 69 | WHILE a| conditi|
|000049a0| 6f 6e 20 72 65 6d 61 69 | 6e 73 20 74 72 75 65 2c |on remai|ns true,|
|000049b0| 20 66 6f 72 0d 0a 09 20 | 20 20 20 61 20 73 70 65 | for... | a spe|
|000049c0| 63 69 66 69 65 64 20 6e | 75 6d 62 65 72 20 6f 66 |cified n|umber of|
|000049d0| 20 74 69 6d 65 73 20 6f | 72 20 66 6f 72 65 76 65 | times o|r foreve|
|000049e0| 72 2e 20 41 20 63 6f 6e | 64 69 74 69 6f 6e 20 69 |r. A con|dition i|
|000049f0| 73 20 20 64 65 66 69 6e | 65 64 0d 0a 09 20 20 20 |s defin|ed... |
|00004a00| 20 61 73 20 20 61 6e 20 | 20 69 6e 74 65 67 65 72 | as an | integer|
|00004a10| 20 20 65 78 70 72 65 73 | 73 69 6f 6e 2e 20 20 49 | expres|sion. I|
|00004a20| 66 20 20 74 68 65 20 65 | 78 70 72 65 73 73 69 6f |f the e|xpressio|
|00004a30| 6e 20 72 65 74 75 72 6e | 73 20 61 20 72 65 61 6c |n return|s a real|
|00004a40| 0d 0a 09 20 20 20 20 72 | 65 73 75 6c 74 2c 20 74 |... r|esult, t|
|00004a50| 68 65 20 72 65 73 75 6c | 74 20 69 73 20 63 6f 6e |he resul|t is con|
|00004a60| 76 65 72 74 65 64 20 74 | 6f 20 61 6e 20 69 6e 74 |verted t|o an int|
|00004a70| 65 67 65 72 2e 20 49 66 | 20 20 74 68 65 20 20 65 |eger. If| the e|
|00004a80| 78 70 72 65 73 2d 0d 0a | 0d 0a 09 20 20 20 20 73 |xpres-..|... s|
|00004a90| 69 6f 6e 20 69 73 20 6e | 6f 6e 2d 7a 65 72 6f 20 |ion is n|on-zero |
|00004aa0| 69 74 20 69 73 20 63 6f | 6e 73 69 64 65 72 65 64 |it is co|nsidered|
|00004ab0| 20 74 72 75 65 2c 20 61 | 20 7a 65 72 6f 20 72 65 | true, a| zero re|
|00004ac0| 73 75 6c 74 20 69 73 20 | 66 61 6c 73 65 2e 0d 0a |sult is |false...|
|00004ad0| 09 20 20 20 20 54 68 65 | 20 6e 75 6d 65 72 69 63 |. The| numeric|
|00004ae0| 20 65 78 70 72 65 73 73 | 69 6f 6e 20 75 73 65 64 | express|ion used|
|00004af0| 20 69 6e 20 74 68 65 20 | 44 4f 20 54 49 4d 45 53 | in the |DO TIMES|
|00004b00| 2f 4c 4f 4f 50 20 73 74 | 61 74 65 6d 65 6e 74 20 |/LOOP st|atement |
|00004b10| 77 69 6c 6c 0d 0a 09 20 | 20 20 20 62 65 20 63 6f |will... | be co|
|00004b20| 6e 76 65 72 74 65 64 20 | 74 6f 20 61 6e 20 69 6e |nverted |to an in|
|00004b30| 74 65 67 65 72 2e 0d 0a | 0d 0a 53 65 65 20 41 6c |teger...|..See Al|
|00004b40| 73 6f 20 20 20 20 20 20 | 20 20 0d 0a 09 20 20 20 |so | ... |
|00004b50| 20 43 4f 4e 54 49 4e 55 | 45 20 44 4f 0d 0a 09 20 | CONTINU|E DO... |
|00004b60| 20 20 20 45 58 49 54 20 | 44 4f 0d 0a 09 20 20 20 | EXIT |DO... |
|00004b70| 20 46 4f 52 2f 4e 45 58 | 54 0d 0a 09 20 20 20 20 | FOR/NEX|T... |
|00004b80| 57 48 49 4c 45 2f 57 45 | 4e 44 0d 0a 0d 0a 45 78 |WHILE/WE|ND....Ex|
|00004b90| 61 6d 70 6c 65 0d 0a 09 | 20 20 20 20 20 20 27 20 |ample...| ' |
|00004ba0| 4c 6f 6f 70 20 77 68 69 | 6c 65 20 77 61 69 74 69 |Loop whi|le waiti|
|00004bb0| 6e 67 20 66 6f 72 20 61 | 20 6b 65 79 0d 0a 09 20 |ng for a| key... |
|00004bc0| 20 20 20 44 4f 0d 0a 09 | 20 20 20 20 20 20 43 68 | DO...| Ch|
|00004bd0| 61 72 24 3d 49 4e 4b 45 | 59 24 0d 0a 09 20 20 20 |ar$=INKE|Y$... |
|00004be0| 20 4c 4f 4f 50 20 55 4e | 54 49 4c 20 43 68 61 72 | LOOP UN|TIL Char|
|00004bf0| 24 3c 3e 22 22 0d 0a 0d | 0a 09 20 20 20 20 20 20 |$<>""...|.. |
|00004c00| 27 20 4c 6f 6f 70 20 75 | 6e 74 69 6c 20 74 68 65 |' Loop u|ntil the|
|00004c10| 20 75 73 65 72 20 70 72 | 65 73 73 65 73 20 74 68 | user pr|esses th|
|00004c20| 65 20 65 73 63 61 70 65 | 20 6b 65 79 0d 0a 09 20 |e escape| key... |
|00004c30| 20 20 20 44 4f 0d 0a 09 | 20 20 20 20 20 20 43 68 | DO...| Ch|
|00004c40| 61 72 24 3d 49 4e 4b 45 | 59 24 0d 0a 09 20 20 20 |ar$=INKE|Y$... |
|00004c50| 20 4c 4f 4f 50 20 57 48 | 49 4c 45 20 43 68 61 72 | LOOP WH|ILE Char|
|00004c60| 24 3c 3e 43 48 52 24 28 | 32 37 29 0d 0a 0d 0a 09 |$<>CHR$(|27).....|
|00004c70| 20 20 20 20 20 20 27 20 | 4c 6f 6f 70 20 32 30 20 | ' |Loop 20 |
|00004c80| 74 69 6d 65 73 0d 0a 09 | 20 20 20 20 43 6f 75 6e |times...| Coun|
|00004c90| 74 65 72 25 3d 31 0d 0a | 0d 0a 09 20 20 20 20 44 |ter%=1..|... D|
|00004ca0| 4f 20 32 30 20 54 49 4d | 45 53 0d 0a 09 20 20 20 |O 20 TIM|ES... |
|00004cb0| 20 20 20 50 52 49 4e 54 | 20 43 6f 75 6e 74 65 72 | PRINT| Counter|
|00004cc0| 25 0d 0a 09 20 20 20 20 | 20 20 49 4e 43 52 20 43 |%... | INCR C|
|00004cd0| 6f 75 6e 74 65 72 25 0d | 0a 09 20 20 20 20 4c 4f |ounter%.|.. LO|
|00004ce0| 4f 50 0d 0a 09 09 20 20 | 20 20 20 20 20 0d 0a 09 |OP.... | ...|
|00004cf0| 20 20 20 20 20 20 27 20 | 45 6e 64 6c 65 73 73 20 | ' |Endless |
|00004d00| 4c 6f 6f 70 0d 0a 09 20 | 20 20 20 44 4f 0d 0a 09 |Loop... | DO...|
|00004d10| 20 20 20 20 20 20 50 52 | 49 4e 54 20 22 45 4e 44 | PR|INT "END|
|00004d20| 4c 45 53 53 20 4c 4f 4f | 50 21 22 0d 0a 09 20 20 |LESS LOO|P!"... |
|00004d30| 20 20 4c 4f 4f 50 0d 0a | 09 09 20 20 20 20 20 20 | LOOP..|.. |
|00004d40| 20 0d 0a 09 20 20 20 20 | 20 20 27 20 54 68 65 20 | ... | ' The |
|00004d50| 61 62 6f 76 65 20 65 6e | 64 6c 65 73 73 20 6c 6f |above en|dless lo|
|00004d60| 6f 70 20 65 78 63 65 70 | 74 20 6e 6f 77 20 75 6e |op excep|t now un|
|00004d70| 74 69 6c 0d 0a 09 20 20 | 20 20 20 20 27 20 74 68 |til... | ' th|
|00004d80| 65 20 75 73 65 72 20 70 | 72 65 73 73 65 73 20 61 |e user p|resses a|
|00004d90| 6e 79 20 6b 65 79 0d 0a | 09 20 20 20 20 44 4f 0d |ny key..|. DO.|
|00004da0| 0a 09 20 20 20 20 20 20 | 50 52 49 4e 54 20 22 45 |.. |PRINT "E|
|00004db0| 4e 44 4c 45 53 53 20 4c | 4f 4f 50 21 22 0d 0a 09 |NDLESS L|OOP!"...|
|00004dc0| 20 20 20 20 20 20 49 46 | 20 49 4e 4b 45 59 24 3c | IF| INKEY$<|
|00004dd0| 3e 22 22 0d 0a 09 09 45 | 58 49 54 20 44 4f 0d 0a |>""....E|XIT DO..|
|00004de0| 09 20 20 20 20 20 20 45 | 4e 44 20 49 46 0d 0a 09 |. E|ND IF...|
|00004df0| 20 20 20 20 4c 4f 4f 50 | 0d 0a 2a 45 4e 44 2a 0d | LOOP|..*END*.|
|00004e00| 0a 0d 0a 53 75 6d 6d 61 | 72 79 20 20 20 20 20 45 |...Summa|ry E|
|00004e10| 4e 44 0d 0a 0d 0a 44 65 | 73 63 72 69 70 74 69 6f |ND....De|scriptio|
|00004e20| 6e 20 43 61 75 73 65 73 | 20 20 74 68 65 20 20 70 |n Causes| the p|
|00004e30| 72 6f 67 72 61 6d 20 20 | 74 6f 20 20 65 6e 64 20 |rogram |to end |
|00004e40| 61 6e 64 20 63 6f 6e 74 | 72 6f 6c 20 74 6f 20 72 |and cont|rol to r|
|00004e50| 65 74 75 72 6e 20 74 6f | 20 74 68 65 20 6d 61 69 |eturn to| the mai|
|00004e60| 6e 0d 0a 09 20 20 20 20 | 70 72 6f 67 72 61 6d 20 |n... |program |
|00004e70| 64 65 76 65 6c 6f 70 6d | 65 6e 74 20 6d 65 6e 75 |developm|ent menu|
|00004e80| 20 6f 72 20 74 6f 20 44 | 4f 53 2e 20 41 6e 79 20 | or to D|OS. Any |
|00004e90| 6f 70 65 6e 20 66 69 6c | 65 73 20 61 72 65 20 63 |open fil|es are c|
|00004ea0| 6c 6f 73 65 64 2e 0d 0a | 0d 0a 45 78 61 6d 70 6c |losed...|..Exampl|
|00004eb0| 65 0d 0a 09 20 20 20 20 | 20 20 27 20 45 6e 64 20 |e... | ' End |
|00004ec0| 74 68 65 20 70 72 6f 67 | 72 61 6d 20 69 66 20 74 |the prog|ram if t|
|00004ed0| 68 65 20 75 73 65 72 20 | 70 72 65 73 73 65 73 20 |he user |presses |
|00004ee0| 74 68 65 20 65 73 63 61 | 70 65 20 6b 65 79 0d 0a |the esca|pe key..|
|00004ef0| 09 20 20 20 20 43 4f 4e | 53 54 20 45 73 63 3d 32 |. CON|ST Esc=2|
|00004f00| 37 0d 0a 09 20 20 20 20 | 44 4f 0d 0a 09 20 20 20 |7... |DO... |
|00004f10| 20 20 20 43 68 61 72 24 | 3d 49 4e 4b 45 59 24 0d | Char$|=INKEY$.|
|00004f20| 0a 09 20 20 20 20 4c 4f | 4f 50 20 57 48 49 4c 45 |.. LO|OP WHILE|
|00004f30| 20 43 68 61 72 24 3d 22 | 22 0d 0a 09 20 20 20 20 | Char$="|"... |
|00004f40| 49 46 20 43 68 61 72 24 | 3d 43 48 52 24 28 45 53 |IF Char$|=CHR$(ES|
|00004f50| 43 29 20 54 48 45 4e 20 | 45 4e 44 0d 0a 2a 45 4e |C) THEN |END..*EN|
|00004f60| 44 2a 0d 0a 0d 0a 53 75 | 6d 6d 61 72 79 20 20 20 |D*....Su|mmary |
|00004f70| 20 20 45 58 49 54 20 44 | 45 46 0d 0a 0d 0a 44 65 | EXIT D|EF....De|
|00004f80| 73 63 72 69 70 74 69 6f | 6e 20 41 6c 6c 6f 77 73 |scriptio|n Allows|
|00004f90| 20 74 68 65 20 70 72 6f | 67 72 61 6d 20 74 6f 20 | the pro|gram to |
|00004fa0| 45 58 49 54 20 61 20 44 | 45 46 20 66 75 6e 63 74 |EXIT a D|EF funct|
|00004fb0| 69 6f 6e 20 62 65 66 6f | 72 65 20 20 74 68 65 20 |ion befo|re the |
|00004fc0| 20 45 4e 44 20 20 44 45 | 46 0d 0a 09 20 20 20 20 | END DE|F... |
|00004fd0| 73 74 61 74 65 6d 65 6e | 74 2e 0d 0a 0d 0a 53 65 |statemen|t.....Se|
|00004fe0| 65 20 41 6c 73 6f 20 20 | 20 20 20 20 20 20 0d 0a |e Also | ..|
|00004ff0| 09 20 20 20 20 44 45 46 | 0d 0a 0d 0a 45 78 61 6d |. DEF|....Exam|
|00005000| 70 6c 65 0d 0a 09 20 20 | 20 20 44 45 46 20 53 71 |ple... | DEF Sq|
|00005010| 72 74 28 4e 75 6d 62 65 | 72 29 0d 0a 09 20 20 20 |rt(Numbe|r)... |
|00005020| 20 20 20 49 46 20 4e 75 | 6d 62 65 72 3c 30 20 54 | IF Nu|mber<0 T|
|00005030| 48 45 4e 20 45 58 49 54 | 20 44 45 46 0d 0a 09 20 |HEN EXIT| DEF... |
|00005040| 20 20 20 20 20 53 71 72 | 74 3d 53 51 52 28 4e 75 | Sqr|t=SQR(Nu|
|00005050| 6d 62 65 72 29 0d 0a 09 | 20 20 20 20 45 4e 44 20 |mber)...| END |
|00005060| 44 45 46 0d 0a 2a 45 4e | 44 2a 0d 0a 0d 0a 53 75 |DEF..*EN|D*....Su|
|00005070| 6d 6d 61 72 79 20 20 20 | 20 20 45 58 49 54 20 44 |mmary | EXIT D|
|00005080| 4f 0d 0a 0d 0a 44 65 73 | 63 72 69 70 74 69 6f 6e |O....Des|cription|
|00005090| 20 41 6c 6c 6f 77 73 20 | 20 74 68 65 20 20 63 75 | Allows | the cu|
|000050a0| 72 72 65 6e 74 20 20 44 | 4f 2f 4c 4f 4f 50 20 20 |rrent D|O/LOOP |
|000050b0| 74 6f 20 62 65 20 74 65 | 72 6d 69 6e 61 74 65 64 |to be te|rminated|
|000050c0| 2e 20 45 78 65 63 75 74 | 69 6f 6e 20 63 6f 6e 2d |. Execut|ion con-|
|000050d0| 0d 0a 09 20 20 20 20 74 | 69 6e 75 65 73 20 77 69 |... t|inues wi|
|000050e0| 74 68 20 74 68 65 20 73 | 74 61 74 65 6d 65 6e 74 |th the s|tatement|
|000050f0| 20 61 66 74 65 72 20 74 | 68 65 20 4c 4f 4f 50 20 | after t|he LOOP |
|00005100| 73 74 61 74 65 6d 65 6e | 74 2e 0d 0a 0d 0a 53 65 |statemen|t.....Se|
|00005110| 65 20 41 6c 73 6f 20 20 | 20 20 20 20 20 20 0d 0a |e Also | ..|
|00005120| 09 20 20 20 20 43 4f 4e | 54 49 4e 55 45 20 44 4f |. CON|TINUE DO|
|00005130| 0d 0a 09 20 20 20 20 44 | 4f 2f 4c 4f 4f 50 0d 0a |... D|O/LOOP..|
|00005140| 0d 0a 45 78 61 6d 70 6c | 65 0d 0a 09 20 20 20 20 |..Exampl|e... |
|00005150| 20 20 27 20 54 65 73 74 | 20 44 4f 20 4c 4f 4f 50 | ' Test| DO LOOP|
|00005160| 0d 0a 09 20 20 20 20 44 | 4f 0d 0a 09 20 20 20 20 |... D|O... |
|00005170| 20 20 49 4e 50 55 54 20 | 22 45 6e 74 65 72 20 61 | INPUT |"Enter a|
|00005180| 20 6e 75 6d 62 65 72 20 | 62 65 74 77 65 65 6e 20 | number |between |
|00005190| 31 20 61 6e 64 20 31 30 | 30 2e 20 28 30 3d 73 74 |1 and 10|0. (0=st|
|000051a0| 6f 70 29 20 22 3b 4e 75 | 6d 62 65 72 0d 0a 09 20 |op) ";Nu|mber... |
|000051b0| 20 20 20 20 20 49 46 20 | 4e 75 6d 62 65 72 3c 30 | IF |Number<0|
|000051c0| 20 4f 52 20 4e 75 6d 62 | 65 72 3e 31 30 30 20 54 | OR Numb|er>100 T|
|000051d0| 48 45 4e 0d 0a 09 09 43 | 4f 4e 54 49 4e 55 45 20 |HEN....C|ONTINUE |
|000051e0| 44 4f 0d 0a 09 20 20 20 | 20 20 20 45 4e 44 20 49 |DO... | END I|
|000051f0| 46 0d 0a 09 20 20 20 20 | 20 20 49 46 20 4e 75 6d |F... | IF Num|
|00005200| 62 65 72 3d 30 20 54 48 | 45 4e 0d 0a 09 09 45 58 |ber=0 TH|EN....EX|
|00005210| 49 54 20 44 4f 0d 0a 09 | 20 20 20 20 20 20 45 4e |IT DO...| EN|
|00005220| 44 20 49 46 0d 0a 09 20 | 20 20 20 20 20 50 52 49 |D IF... | PRI|
|00005230| 4e 54 20 4e 75 6d 62 65 | 72 0d 0a 09 20 20 20 20 |NT Numbe|r... |
|00005240| 4c 4f 4f 50 0d 0a 0d 0a | 2a 45 4e 44 2a 0d 0a 0d |LOOP....|*END*...|
|00005250| 0a 53 75 6d 6d 61 72 79 | 20 20 20 20 20 45 58 49 |.Summary| EXI|
|00005260| 54 20 46 4f 52 0d 0a 0d | 0a 44 65 73 63 72 69 70 |T FOR...|.Descrip|
|00005270| 74 69 6f 6e 20 41 6c 6c | 6f 77 73 20 74 68 65 20 |tion All|ows the |
|00005280| 63 75 72 72 65 6e 74 20 | 46 4f 52 2f 4e 45 58 54 |current |FOR/NEXT|
|00005290| 20 6c 6f 6f 70 20 74 6f | 20 20 62 65 20 20 74 65 | loop to| be te|
|000052a0| 72 6d 69 6e 61 74 65 64 | 2e 20 20 45 78 65 63 75 |rminated|. Execu|
|000052b0| 74 69 6f 6e 0d 0a 09 20 | 20 20 20 63 6f 6e 74 69 |tion... | conti|
|000052c0| 6e 75 65 73 20 20 77 69 | 74 68 20 20 73 74 61 74 |nues wi|th stat|
|000052d0| 65 6d 65 6e 74 20 20 61 | 66 74 65 72 20 20 74 68 |ement a|fter th|
|000052e0| 65 20 20 6c 6f 6f 70 73 | 20 20 74 65 72 6d 69 6e |e loops| termin|
|000052f0| 61 74 69 6e 67 20 4e 45 | 58 54 0d 0a 09 20 20 20 |ating NE|XT... |
|00005300| 20 73 74 61 74 65 6d 65 | 6e 74 2e 0d 0a 0d 0a 53 | stateme|nt.....S|
|00005310| 65 65 20 41 6c 73 6f 20 | 20 20 20 20 20 20 20 0d |ee Also | .|
|00005320| 0a 09 20 20 20 20 46 4f | 52 2f 4e 45 58 54 0d 0a |.. FO|R/NEXT..|
|00005330| 09 20 20 20 20 43 4f 4e | 54 49 4e 55 45 20 46 4f |. CON|TINUE FO|
|00005340| 52 0d 0a 0d 0a 45 78 61 | 6d 70 6c 65 0d 0a 09 20 |R....Exa|mple... |
|00005350| 20 20 20 50 52 49 4e 54 | 20 22 45 6e 74 65 72 20 | PRINT| "Enter |
|00005360| 32 30 20 63 68 61 72 61 | 63 74 65 72 73 20 22 3b |20 chara|cters ";|
|00005370| 0d 0a 09 20 20 20 20 41 | 24 3d 22 22 0d 0a 09 20 |... A|$=""... |
|00005380| 20 20 20 46 4f 52 20 49 | 25 3d 31 20 54 4f 20 32 | FOR I|%=1 TO 2|
|00005390| 30 0d 0a 09 20 20 20 20 | 20 20 44 4f 0d 0a 09 09 |0... | DO....|
|000053a0| 43 24 3d 49 4e 4b 45 59 | 24 0d 0a 09 20 20 20 20 |C$=INKEY|$... |
|000053b0| 20 20 4c 4f 4f 50 20 57 | 48 49 4c 45 20 43 24 3d | LOOP W|HILE C$=|
|000053c0| 22 22 0d 0a 09 09 27 20 | 51 75 69 74 20 69 66 20 |""....' |Quit if |
|000053d0| 74 68 65 20 75 73 65 72 | 20 70 72 65 73 73 65 73 |the user| presses|
|000053e0| 20 74 68 65 20 65 73 63 | 61 70 65 20 6b 65 79 0d | the esc|ape key.|
|000053f0| 0a 09 20 20 20 20 20 20 | 49 46 20 43 24 3d 43 48 |.. |IF C$=CH|
|00005400| 52 24 28 32 37 29 0d 0a | 09 09 45 58 49 54 20 46 |R$(27)..|..EXIT F|
|00005410| 4f 52 0d 0a 0d 0a 09 20 | 20 20 20 20 20 45 4e 44 |OR..... | END|
|00005420| 20 49 46 0d 0a 09 20 20 | 20 20 20 20 50 52 49 4e | IF... | PRIN|
|00005430| 54 20 43 24 0d 0a 09 20 | 20 20 20 20 20 41 24 3d |T C$... | A$=|
|00005440| 41 24 2b 43 24 0d 0a 09 | 20 20 20 20 4e 45 58 54 |A$+C$...| NEXT|
|00005450| 20 49 25 0d 0a 2a 45 4e | 44 2a 0d 0a 0d 0a 53 75 | I%..*EN|D*....Su|
|00005460| 6d 6d 61 72 79 20 20 20 | 20 20 45 58 49 54 20 53 |mmary | EXIT S|
|00005470| 55 42 0d 0a 0d 0a 44 65 | 73 63 72 69 70 74 69 6f |UB....De|scriptio|
|00005480| 6e 20 41 6c 6c 6f 77 73 | 20 74 68 65 20 63 75 72 |n Allows| the cur|
|00005490| 72 65 6e 74 20 53 55 42 | 20 64 65 66 69 6e 69 74 |rent SUB| definit|
|000054a0| 69 6f 6e 20 74 6f 20 65 | 78 69 74 20 62 65 66 6f |ion to e|xit befo|
|000054b0| 72 65 20 20 74 68 65 20 | 20 45 4e 44 20 20 53 55 |re the | END SU|
|000054c0| 42 0d 0a 09 20 20 20 20 | 73 74 61 74 65 6d 65 6e |B... |statemen|
|000054d0| 74 2e 0d 0a 0d 0a 53 65 | 65 20 41 6c 73 6f 20 20 |t.....Se|e Also |
|000054e0| 20 20 20 20 20 20 0d 0a | 09 20 20 20 20 53 55 42 | ..|. SUB|
|000054f0| 0d 0a 0d 0a 45 78 61 6d | 70 6c 65 0d 0a 09 20 20 |....Exam|ple... |
|00005500| 20 20 53 55 42 20 43 6f | 75 6e 74 65 72 20 50 72 | SUB Co|unter Pr|
|00005510| 6f 6d 70 74 24 2c 43 6f | 75 6e 74 25 0d 0a 09 09 |ompt$,Co|unt%....|
|00005520| 27 20 45 78 69 74 20 69 | 66 20 61 20 62 61 64 20 |' Exit i|f a bad |
|00005530| 63 6f 75 6e 74 65 72 0d | 0a 09 20 20 20 20 20 20 |counter.|.. |
|00005540| 49 46 20 43 6f 75 6e 74 | 25 3c 3d 30 20 54 48 45 |IF Count|%<=0 THE|
|00005550| 4e 20 45 58 49 54 20 53 | 55 42 0d 0a 09 20 20 20 |N EXIT S|UB... |
|00005560| 20 20 20 46 4f 52 20 49 | 25 3d 31 20 54 4f 20 43 | FOR I|%=1 TO C|
|00005570| 6f 75 6e 74 25 0d 0a 09 | 09 50 52 49 4e 54 20 50 |ount%...|.PRINT P|
|00005580| 72 6f 6d 70 74 24 3b 49 | 25 0d 0a 09 20 20 20 20 |rompt$;I|%... |
|00005590| 20 20 4e 45 58 54 20 49 | 25 0d 0a 09 20 20 20 20 | NEXT I|%... |
|000055a0| 45 4e 44 20 53 55 42 0d | 0a 2a 45 4e 44 2a 0d 0a |END SUB.|.*END*..|
|000055b0| 0d 0a 53 75 6d 6d 61 72 | 79 20 20 20 20 20 45 58 |..Summar|y EX|
|000055c0| 49 54 20 57 48 49 4c 45 | 0d 0a 0d 0a 44 65 73 63 |IT WHILE|....Desc|
|000055d0| 72 69 70 74 69 6f 6e 20 | 41 6c 6c 6f 77 73 20 74 |ription |Allows t|
|000055e0| 68 65 20 63 75 72 72 65 | 6e 74 20 57 48 49 4c 45 |he curre|nt WHILE|
|000055f0| 2f 57 45 4e 44 20 6c 6f | 6f 70 20 74 6f 20 73 74 |/WEND lo|op to st|
|00005600| 6f 70 2e 20 45 78 65 63 | 75 74 69 6f 6e 20 63 6f |op. Exec|ution co|
|00005610| 6e 74 69 6e 75 65 73 0d | 0a 09 20 20 20 20 77 69 |ntinues.|.. wi|
|00005620| 74 68 20 74 68 65 20 6e | 65 78 74 20 73 74 61 74 |th the n|ext stat|
|00005630| 65 6d 65 6e 74 20 61 66 | 74 65 72 20 74 68 65 20 |ement af|ter the |
|00005640| 57 45 4e 44 20 73 74 61 | 74 65 6d 65 6e 74 2e 0d |WEND sta|tement..|
|00005650| 0a 0d 0a 53 65 65 20 41 | 6c 73 6f 20 20 20 20 20 |...See A|lso |
|00005660| 20 20 20 0d 0a 09 20 20 | 20 20 57 48 49 4c 45 2f | ... | WHILE/|
|00005670| 57 45 4e 44 0d 0a 0d 0a | 45 78 61 6d 70 6c 65 0d |WEND....|Example.|
|00005680| 0a 09 20 20 20 20 49 3d | 31 0d 0a 09 20 20 20 20 |.. I=|1... |
|00005690| 57 48 49 4c 45 20 49 3c | 31 30 0d 0a 09 20 20 20 |WHILE I<|10... |
|000056a0| 20 20 20 49 46 20 49 3d | 35 20 54 48 45 4e 20 45 | IF I=|5 THEN E|
|000056b0| 58 49 54 20 57 48 49 4c | 45 0d 0a 09 20 20 20 20 |XIT WHIL|E... |
|000056c0| 20 20 50 52 49 4e 54 20 | 49 0d 0a 09 20 20 20 20 | PRINT |I... |
|000056d0| 20 20 49 4e 43 52 20 49 | 0d 0a 09 20 20 20 20 57 | INCR I|... W|
|000056e0| 45 4e 44 0d 0a 2a 45 4e | 44 2a 0d 0a 0d 0a 53 75 |END..*EN|D*....Su|
|000056f0| 6d 6d 61 72 79 20 20 20 | 20 20 46 49 45 4c 44 20 |mmary | FIELD |
|00005700| 5b 23 5d 46 69 6c 65 6e | 6f 25 20 2c 20 4e 75 6d |[#]Filen|o% , Num|
|00005710| 65 72 69 63 20 45 78 70 | 72 65 73 73 69 6f 6e 20 |eric Exp|ression |
|00005720| 41 53 20 53 74 72 69 6e | 67 20 56 61 72 69 61 62 |AS Strin|g Variab|
|00005730| 6c 65 0d 0a 09 20 20 20 | 20 5b 2c 4e 75 6d 65 72 |le... | [,Numer|
|00005740| 69 63 20 45 78 70 72 65 | 73 73 69 6f 6e 20 41 53 |ic Expre|ssion AS|
|00005750| 20 53 74 72 69 6e 67 20 | 56 61 72 69 61 62 6c 65 | String |Variable|
|00005760| 5d 2e 2e 2e 0d 0a 0d 0a | 44 65 73 63 72 69 70 74 |].......|Descript|
|00005770| 69 6f 6e 20 54 68 69 73 | 20 73 74 61 74 65 6d 65 |ion This| stateme|
|00005780| 6e 74 20 64 65 66 69 6e | 65 73 20 61 20 72 65 63 |nt defin|es a rec|
|00005790| 6f 72 64 20 20 73 74 72 | 75 63 74 75 72 65 20 20 |ord str|ucture |
|000057a0| 77 68 65 6e 20 20 75 73 | 69 6e 67 20 20 72 61 6e |when us|ing ran|
|000057b0| 64 6f 6d 0d 0a 09 20 20 | 20 20 66 69 6c 65 73 2e |dom... | files.|
|000057c0| 20 20 46 69 6c 65 6e 6f | 25 20 20 69 73 20 20 74 | Fileno|% is t|
|000057d0| 68 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 74 68 65 |he numbe|r of the|
|000057e0| 20 66 69 6c 65 20 6f 70 | 65 6e 65 64 20 61 73 20 | file op|ened as |
|000057f0| 52 41 4e 44 4f 4d 20 6f | 72 0d 0a 09 20 20 20 20 |RANDOM o|r... |
|00005800| 77 69 74 68 20 61 6e 20 | 22 52 22 20 6d 6f 64 65 |with an |"R" mode|
|00005810| 2e 20 45 61 63 68 20 66 | 69 65 6c 64 20 69 73 20 |. Each f|ield is |
|00005820| 64 65 66 69 6e 65 64 20 | 62 79 20 61 20 6e 75 6d |defined |by a num|
|00005830| 65 72 69 63 20 65 78 70 | 72 65 73 73 69 6f 6e 0d |eric exp|ression.|
|00005840| 0a 09 20 20 20 20 77 68 | 69 63 68 20 20 69 73 20 |.. wh|ich is |
|00005850| 20 74 68 65 20 20 6c 65 | 6e 67 74 68 20 6f 66 20 | the le|ngth of |
|00005860| 74 68 65 20 66 69 65 6c | 64 20 61 6e 64 20 61 20 |the fiel|d and a |
|00005870| 73 74 72 69 6e 67 20 76 | 61 72 69 61 62 6c 65 20 |string v|ariable |
|00005880| 77 68 69 63 68 0d 0a 09 | 20 20 20 20 77 69 6c 6c |which...| will|
|00005890| 20 68 6f 6c 64 20 74 68 | 65 20 66 69 65 6c 64 20 | hold th|e field |
|000058a0| 64 61 74 61 2e 20 41 6e | 79 20 6e 75 6d 62 65 72 |data. An|y number|
|000058b0| 20 6f 66 20 66 69 65 6c | 64 73 20 6d 61 79 20 62 | of fiel|ds may b|
|000058c0| 65 20 64 65 66 69 6e 65 | 64 2e 0d 0a 0d 0a 53 65 |e define|d.....Se|
|000058d0| 65 20 41 6c 73 6f 20 20 | 20 20 20 20 20 20 0d 0a |e Also | ..|
|000058e0| 09 20 20 20 20 47 45 54 | 0d 0a 09 20 20 20 20 50 |. GET|... P|
|000058f0| 55 54 0d 0a 09 20 20 20 | 20 4f 50 45 4e 0d 0a 0d |UT... | OPEN...|
|00005900| 0a 45 78 61 6d 70 6c 65 | 0d 0a 09 20 20 20 20 20 |.Example|... |
|00005910| 20 27 20 4f 50 45 4e 20 | 41 20 46 49 4c 45 20 41 | ' OPEN |A FILE A|
|00005920| 4e 44 20 50 52 49 4e 54 | 20 41 4c 4c 20 54 48 45 |ND PRINT| ALL THE|
|00005930| 20 52 45 43 4f 52 44 53 | 0d 0a 09 20 20 20 20 4f | RECORDS|... O|
|00005940| 50 45 4e 20 22 52 22 2c | 32 2c 22 54 65 73 74 2e |PEN "R",|2,"Test.|
|00005950| 64 61 74 22 2c 35 30 0d | 0a 09 20 20 20 20 46 49 |dat",50.|.. FI|
|00005960| 45 4c 44 20 23 32 2c 31 | 30 20 41 53 20 4c 6e 61 |ELD #2,1|0 AS Lna|
|00005970| 6d 65 24 2c 31 35 20 41 | 53 20 46 6e 61 6d 65 24 |me$,15 A|S Fname$|
|00005980| 2c 32 35 20 41 53 20 41 | 64 64 72 65 73 73 24 0d |,25 AS A|ddress$.|
|00005990| 0a 09 20 20 20 20 27 20 | 46 49 4e 44 20 23 20 4f |.. ' |FIND # O|
|000059a0| 46 20 52 45 43 4f 52 44 | 53 20 49 4e 20 46 49 4c |F RECORD|S IN FIL|
|000059b0| 45 0d 0a 09 20 20 20 20 | 4e 75 6d 2e 52 65 63 73 |E... |Num.Recs|
|000059c0| 25 3d 4c 4f 46 28 32 29 | 2f 35 30 0d 0a 09 20 20 |%=LOF(2)|/50... |
|000059d0| 20 20 46 4f 52 20 43 6f | 75 6e 74 65 72 25 3d 31 | FOR Co|unter%=1|
|000059e0| 20 54 4f 20 4e 75 6d 2e | 52 65 63 73 25 0d 0a 0d | TO Num.|Recs%...|
|000059f0| 0a 09 09 27 20 67 65 74 | 20 61 20 72 65 63 6f 72 |...' get| a recor|
|00005a00| 64 0d 0a 09 20 20 20 20 | 20 20 47 45 54 20 23 32 |d... | GET #2|
|00005a10| 2c 43 6f 75 6e 74 65 72 | 25 0d 0a 09 09 27 20 50 |,Counter|%....' P|
|00005a20| 72 69 6e 74 20 64 61 74 | 61 0d 0a 09 20 20 20 20 |rint dat|a... |
|00005a30| 20 20 50 52 49 4e 54 20 | 4c 6e 61 6d 65 24 2c 46 | PRINT |Lname$,F|
|00005a40| 6e 61 6d 65 24 2c 41 64 | 64 72 65 73 73 24 0d 0a |name$,Ad|dress$..|
|00005a50| 09 20 20 20 20 4e 45 58 | 54 20 43 6f 75 6e 74 65 |. NEX|T Counte|
|00005a60| 72 25 0d 0a 09 20 20 20 | 20 43 4c 4f 53 45 20 32 |r%... | CLOSE 2|
|00005a70| 0d 0a 2a 45 4e 44 2a 0d | 0a 0d 0a 53 75 6d 6d 61 |..*END*.|...Summa|
|00005a80| 72 79 20 20 20 20 20 46 | 4f 52 20 56 61 72 69 61 |ry F|OR Varia|
|00005a90| 62 6c 65 3d 4e 75 6d 65 | 72 69 63 20 45 78 70 72 |ble=Nume|ric Expr|
|00005aa0| 65 73 73 69 6f 6e 20 54 | 4f 20 4e 75 6d 65 72 69 |ession T|O Numeri|
|00005ab0| 63 20 45 78 70 72 65 73 | 73 69 6f 6e 0d 0a 09 20 |c Expres|sion... |
|00005ac0| 20 20 20 20 20 20 5b 53 | 54 45 50 20 4e 75 6d 65 | [S|TEP Nume|
|00005ad0| 72 69 63 20 45 78 70 72 | 65 73 73 69 6f 6e 5d 0d |ric Expr|ession].|
|00005ae0| 0a 09 20 20 20 20 27 20 | 20 53 74 61 74 65 6d 65 |.. ' | Stateme|
|00005af0| 6e 74 73 0d 0a 09 20 20 | 20 20 4e 45 58 54 20 5b |nts... | NEXT [|
|00005b00| 56 61 72 69 61 62 6c 65 | 5d 0d 0a 0d 0a 44 65 73 |Variable|]....Des|
|00005b10| 63 72 69 70 74 69 6f 6e | 20 41 6c 6c 6f 77 73 20 |cription| Allows |
|00005b20| 61 20 73 65 63 74 69 6f | 6e 20 6f 66 20 63 6f 64 |a sectio|n of cod|
|00005b30| 65 20 74 6f 20 62 65 20 | 65 78 65 63 75 74 65 64 |e to be |executed|
|00005b40| 20 61 20 73 70 65 63 69 | 66 69 65 64 20 20 6e 75 | a speci|fied nu|
|00005b50| 6d 62 65 72 20 20 6f 66 | 0d 0a 09 20 20 20 20 74 |mber of|... t|
|00005b60| 69 6d 65 73 2e 20 20 54 | 68 65 20 76 61 72 69 61 |imes. T|he varia|
|00005b70| 62 6c 65 20 73 70 65 63 | 69 66 69 65 64 20 69 73 |ble spec|ified is|
|00005b80| 20 73 65 74 20 74 6f 20 | 74 68 65 20 76 61 6c 75 | set to |the valu|
|00005b90| 65 20 6f 66 20 74 68 65 | 20 66 69 72 73 74 0d 0a |e of the| first..|
|00005ba0| 09 20 20 20 20 6e 75 6d | 65 72 69 63 20 65 78 70 |. num|eric exp|
|00005bb0| 72 65 73 73 69 6f 6e 2e | 20 41 66 74 65 72 20 61 |ression.| After a|
|00005bc0| 6c 6c 20 74 68 65 20 73 | 74 61 74 65 6d 65 6e 74 |ll the s|tatement|
|00005bd0| 73 20 20 62 65 74 77 65 | 65 6e 20 20 74 68 65 20 |s betwe|en the |
|00005be0| 20 46 4f 52 0d 0a 09 20 | 20 20 20 61 6e 64 20 20 | FOR... | and |
|00005bf0| 74 68 65 20 20 4e 45 58 | 54 20 73 74 61 74 65 6d |the NEX|T statem|
|00005c00| 65 6e 74 73 20 68 61 76 | 65 20 62 65 65 6e 20 65 |ents hav|e been e|
|00005c10| 78 65 63 75 74 65 64 2c | 20 74 68 65 20 76 61 6c |xecuted,| the val|
|00005c20| 75 65 20 64 65 66 69 6e | 65 64 0d 0a 09 20 20 20 |ue defin|ed... |
|00005c30| 20 69 6e 20 53 54 45 50 | 20 69 73 20 61 64 64 65 | in STEP| is adde|
|00005c40| 64 20 74 6f 20 74 68 65 | 20 76 61 72 69 61 62 6c |d to the| variabl|
|00005c50| 65 2e 20 49 66 20 6e 6f | 20 53 54 45 50 20 68 61 |e. If no| STEP ha|
|00005c60| 73 20 62 65 65 6e 20 20 | 64 65 66 69 6e 65 64 2c |s been |defined,|
|00005c70| 0d 0a 09 20 20 20 20 6f | 6e 65 20 20 28 31 29 20 |... o|ne (1) |
|00005c80| 20 69 73 20 20 75 73 65 | 64 2e 20 20 43 6f 6e 74 | is use|d. Cont|
|00005c90| 72 6f 6c 20 20 69 73 20 | 72 65 74 75 72 6e 65 64 |rol is |returned|
|00005ca0| 20 62 61 63 6b 20 74 6f | 20 74 68 65 20 73 74 61 | back to| the sta|
|00005cb0| 74 65 6d 65 6e 74 0d 0a | 09 20 20 20 20 61 66 74 |tement..|. aft|
|00005cc0| 65 72 20 74 68 65 20 46 | 4f 52 20 73 74 61 74 65 |er the F|OR state|
|00005cd0| 6d 65 6e 74 20 75 6e 74 | 69 6c 20 74 68 65 20 20 |ment unt|il the |
|00005ce0| 76 61 6c 75 65 20 20 6f | 66 20 20 74 68 65 20 20 |value o|f the |
|00005cf0| 76 61 72 69 61 62 6c 65 | 20 20 69 73 0d 0a 09 20 |variable| is... |
|00005d00| 20 20 20 68 69 67 68 65 | 72 20 20 74 68 61 6e 20 | highe|r than |
|00005d10| 20 74 68 65 20 20 72 65 | 73 75 6c 74 20 20 6f 66 | the re|sult of|
|00005d20| 20 74 68 65 20 54 4f 20 | 6e 75 6d 65 72 69 63 20 | the TO |numeric |
|00005d30| 65 78 70 72 65 73 73 69 | 6f 6e 2e 20 49 66 20 74 |expressi|on. If t|
|00005d40| 68 65 0d 0a 09 20 20 20 | 20 72 65 73 75 6c 74 20 |he... | result |
|00005d50| 6f 66 20 74 68 65 20 53 | 54 45 50 20 65 78 70 72 |of the S|TEP expr|
|00005d60| 65 73 73 69 6f 6e 20 69 | 73 20 6e 65 67 61 74 69 |ession i|s negati|
|00005d70| 76 65 2c 20 74 68 65 20 | 6c 6f 6f 70 20 73 74 6f |ve, the |loop sto|
|00005d80| 70 73 20 20 77 68 65 6e | 0d 0a 09 20 20 20 20 74 |ps when|... t|
|00005d90| 68 65 20 76 61 72 69 61 | 62 6c 65 73 20 76 61 6c |he varia|bles val|
|00005da0| 75 65 20 69 73 20 6c 65 | 73 73 20 74 68 61 6e 20 |ue is le|ss than |
|00005db0| 74 68 65 20 54 4f 20 65 | 78 70 72 65 73 73 69 6f |the TO e|xpressio|
|00005dc0| 6e 2e 0d 0a 0d 0a 09 20 | 20 20 20 54 68 65 20 20 |n...... | The |
|00005dd0| 4e 45 58 54 20 20 73 74 | 61 74 65 6d 65 6e 74 20 |NEXT st|atement |
|00005de0| 20 64 65 74 65 72 6d 69 | 6e 65 73 20 20 74 68 65 | determi|nes the|
|00005df0| 20 65 6e 64 20 6f 66 20 | 74 68 65 20 46 4f 52 2f | end of |the FOR/|
|00005e00| 4e 45 58 54 20 6c 6f 6f | 70 2e 0d 0a 09 20 20 20 |NEXT loo|p.... |
|00005e10| 20 4e 6f 72 6d 61 6c 6c | 79 20 74 68 65 20 76 61 | Normall|y the va|
|00005e20| 72 69 61 62 6c 65 20 75 | 73 65 64 20 61 73 20 74 |riable u|sed as t|
|00005e30| 68 65 20 6c 6f 6f 70 20 | 76 61 72 69 61 62 6c 65 |he loop |variable|
|00005e40| 20 69 73 20 20 75 73 65 | 64 20 20 61 66 74 65 72 | is use|d after|
|00005e50| 0d 0a 09 20 20 20 20 74 | 68 65 20 20 77 6f 72 64 |... t|he word|
|00005e60| 20 20 4e 45 58 54 2e 20 | 20 49 74 20 63 61 6e 20 | NEXT. | It can |
|00005e70| 62 65 20 6f 6d 69 74 74 | 65 64 20 61 6e 64 20 74 |be omitt|ed and t|
|00005e80| 68 65 20 4e 45 58 54 20 | 73 74 61 74 65 6d 65 6e |he NEXT |statemen|
|00005e90| 74 20 77 69 6c 6c 0d 0a | 09 20 20 20 20 63 6c 6f |t will..|. clo|
|00005ea0| 73 65 20 6c 61 73 74 20 | 46 4f 52 20 73 74 61 74 |se last |FOR stat|
|00005eb0| 65 6d 65 6e 74 20 64 65 | 63 6c 61 72 65 64 2e 20 |ement de|clared. |
|00005ec0| 49 66 20 74 68 65 20 76 | 61 72 69 61 62 6c 65 20 |If the v|ariable |
|00005ed0| 69 73 20 75 73 65 64 2c | 20 20 69 74 0d 0a 09 20 |is used,| it... |
|00005ee0| 20 20 20 6d 75 73 74 20 | 20 6d 61 74 63 68 20 20 | must | match |
|00005ef0| 74 68 65 20 20 76 61 72 | 69 61 62 6c 65 20 20 75 |the var|iable u|
|00005f00| 73 65 64 20 20 69 6e 20 | 74 68 65 20 6c 61 73 74 |sed in |the last|
|00005f10| 20 64 65 63 6c 61 72 65 | 64 20 6f 70 65 6e 20 46 | declare|d open F|
|00005f20| 4f 52 0d 0a 0d 0a 09 20 | 20 20 20 73 74 61 74 65 |OR..... | state|
|00005f30| 6d 65 6e 74 2e 0d 0a 0d | 0a 53 65 65 20 41 6c 73 |ment....|.See Als|
|00005f40| 6f 20 20 20 20 20 20 20 | 20 0d 0a 09 20 20 20 20 |o | ... |
|00005f50| 43 4f 4e 54 49 4e 55 45 | 20 46 4f 52 0d 0a 09 20 |CONTINUE| FOR... |
|00005f60| 20 20 20 44 4f 2f 4c 4f | 4f 50 0d 0a 09 20 20 20 | DO/LO|OP... |
|00005f70| 20 45 58 49 54 20 46 4f | 52 0d 0a 09 20 20 20 20 | EXIT FO|R... |
|00005f80| 57 48 49 4c 45 2f 57 45 | 4e 44 0d 0a 0d 0a 45 78 |WHILE/WE|ND....Ex|
|00005f90| 61 6d 70 6c 65 0d 0a 09 | 20 20 20 20 46 4f 52 20 |ample...| FOR |
|00005fa0| 49 3d 31 20 54 4f 20 31 | 30 30 0d 0a 09 09 20 20 |I=1 TO 1|00.... |
|00005fb0| 20 20 2e 0d 0a 09 09 20 | 20 20 20 2e 0d 0a 09 20 | ..... | .... |
|00005fc0| 20 20 20 4e 45 58 54 20 | 49 0d 0a 09 20 20 20 20 | NEXT |I... |
|00005fd0| 46 4f 52 20 49 3d 31 30 | 30 20 54 4f 20 31 20 53 |FOR I=10|0 TO 1 S|
|00005fe0| 54 45 50 20 2d 31 0d 0a | 09 09 20 20 20 20 2e 0d |TEP -1..|.. ..|
|00005ff0| 0a 09 09 20 20 20 20 2e | 0d 0a 09 20 20 20 20 4e |... .|... N|
|00006000| 45 58 54 20 49 0d 0a 2a | 45 4e 44 2a 0d 0a 0d 0a |EXT I..*|END*....|
|00006010| 53 75 6d 6d 61 72 79 20 | 20 20 20 20 49 46 20 4e |Summary | IF N|
|00006020| 75 6d 65 72 69 63 20 45 | 78 70 72 65 73 73 69 6f |umeric E|xpressio|
|00006030| 6e 20 54 48 45 4e 20 53 | 74 61 74 65 6d 65 6e 74 |n THEN S|tatement|
|00006040| 73 20 5b 45 4c 53 45 5d | 20 53 74 61 74 65 6d 65 |s [ELSE]| Stateme|
|00006050| 6e 74 73 0d 0a 0d 0a 09 | 20 20 20 20 49 46 20 4e |nts.....| IF N|
|00006060| 75 6d 65 72 69 63 20 45 | 78 70 72 65 73 73 69 6f |umeric E|xpressio|
|00006070| 6e 20 54 48 45 4e 0d 0a | 09 20 20 20 20 20 20 27 |n THEN..|. '|
|00006080| 20 53 74 61 74 65 6d 65 | 6e 74 73 0d 0a 09 20 20 | Stateme|nts... |
|00006090| 20 20 5b 45 4c 53 45 49 | 46 20 4e 75 6d 65 72 69 | [ELSEI|F Numeri|
|000060a0| 63 20 45 78 70 72 65 73 | 73 69 6f 6e 5d 0d 0a 09 |c Expres|sion]...|
|000060b0| 20 20 20 20 20 20 27 20 | 53 74 61 74 65 6d 65 6e | ' |Statemen|
|000060c0| 74 73 0d 0a 09 20 20 20 | 20 5b 45 4c 53 45 5d 0d |ts... | [ELSE].|
|000060d0| 0a 09 20 20 20 20 20 20 | 27 20 53 74 61 74 65 6d |.. |' Statem|
|000060e0| 65 6e 74 73 0d 0a 09 20 | 20 20 20 45 4e 44 20 49 |ents... | END I|
|000060f0| 46 0d 0a 0d 0a 44 65 73 | 63 72 69 70 74 69 6f 6e |F....Des|cription|
|00006100| 20 54 68 69 73 20 73 74 | 61 74 65 6d 65 6e 74 20 | This st|atement |
|00006110| 61 6c 6c 6f 77 73 20 73 | 74 61 74 65 6d 65 6e 74 |allows s|tatement|
|00006120| 73 20 74 6f 20 62 65 20 | 65 78 65 63 75 74 65 64 |s to be |executed|
|00006130| 20 64 65 70 65 6e 64 69 | 6e 67 20 20 75 70 6f 6e | dependi|ng upon|
|00006140| 0d 0a 09 20 20 20 20 61 | 20 20 63 6f 6e 64 69 74 |... a| condit|
|00006150| 69 6f 6e 2e 20 20 54 68 | 65 20 6e 75 6d 65 72 69 |ion. Th|e numeri|
|00006160| 63 20 65 78 70 72 65 73 | 73 69 6f 6e 20 69 73 20 |c expres|sion is |
|00006170| 63 6f 6e 73 69 64 65 72 | 65 64 20 74 72 75 65 20 |consider|ed true |
|00006180| 69 66 20 74 68 65 0d 0a | 09 20 20 20 20 72 65 73 |if the..|. res|
|00006190| 75 6c 74 20 69 73 20 6e | 6f 74 20 65 71 75 61 6c |ult is n|ot equal|
|000061a0| 20 74 6f 20 7a 65 72 6f | 2e 0d 0a 0d 0a 09 20 20 | to zero|...... |
|000061b0| 20 20 54 68 65 20 66 69 | 72 73 74 20 64 65 73 63 | The fi|rst desc|
|000061c0| 72 69 70 74 69 6f 6e 20 | 64 65 66 69 6e 65 73 20 |ription |defines |
|000061d0| 61 6e 20 49 46 20 73 74 | 61 74 65 6d 65 6e 74 20 |an IF st|atement |
|000061e0| 74 68 61 74 20 20 69 73 | 20 20 61 6c 6c 20 20 6f |that is| all o|
|000061f0| 6e 0d 0a 09 20 20 20 20 | 6f 6e 65 20 6c 69 6e 65 |n... |one line|
|00006200| 2e 20 54 68 65 20 6f 70 | 74 69 6f 6e 61 6c 20 45 |. The op|tional E|
|00006210| 4c 53 45 20 70 6f 72 74 | 69 6f 6e 20 64 65 66 69 |LSE port|ion defi|
|00006220| 6e 65 73 20 74 68 65 20 | 73 74 61 74 65 6d 65 6e |nes the |statemen|
|00006230| 74 73 20 74 68 61 74 0d | 0a 09 20 20 20 20 77 69 |ts that.|.. wi|
|00006240| 6c 6c 20 65 78 65 63 75 | 74 65 20 69 66 20 74 68 |ll execu|te if th|
|00006250| 65 20 63 6f 6e 64 69 74 | 69 6f 6e 20 69 73 20 66 |e condit|ion is f|
|00006260| 61 6c 73 65 2e 0d 0a 0d | 0a 09 20 20 20 20 54 68 |alse....|.. Th|
|00006270| 65 20 73 65 63 6f 6e 64 | 20 64 65 73 63 72 69 70 |e second| descrip|
|00006280| 74 69 6f 6e 20 69 73 20 | 74 68 65 20 66 6f 72 6d |tion is |the form|
|00006290| 61 74 20 6f 66 20 61 20 | 62 6c 6f 63 6b 20 20 49 |at of a |block I|
|000062a0| 46 20 20 73 74 61 74 65 | 6d 65 6e 74 2e 0d 0a 09 |F state|ment....|
|000062b0| 20 20 20 20 54 68 65 20 | 20 73 74 61 74 65 6d 65 | The | stateme|
|000062c0| 6e 74 20 20 69 73 20 64 | 65 66 69 6e 65 64 20 6f |nt is d|efined o|
|000062d0| 76 65 72 20 73 65 76 65 | 72 61 6c 20 6c 69 6e 65 |ver seve|ral line|
|000062e0| 73 20 61 6e 64 20 65 6e | 64 73 20 77 69 74 68 20 |s and en|ds with |
|000062f0| 74 68 65 0d 0a 09 20 20 | 20 20 77 6f 72 64 73 20 |the... | words |
|00006300| 45 4e 44 20 49 46 2e 20 | 54 68 65 20 62 6c 6f 63 |END IF. |The bloc|
|00006310| 6b 20 49 46 20 64 69 66 | 66 65 72 73 20 66 72 6f |k IF dif|fers fro|
|00006320| 6d 20 74 68 65 20 73 69 | 6e 67 6c 65 20 6c 69 6e |m the si|ngle lin|
|00006330| 65 20 20 49 46 20 20 69 | 6e 0d 0a 0d 0a 09 20 20 |e IF i|n..... |
|00006340| 20 20 74 68 61 74 20 20 | 74 68 65 72 65 20 20 61 | that |there a|
|00006350| 72 65 20 6e 6f 20 73 74 | 61 74 65 6d 65 6e 74 73 |re no st|atements|
|00006360| 20 61 66 74 65 72 20 74 | 68 65 20 77 6f 72 64 20 | after t|he word |
|00006370| 54 48 45 4e 2e 20 49 66 | 20 74 68 65 20 63 6f 6e |THEN. If| the con|
|00006380| 2d 0d 0a 09 20 20 20 20 | 64 69 74 69 6f 6e 20 69 |-... |dition i|
|00006390| 73 20 74 72 75 65 2c 20 | 61 6c 6c 20 73 74 61 74 |s true, |all stat|
|000063a0| 65 6d 65 6e 74 73 20 75 | 70 20 74 6f 20 74 68 65 |ements u|p to the|
|000063b0| 20 45 4c 53 45 49 46 2c | 20 45 4c 53 45 20 6f 66 | ELSEIF,| ELSE of|
|000063c0| 20 45 4e 44 20 49 46 0d | 0a 09 20 20 20 20 73 74 | END IF.|.. st|
|000063d0| 61 74 65 6d 65 6e 74 73 | 20 20 61 72 65 20 65 78 |atements| are ex|
|000063e0| 65 63 75 74 65 64 2e 20 | 49 66 20 74 68 65 20 63 |ecuted. |If the c|
|000063f0| 6f 6e 64 69 74 69 6f 6e | 20 69 73 20 66 61 6c 73 |ondition| is fals|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.