home *** CD-ROM | disk | FTP | other *** search
/ Beijing Paradise BBS Backup / PARADISE.ISO / software / BBSDOORW / AUROR21A.ZIP / LANGUAGE.DOX < prev    next >
Unknown  |  1995-09-01  |  176.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was not able to be converted.
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
100% file data default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 0d 0a 0d 0a 20 20 54 68 | 65 20 41 75 72 6f 72 61 |.... Th|e Aurora|
|00000010| 20 4d 61 63 72 6f 20 4c | 61 6e 67 75 61 67 65 20 | Macro L|anguage |
|00000020| 52 65 66 65 72 65 6e 63 | 65 0d 0a 20 20 c4 c4 c4 |Referenc|e.. ...|
|00000030| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00000040| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00000050| 0d 0a 20 20 54 68 69 73 | 20 52 65 66 65 72 65 6e |.. This| Referen|
|00000060| 63 65 20 64 65 73 63 72 | 69 62 65 73 20 74 68 65 |ce descr|ibes the|
|00000070| 20 41 75 72 6f 72 61 20 | 4d 61 63 72 6f 20 4c 61 | Aurora |Macro La|
|00000080| 6e 67 75 61 67 65 20 28 | 41 4d 4c 29 2e 20 46 6f |nguage (|AML). Fo|
|00000090| 72 20 61 0d 0a 20 20 63 | 6f 6d 70 6c 65 74 65 20 |r a.. c|omplete |
|000000a0| 64 65 73 63 72 69 70 74 | 69 6f 6e 20 6f 66 20 61 |descript|ion of a|
|000000b0| 6c 6c 20 62 75 69 6c 74 | 69 6e 20 61 6e 64 20 6c |ll built|in and l|
|000000c0| 69 62 72 61 72 79 20 66 | 75 6e 63 74 69 6f 6e 73 |ibrary f|unctions|
|000000d0| 2c 20 73 65 65 20 74 68 | 65 20 41 4d 4c 0d 0a 20 |, see th|e AML.. |
|000000e0| 20 46 75 6e 63 74 69 6f | 6e 20 52 65 66 65 72 65 | Functio|n Refere|
|000000f0| 6e 63 65 2e 20 46 6f 72 | 20 69 6e 66 6f 72 6d 61 |nce. For| informa|
|00000100| 74 69 6f 6e 20 6f 6e 20 | 68 6f 77 20 74 6f 20 69 |tion on |how to i|
|00000110| 6e 73 74 61 6c 6c 2c 20 | 63 6f 6e 66 69 67 75 72 |nstall, |configur|
|00000120| 65 2c 20 61 6e 64 0d 0a | 20 20 75 73 65 20 41 75 |e, and..| use Au|
|00000130| 72 6f 72 61 2c 20 73 65 | 65 20 74 68 65 20 41 75 |rora, se|e the Au|
|00000140| 72 6f 72 61 20 45 64 69 | 74 6f 72 20 55 73 65 72 |rora Edi|tor User|
|00000150| 73 20 47 75 69 64 65 2e | 0d 0a 0d 0a 20 20 49 66 |s Guide.|.... If|
|00000160| 20 79 6f 75 20 61 72 65 | 20 76 69 65 77 69 6e 67 | you are| viewing|
|00000170| 20 74 68 69 73 20 64 6f | 63 75 6d 65 6e 74 20 77 | this do|cument w|
|00000180| 69 74 68 20 41 75 72 6f | 72 61 2c 20 79 6f 75 20 |ith Auro|ra, you |
|00000190| 63 61 6e 20 75 73 65 20 | 74 68 65 0d 0a 20 20 27 |can use |the.. '|
|000001a0| 4c 61 6e 67 75 61 67 65 | 20 52 65 66 65 72 65 6e |Language| Referen|
|000001b0| 63 65 20 54 6f 70 69 63 | 73 27 20 70 6f 70 75 70 |ce Topic|s' popup|
|000001c0| 20 6d 65 6e 75 20 6f 6e | 20 74 68 65 20 48 65 6c | menu on| the Hel|
|000001d0| 70 20 6d 65 6e 75 20 3c | 66 31 3e 20 74 6f 20 6a |p menu <|f1> to j|
|000001e0| 75 6d 70 0d 0a 20 20 71 | 75 69 63 6b 6c 79 20 74 |ump.. q|uickly t|
|000001f0| 6f 20 61 6e 79 20 74 6f | 70 69 63 20 69 6e 20 74 |o any to|pic in t|
|00000200| 68 65 20 64 6f 63 75 6d | 65 6e 74 2e 0d 0a 0d 0a |he docum|ent.....|
|00000210| 20 ff 54 6f 20 74 72 61 | 6e 73 66 65 72 20 74 6f | .To tra|nsfer to|
|00000220| 20 74 68 65 20 66 75 6c | 6c 20 41 4d 4c 20 46 75 | the ful|l AML Fu|
|00000230| 6e 63 74 69 6f 6e 20 52 | 65 66 65 72 65 6e 63 65 |nction R|eference|
|00000240| 3a ff 6d 6f 76 65 20 74 | 68 65 20 63 75 72 73 6f |:.move t|he curso|
|00000250| 72 20 74 6f 20 61 0d 0a | 20 20 66 75 6e 63 74 69 |r to a..| functi|
|00000260| 6f 6e 20 6e 61 6d 65 20 | 6f 72 20 73 74 61 74 65 |on name |or state|
|00000270| 6d 65 6e 74 20 6b 65 79 | 77 6f 72 64 20 69 6e 20 |ment key|word in |
|00000280| 74 68 69 73 20 72 65 66 | 65 72 65 6e 63 65 20 64 |this ref|erence d|
|00000290| 6f 63 75 6d 65 6e 74 20 | 61 6e 64 0d 0a 20 20 70 |ocument |and.. p|
|000002a0| 72 65 73 73 20 3c 73 68 | 69 66 74 20 66 32 3e 2e |ress <sh|ift f2>.|
|000002b0| 20 4e 6f 74 65 20 74 68 | 61 74 20 6d 6f 73 74 20 | Note th|at most |
|000002c0| 65 78 74 65 6e 73 69 6f | 6e 20 66 75 6e 63 74 69 |extensio|n functi|
|000002d0| 6f 6e 73 20 61 72 65 20 | 6e 6f 74 0d 0a 20 20 64 |ons are |not.. d|
|000002e0| 6f 63 75 6d 65 6e 74 65 | 64 20 69 6e 20 74 68 65 |ocumente|d in the|
|000002f0| 20 41 4d 4c 20 46 75 6e | 63 74 69 6f 6e 20 52 65 | AML Fun|ction Re|
|00000300| 66 65 72 65 6e 63 65 2e | 0d 0a 0d 0a 20 20 c4 c4 |ference.|.... ..|
|00000310| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00000320| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00000330| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00000340| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00000350| c4 c4 c4 c4 0d 0a 20 20 | 43 6f 70 79 72 69 67 68 |...... |Copyrigh|
|00000360| 74 20 28 43 29 20 31 39 | 39 35 20 62 79 20 6e 75 |t (C) 19|95 by nu|
|00000370| 54 65 78 74 20 53 79 73 | 74 65 6d 73 2e 20 20 41 |Text Sys|tems. A|
|00000380| 6c 6c 20 72 69 67 68 74 | 73 20 72 65 73 65 72 76 |ll right|s reserv|
|00000390| 65 64 20 77 6f 72 6c 64 | 77 69 64 65 2e 0d 0a 20 |ed world|wide... |
|000003a0| 20 4e 6f 20 70 61 72 74 | 73 20 6f 66 20 74 68 69 | No part|s of thi|
|000003b0| 73 20 64 6f 63 75 6d 65 | 6e 74 20 6d 61 79 20 62 |s docume|nt may b|
|000003c0| 65 20 63 6f 70 69 65 64 | 20 69 6e 20 70 61 72 74 |e copied| in part|
|000003d0| 20 6f 72 20 69 6e 20 77 | 68 6f 6c 65 2c 20 65 78 | or in w|hole, ex|
|000003e0| 63 65 70 74 20 61 73 0d | 0a 20 20 70 72 6f 76 69 |cept as.|. provi|
|000003f0| 64 65 64 20 69 6e 20 74 | 68 65 20 4c 69 63 65 6e |ded in t|he Licen|
|00000400| 73 65 20 69 6e 20 74 68 | 65 20 61 63 63 6f 6d 70 |se in th|e accomp|
|00000410| 61 6e 79 69 6e 67 20 64 | 6f 63 75 6d 65 6e 74 61 |anying d|ocumenta|
|00000420| 74 69 6f 6e 2e 0d 0a 20 | 20 c4 c4 c4 c4 c4 c4 c4 |tion... | .......|
|00000430| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00000440| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00000450| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00000460| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 0d |........|........|
|00000470| 0a 0d 0a 0d 0a 20 20 49 | 6e 74 72 6f 64 75 63 74 |..... I|ntroduct|
|00000480| 69 6f 6e 00 0d 0a 20 20 | c4 c4 c4 c4 c4 c4 c4 c4 |ion... |........|
|00000490| c4 c4 c4 c4 0d 0a 20 20 | 54 68 65 20 41 75 72 6f |...... |The Auro|
|000004a0| 72 61 20 4d 61 63 72 6f | 20 4c 61 6e 67 75 61 67 |ra Macro| Languag|
|000004b0| 65 20 28 41 4d 4c 29 20 | 69 73 20 74 68 65 20 6e |e (AML) |is the n|
|000004c0| 61 74 69 76 65 20 6d 61 | 63 72 6f 20 6c 61 6e 67 |ative ma|cro lang|
|000004d0| 75 61 67 65 20 6f 66 20 | 54 68 65 0d 0a 20 20 41 |uage of |The.. A|
|000004e0| 75 72 6f 72 61 20 45 64 | 69 74 6f 72 2e 20 41 4d |urora Ed|itor. AM|
|000004f0| 4c 20 69 73 20 61 20 66 | 6c 65 78 69 62 6c 65 2c |L is a f|lexible,|
|00000500| 20 69 6e 74 65 72 70 72 | 65 74 65 64 20 63 6f 6d | interpr|eted com|
|00000510| 70 75 74 65 72 20 6c 61 | 6e 67 75 61 67 65 20 77 |puter la|nguage w|
|00000520| 68 69 63 68 0d 0a 20 20 | 69 73 20 65 61 73 79 2d |hich.. |is easy-|
|00000530| 74 6f 2d 75 73 65 2c 20 | 79 65 74 20 70 6f 77 65 |to-use, |yet powe|
|00000540| 72 66 75 6c 20 61 6e 64 | 20 72 69 63 68 20 69 6e |rful and| rich in|
|00000550| 20 66 75 6e 63 74 69 6f | 6e 2e 20 55 6e 64 65 72 | functio|n. Under|
|00000560| 73 74 61 6e 64 69 6e 67 | 20 74 68 65 0d 0a 20 20 |standing| the.. |
|00000570| 6d 61 63 72 6f 20 6c 61 | 6e 67 75 61 67 65 20 63 |macro la|nguage c|
|00000580| 61 6e 20 68 65 6c 70 20 | 79 6f 75 20 74 6f 3a 0d |an help |you to:.|
|00000590| 0a 0d 0a 20 20 20 20 2d | 20 54 61 69 6c 6f 72 20 |... -| Tailor |
|000005a0| 74 68 65 20 64 61 79 2d | 74 6f 2d 64 61 79 20 6f |the day-|to-day o|
|000005b0| 70 65 72 61 74 69 6f 6e | 20 6f 66 20 74 68 65 20 |peration| of the |
|000005c0| 65 64 69 74 6f 72 20 74 | 6f 20 79 6f 75 72 20 6f |editor t|o your o|
|000005d0| 77 6e 0d 0a 20 20 20 20 | 20 20 70 72 65 66 65 72 |wn.. | prefer|
|000005e0| 65 6e 63 65 73 0d 0a 20 | 20 20 20 2d 20 4d 6f 64 |ences.. | - Mod|
|000005f0| 69 66 79 20 6f 72 20 61 | 64 64 20 74 6f 20 65 78 |ify or a|dd to ex|
|00000600| 69 73 74 69 6e 67 20 65 | 64 69 74 6f 72 20 66 75 |isting e|ditor fu|
|00000610| 6e 63 74 69 6f 6e 73 0d | 0a 20 20 20 20 2d 20 43 |nctions.|. - C|
|00000620| 72 65 61 74 65 20 6e 65 | 77 20 65 64 69 74 6f 72 |reate ne|w editor|
|00000630| 20 66 75 6e 63 74 69 6f | 6e 73 0d 0a 20 20 20 20 | functio|ns.. |
|00000640| 2d 20 43 75 73 74 6f 6d | 69 7a 65 20 64 65 74 61 |- Custom|ize deta|
|00000650| 69 6c 65 64 20 61 73 70 | 65 63 74 73 20 6f 66 20 |iled asp|ects of |
|00000660| 79 6f 75 72 20 65 64 69 | 74 69 6e 67 20 65 6e 76 |your edi|ting env|
|00000670| 69 72 6f 6e 6d 65 6e 74 | 0d 0a 0d 0a 20 20 41 20 |ironment|.... A |
|00000680| 6c 61 72 67 65 20 62 61 | 73 65 20 6f 66 20 6d 61 |large ba|se of ma|
|00000690| 63 72 6f 20 6c 61 6e 67 | 75 61 67 65 20 73 6f 75 |cro lang|uage sou|
|000006a0| 72 63 65 20 61 6e 64 20 | 6f 62 6a 65 63 74 20 63 |rce and |object c|
|000006b0| 6f 64 65 20 69 73 20 73 | 68 69 70 70 65 64 20 77 |ode is s|hipped w|
|000006c0| 69 74 68 0d 0a 20 20 74 | 68 65 20 65 64 69 74 6f |ith.. t|he edito|
|000006d0| 72 2e 20 59 6f 75 20 63 | 61 6e 20 6d 6f 64 69 66 |r. You c|an modif|
|000006e0| 79 20 74 68 65 20 73 6f | 75 72 63 65 20 63 6f 64 |y the so|urce cod|
|000006f0| 65 20 74 6f 20 73 75 69 | 74 20 79 6f 75 72 20 6f |e to sui|t your o|
|00000700| 77 6e 0d 0a 20 20 70 72 | 65 66 65 72 65 6e 63 65 |wn.. pr|eference|
|00000710| 73 2c 20 6f 72 20 79 6f | 75 20 63 61 6e 20 75 73 |s, or yo|u can us|
|00000720| 65 20 74 68 65 20 6d 61 | 63 72 6f 20 6c 61 6e 67 |e the ma|cro lang|
|00000730| 75 61 67 65 20 74 6f 20 | 63 72 65 61 74 65 20 79 |uage to |create y|
|00000740| 6f 75 72 20 6f 77 6e 20 | 6e 65 77 0d 0a 20 20 65 |our own |new.. e|
|00000750| 64 69 74 6f 72 20 66 75 | 6e 63 74 69 6f 6e 73 2e |ditor fu|nctions.|
|00000760| 0d 0a 0d 0a 20 20 41 6c | 74 68 6f 75 67 68 20 69 |.... Al|though i|
|00000770| 74 20 69 73 20 65 61 73 | 79 20 74 6f 20 75 73 65 |t is eas|y to use|
|00000780| 20 74 68 65 20 65 64 69 | 74 6f 72 20 77 69 74 68 | the edi|tor with|
|00000790| 6f 75 74 20 75 6e 64 65 | 72 73 74 61 6e 64 69 6e |out unde|rstandin|
|000007a0| 67 20 61 6c 6c 20 74 68 | 65 0d 0a 20 20 64 65 74 |g all th|e.. det|
|000007b0| 61 69 6c 73 20 6f 66 20 | 74 68 65 20 6d 61 63 72 |ails of |the macr|
|000007c0| 6f 20 6c 61 6e 67 75 61 | 67 65 2c 20 6b 6e 6f 77 |o langua|ge, know|
|000007d0| 6c 65 64 67 65 20 6f 66 | 20 74 68 65 20 6d 61 63 |ledge of| the mac|
|000007e0| 72 6f 20 6c 61 6e 67 75 | 61 67 65 20 63 61 6e 0d |ro langu|age can.|
|000007f0| 0a 20 20 67 69 76 65 20 | 79 6f 75 20 61 20 6d 6f |. give |you a mo|
|00000800| 72 65 20 63 6f 6d 70 6c | 65 74 65 20 75 6e 64 65 |re compl|ete unde|
|00000810| 72 73 74 61 6e 64 69 6e | 67 20 6f 66 20 68 6f 77 |rstandin|g of how|
|00000820| 20 74 68 65 20 65 64 69 | 74 6f 72 20 61 63 74 75 | the edi|tor actu|
|00000830| 61 6c 6c 79 0d 0a 20 20 | 77 6f 72 6b 73 2e 20 45 |ally.. |works. E|
|00000840| 78 70 65 72 69 65 6e 63 | 65 64 20 75 73 65 72 73 |xperienc|ed users|
|00000850| 20 77 69 6c 6c 20 66 69 | 6e 64 20 69 74 20 74 6f | will fi|nd it to|
|00000860| 20 62 65 20 61 6e 20 69 | 6e 64 69 73 70 65 6e 73 | be an i|ndispens|
|00000870| 61 62 6c 65 20 74 6f 6f | 6c 2e 0d 0a 0d 0a 0d 0a |able too|l.......|
|00000880| 20 20 4f 76 65 72 76 69 | 65 77 00 0d 0a 20 20 c4 | Overvi|ew... .|
|00000890| c4 c4 c4 c4 c4 c4 c4 0d | 0a 20 20 49 66 20 79 6f |........|. If yo|
|000008a0| 75 20 62 72 6f 77 73 65 | 20 74 68 65 20 64 69 72 |u browse| the dir|
|000008b0| 65 63 74 6f 72 79 20 77 | 68 65 72 65 20 74 68 65 |ectory w|here the|
|000008c0| 20 65 64 69 74 6f 72 20 | 69 73 20 69 6e 73 74 61 | editor |is insta|
|000008d0| 6c 6c 65 64 2c 20 79 6f | 75 20 77 69 6c 6c 0d 0a |lled, yo|u will..|
|000008e0| 20 20 6e 6f 74 69 63 65 | 20 6f 6e 6c 79 20 6f 6e | notice| only on|
|000008f0| 65 20 65 78 65 63 75 74 | 61 62 6c 65 20 66 69 6c |e execut|able fil|
|00000900| 65 3a 20 41 2e 45 58 45 | 2e 20 54 68 69 73 20 65 |e: A.EXE|. This e|
|00000910| 78 65 63 75 74 61 62 6c | 65 20 66 69 6c 65 20 63 |xecutabl|e file c|
|00000920| 6f 6e 74 61 69 6e 73 0d | 0a 20 20 61 6c 6c 20 6f |ontains.|. all o|
|00000930| 66 20 74 68 65 20 62 75 | 69 6c 74 69 6e 20 66 75 |f the bu|iltin fu|
|00000940| 6e 63 74 69 6f 6e 73 20 | 6f 66 20 74 68 65 20 65 |nctions |of the e|
|00000950| 64 69 74 6f 72 2c 20 61 | 73 20 77 65 6c 6c 20 61 |ditor, a|s well a|
|00000960| 73 20 74 68 65 20 6d 61 | 63 72 6f 0d 0a 20 20 6c |s the ma|cro.. l|
|00000970| 61 6e 67 75 61 67 65 20 | 69 6e 74 65 72 70 72 65 |anguage |interpre|
|00000980| 74 65 72 20 61 6e 64 20 | 63 6f 6d 70 69 6c 65 72 |ter and |compiler|
|00000990| 2e 0d 0a 0d 0a 20 20 57 | 69 74 68 20 74 68 65 20 |..... W|ith the |
|000009a0| 69 6e 74 65 72 70 72 65 | 74 65 72 20 61 6e 64 20 |interpre|ter and |
|000009b0| 63 6f 6d 70 69 6c 65 72 | 20 62 6f 74 68 20 70 72 |compiler| both pr|
|000009c0| 65 73 65 6e 74 20 77 69 | 74 68 69 6e 20 61 6e 20 |esent wi|thin an |
|000009d0| 65 64 69 74 20 73 65 73 | 73 69 6f 6e 2c 0d 0a 20 |edit ses|sion,.. |
|000009e0| 20 6d 61 63 72 6f 20 6c | 61 6e 67 75 61 67 65 20 | macro l|anguage |
|000009f0| 73 6f 75 72 63 65 20 63 | 6f 64 65 20 63 61 6e 20 |source c|ode can |
|00000a00| 62 65 20 65 78 65 63 75 | 74 65 64 20 69 6e 74 65 |be execu|ted inte|
|00000a10| 72 61 63 74 69 76 65 6c | 79 2e 20 49 6e 20 66 61 |ractivel|y. In fa|
|00000a20| 63 74 2c 0d 0a 20 20 62 | 6f 74 68 20 74 68 65 20 |ct,.. b|oth the |
|00000a30| 69 6e 74 65 72 70 72 65 | 74 65 72 20 61 6e 64 20 |interpre|ter and |
|00000a40| 74 68 65 20 63 6f 6d 70 | 69 6c 65 72 20 61 72 65 |the comp|iler are|
|00000a50| 20 61 63 63 65 73 73 69 | 62 6c 65 20 61 73 20 62 | accessi|ble as b|
|00000a60| 75 69 6c 74 69 6e 0d 0a | 20 20 66 75 6e 63 74 69 |uiltin..| functi|
|00000a70| 6f 6e 73 20 77 69 74 68 | 69 6e 20 74 68 65 20 6d |ons with|in the m|
|00000a80| 61 63 72 6f 20 6c 61 6e | 67 75 61 67 65 20 69 74 |acro lan|guage it|
|00000a90| 73 65 6c 66 2e 0d 0a 0d | 0a 20 20 53 69 6e 63 65 |self....|. Since|
|00000aa0| 20 74 68 65 20 65 64 69 | 74 6f 72 20 69 73 20 77 | the edi|tor is w|
|00000ab0| 72 69 74 74 65 6e 20 69 | 6e 20 69 74 73 20 6f 77 |ritten i|n its ow|
|00000ac0| 6e 20 6d 61 63 72 6f 20 | 6c 61 6e 67 75 61 67 65 |n macro |language|
|00000ad0| 2c 20 69 74 20 63 61 6e | 20 62 65 0d 0a 20 20 76 |, it can| be.. v|
|00000ae0| 69 65 77 65 64 20 61 73 | 20 6f 6e 65 20 6c 61 72 |iewed as| one lar|
|00000af0| 67 65 20 63 6f 6d 70 69 | 6c 65 64 20 27 6d 61 63 |ge compi|led 'mac|
|00000b00| 72 6f 27 20 28 63 6f 6e | 74 61 69 6e 65 64 20 69 |ro' (con|tained i|
|00000b10| 6e 20 74 68 65 20 66 69 | 6c 65 20 41 2e 58 29 2e |n the fi|le A.X).|
|00000b20| 20 4d 75 63 68 0d 0a 20 | 20 6f 66 20 74 68 65 20 | Much.. | of the |
|00000b30| 73 6f 75 72 63 65 20 63 | 6f 64 65 20 66 6f 72 20 |source c|ode for |
|00000b40| 74 68 69 73 20 6d 61 63 | 72 6f 20 69 73 20 73 68 |this mac|ro is sh|
|00000b50| 69 70 70 65 64 20 77 69 | 74 68 20 74 68 65 20 65 |ipped wi|th the e|
|00000b60| 64 69 74 6f 72 2c 20 61 | 6c 6c 6f 77 69 6e 67 0d |ditor, a|llowing.|
|00000b70| 0a 20 20 66 6f 72 20 61 | 20 68 69 67 68 20 64 65 |. for a| high de|
|00000b80| 67 72 65 65 20 6f 66 20 | 63 75 73 74 6f 6d 69 7a |gree of |customiz|
|00000b90| 61 74 69 6f 6e 2e 0d 0a | 0d 0a 20 20 48 75 6e 64 |ation...|.. Hund|
|00000ba0| 72 65 64 73 20 6f 66 20 | 62 75 69 6c 74 69 6e 20 |reds of |builtin |
|00000bb0| 61 6e 64 20 75 73 65 72 | 2d 64 65 66 69 6e 65 64 |and user|-defined|
|00000bc0| 20 66 75 6e 63 74 69 6f | 6e 73 20 61 72 65 20 73 | functio|ns are s|
|00000bd0| 75 70 70 6c 69 65 64 20 | 66 6f 72 0d 0a 20 20 6d |upplied |for.. m|
|00000be0| 61 6e 69 70 75 6c 61 74 | 69 6e 67 20 73 74 72 69 |anipulat|ing stri|
|00000bf0| 6e 67 73 2c 20 66 69 6c | 65 73 2c 20 74 65 78 74 |ngs, fil|es, text|
|00000c00| 20 62 75 66 66 65 72 73 | 2c 20 63 75 72 73 6f 72 | buffers|, cursor|
|00000c10| 73 2c 20 77 69 6e 64 6f | 77 73 2c 20 61 6e 64 20 |s, windo|ws, and |
|00000c20| 61 0d 0a 20 20 6c 61 72 | 67 65 20 76 61 72 69 65 |a.. lar|ge varie|
|00000c30| 74 79 20 6f 66 20 6f 74 | 68 65 72 20 69 6e 74 65 |ty of ot|her inte|
|00000c40| 72 6e 61 6c 20 65 64 69 | 74 6f 72 20 73 74 72 75 |rnal edi|tor stru|
|00000c50| 63 74 75 72 65 73 20 61 | 6e 64 20 66 65 61 74 75 |ctures a|nd featu|
|00000c60| 72 65 73 2e 0d 0a 0d 0a | 20 20 41 4d 4c 20 61 6c |res.....| AML al|
|00000c70| 73 6f 20 68 61 73 20 70 | 6f 77 65 72 66 75 6c 20 |so has p|owerful |
|00000c80| 65 76 65 6e 74 2d 68 61 | 6e 64 6c 69 6e 67 20 61 |event-ha|ndling a|
|00000c90| 6e 64 20 6f 62 6a 65 63 | 74 2d 6f 72 69 65 6e 74 |nd objec|t-orient|
|00000ca0| 65 64 20 63 61 70 61 62 | 69 6c 69 74 69 65 73 2e |ed capab|ilities.|
|00000cb0| 0d 0a 20 20 46 75 6e 63 | 74 69 6f 6e 73 20 63 61 |.. Func|tions ca|
|00000cc0| 6e 20 62 65 20 64 65 66 | 69 6e 65 64 20 77 68 69 |n be def|ined whi|
|00000cd0| 63 68 20 72 65 73 70 6f | 6e 64 20 74 6f 20 65 78 |ch respo|nd to ex|
|00000ce0| 74 65 72 6e 61 6c 2c 20 | 69 6e 74 65 72 6e 61 6c |ternal, |internal|
|00000cf0| 2c 20 61 6e 64 20 75 73 | 65 72 0d 0a 20 20 64 65 |, and us|er.. de|
|00000d00| 66 69 6e 65 64 20 65 76 | 65 6e 74 73 2e 20 46 75 |fined ev|ents. Fu|
|00000d10| 6e 63 74 69 6f 6e 73 20 | 61 6e 64 20 76 61 72 69 |nctions |and vari|
|00000d20| 61 62 6c 65 73 20 63 61 | 6e 20 62 65 20 65 6e 63 |ables ca|n be enc|
|00000d30| 61 70 73 75 6c 61 74 65 | 64 20 69 6e 74 6f 0d 0a |apsulate|d into..|
|00000d40| 20 20 6f 62 6a 65 63 74 | 73 2c 20 61 6e 64 20 6f | object|s, and o|
|00000d50| 62 6a 65 63 74 73 20 63 | 61 6e 20 6f 72 67 61 6e |bjects c|an organ|
|00000d60| 69 7a 65 64 20 69 6e 74 | 6f 20 6f 62 6a 65 63 74 |ized int|o object|
|00000d70| 20 68 69 65 72 61 72 63 | 68 69 65 73 20 77 69 74 | hierarc|hies wit|
|00000d80| 68 0d 0a 20 20 69 6e 68 | 65 72 69 74 61 6e 63 65 |h.. inh|eritance|
|00000d90| 20 61 6e 64 20 6d 75 6c | 74 69 70 6c 65 20 69 6e | and mul|tiple in|
|00000da0| 68 65 72 69 74 61 6e 63 | 65 2e 20 49 6e 68 65 72 |heritanc|e. Inher|
|00000db0| 69 74 61 6e 63 65 20 68 | 69 65 72 61 72 63 68 69 |itance h|ierarchi|
|00000dc0| 65 73 20 63 61 6e 20 61 | 6c 73 6f 0d 0a 20 20 62 |es can a|lso.. b|
|00000dd0| 65 20 64 79 6e 61 6d 69 | 63 61 6c 6c 79 20 61 6c |e dynami|cally al|
|00000de0| 74 65 72 65 64 20 77 69 | 74 68 69 6e 20 61 20 6d |tered wi|thin a m|
|00000df0| 61 63 72 6f 2e 0d 0a 0d | 0a 20 20 54 6f 20 73 69 |acro....|. To si|
|00000e00| 6d 70 6c 69 66 79 20 6d | 61 63 72 6f 20 64 65 76 |mplify m|acro dev|
|00000e10| 65 6c 6f 70 6d 65 6e 74 | 2c 20 74 68 65 20 65 64 |elopment|, the ed|
|00000e20| 69 74 6f 72 20 69 73 20 | 61 6c 73 6f 20 63 6f 6e |itor is |also con|
|00000e30| 66 69 67 75 72 65 64 20 | 74 6f 0d 0a 20 20 70 72 |figured |to.. pr|
|00000e40| 6f 76 69 64 65 20 63 6f | 6d 70 69 6c 61 74 69 6f |ovide co|mpilatio|
|00000e50| 6e 20 73 75 70 70 6f 72 | 74 20 66 6f 72 20 69 74 |n suppor|t for it|
|00000e60| 73 20 6f 77 6e 20 6d 61 | 63 72 6f 20 6c 61 6e 67 |s own ma|cro lang|
|00000e70| 75 61 67 65 2e 20 4d 61 | 63 72 6f 20 73 6f 75 72 |uage. Ma|cro sour|
|00000e80| 63 65 0d 0a 20 20 63 6f | 64 65 20 63 61 6e 20 62 |ce.. co|de can b|
|00000e90| 65 20 63 6f 6d 70 69 6c | 65 64 20 61 6e 64 20 65 |e compil|ed and e|
|00000ea0| 78 65 63 75 74 65 64 20 | 77 69 74 68 69 6e 20 74 |xecuted |within t|
|00000eb0| 68 65 20 65 64 69 74 6f | 72 2e 20 49 66 20 63 6f |he edito|r. If co|
|00000ec0| 6d 70 69 6c 61 74 69 6f | 6e 0d 0a 20 20 65 72 72 |mpilatio|n.. err|
|00000ed0| 6f 72 73 20 61 72 65 20 | 66 6f 75 6e 64 2c 20 74 |ors are |found, t|
|00000ee0| 68 65 20 63 75 72 73 6f | 72 20 69 73 20 61 75 74 |he curso|r is aut|
|00000ef0| 6f 6d 61 74 69 63 61 6c | 6c 79 20 6d 6f 76 65 64 |omatical|ly moved|
|00000f00| 20 74 6f 20 74 68 65 20 | 61 70 70 72 6f 70 72 69 | to the |appropri|
|00000f10| 61 74 65 0d 0a 20 20 6c | 6f 63 61 74 69 6f 6e 20 |ate.. l|ocation |
|00000f20| 69 6e 20 74 68 65 20 73 | 6f 75 72 63 65 20 63 6f |in the s|ource co|
|00000f30| 64 65 20 66 6f 72 20 63 | 6f 72 72 65 63 74 69 6f |de for c|orrectio|
|00000f40| 6e 73 2e 0d 0a 0d 0a 0d | 0a 20 20 54 68 65 20 53 |ns......|. The S|
|00000f50| 79 6e 74 61 78 00 0d 0a | 20 20 c4 c4 c4 c4 c4 c4 |yntax...| ......|
|00000f60| c4 c4 c4 c4 0d 0a 20 20 | 54 68 65 20 6d 61 63 72 |...... |The macr|
|00000f70| 6f 20 6c 61 6e 67 75 61 | 67 65 20 73 79 6e 74 61 |o langua|ge synta|
|00000f80| 78 20 69 6e 63 6c 75 64 | 65 73 20 61 20 72 69 63 |x includ|es a ric|
|00000f90| 68 20 61 73 73 6f 72 74 | 6d 65 6e 74 20 6f 66 20 |h assort|ment of |
|00000fa0| 73 74 61 74 65 6d 65 6e | 74 73 2c 0d 0a 20 20 6f |statemen|ts,.. o|
|00000fb0| 70 65 72 61 74 6f 72 73 | 2c 20 61 6e 64 20 66 75 |perators|, and fu|
|00000fc0| 6e 63 74 69 6f 6e 73 20 | 77 68 69 63 68 20 63 61 |nctions |which ca|
|00000fd0| 6e 20 62 65 20 63 6f 6d | 62 69 6e 65 64 20 74 6f |n be com|bined to|
|00000fe0| 20 66 6f 72 6d 20 76 65 | 72 79 20 73 69 6d 70 6c | form ve|ry simpl|
|00000ff0| 65 20 6f 72 0d 0a 20 20 | 76 65 72 79 20 63 6f 6d |e or.. |very com|
|00001000| 70 6c 65 78 20 65 78 70 | 72 65 73 73 69 6f 6e 73 |plex exp|ressions|
|00001010| 2e 0d 0a 0d 0a 20 20 49 | 6e 20 64 65 73 69 67 6e |..... I|n design|
|00001020| 69 6e 67 20 74 68 65 20 | 6d 61 63 72 6f 20 6c 61 |ing the |macro la|
|00001030| 6e 67 75 61 67 65 20 73 | 79 6e 74 61 78 2c 20 65 |nguage s|yntax, e|
|00001040| 76 65 72 79 20 65 66 66 | 6f 72 74 20 77 61 73 20 |very eff|ort was |
|00001050| 6d 61 64 65 20 74 6f 0d | 0a 20 20 70 72 6f 76 69 |made to.|. provi|
|00001060| 64 65 20 61 6e 20 61 74 | 74 72 61 63 74 69 76 65 |de an at|tractive|
|00001070| 20 69 6e 74 65 72 66 61 | 63 65 20 74 6f 20 74 68 | interfa|ce to th|
|00001080| 65 20 65 64 69 74 6f 72 | 20 77 68 69 63 68 20 69 |e editor| which i|
|00001090| 73 20 62 6f 74 68 20 70 | 6f 77 65 72 66 75 6c 0d |s both p|owerful.|
|000010a0| 0a 20 20 61 6e 64 20 65 | 61 73 79 2d 74 6f 2d 75 |. and e|asy-to-u|
|000010b0| 73 65 2e 20 54 68 6f 73 | 65 20 77 68 6f 20 61 72 |se. Thos|e who ar|
|000010c0| 65 20 61 6c 72 65 61 64 | 79 20 66 61 6d 69 6c 69 |e alread|y famili|
|000010d0| 61 72 20 77 69 74 68 20 | 6f 74 68 65 72 20 70 72 |ar with |other pr|
|000010e0| 6f 67 72 61 6d 6d 69 6e | 67 0d 0a 20 20 6c 61 6e |ogrammin|g.. lan|
|000010f0| 67 75 61 67 65 73 20 77 | 69 6c 6c 20 66 69 6e 64 |guages w|ill find|
|00001100| 20 74 68 65 20 73 79 6e | 74 61 78 20 6f 66 20 41 | the syn|tax of A|
|00001110| 4d 4c 20 73 69 6d 69 6c | 61 72 20 74 6f 20 42 41 |ML simil|ar to BA|
|00001120| 53 49 43 20 6f 72 20 50 | 61 73 63 61 6c 2c 20 62 |SIC or P|ascal, b|
|00001130| 75 74 0d 0a 20 20 77 69 | 74 68 20 61 20 73 69 6d |ut.. wi|th a sim|
|00001140| 70 6c 65 72 20 66 75 6e | 63 74 69 6f 6e 20 63 61 |pler fun|ction ca|
|00001150| 6c 6c 20 73 79 6e 74 61 | 78 2e 0d 0a 0d 0a 20 20 |ll synta|x..... |
|00001160| 41 4d 4c 20 69 73 20 61 | 6c 73 6f 20 61 20 27 74 |AML is a|lso a 't|
|00001170| 79 70 65 6c 65 73 73 27 | 20 6c 61 6e 67 75 61 67 |ypeless'| languag|
|00001180| 65 2e 20 54 68 65 20 75 | 73 65 72 20 6e 65 65 64 |e. The u|ser need|
|00001190| 20 6e 6f 74 20 62 65 20 | 63 6f 6e 63 65 72 6e 65 | not be |concerne|
|000011a0| 64 20 77 69 74 68 0d 0a | 20 20 63 6f 6e 76 65 72 |d with..| conver|
|000011b0| 73 69 6f 6e 73 20 66 72 | 6f 6d 20 73 74 72 69 6e |sions fr|om strin|
|000011c0| 67 20 74 6f 20 6e 75 6d | 65 72 69 63 20 64 61 74 |g to num|eric dat|
|000011d0| 61 2c 20 6f 72 20 76 69 | 63 65 20 76 65 72 73 61 |a, or vi|ce versa|
|000011e0| 2c 20 61 6e 64 20 76 61 | 72 69 61 62 6c 65 0d 0a |, and va|riable..|
|000011f0| 20 20 64 65 63 6c 61 72 | 61 74 69 6f 6e 73 20 61 | declar|ations a|
|00001200| 72 65 20 75 73 75 61 6c | 6c 79 20 6e 6f 74 20 72 |re usual|ly not r|
|00001210| 65 71 75 69 72 65 64 2e | 0d 0a 0d 0a 0d 0a 20 20 |equired.|...... |
|00001220| 49 64 65 6e 74 69 66 69 | 65 72 73 00 0d 0a 20 20 |Identifi|ers... |
|00001230| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 0d 0a 20 20 49 |........|..... I|
|00001240| 64 65 6e 74 69 66 69 65 | 72 73 20 61 72 65 20 75 |dentifie|rs are u|
|00001250| 73 65 72 2d 64 65 66 69 | 6e 65 64 20 6e 61 6d 65 |ser-defi|ned name|
|00001260| 73 20 77 68 69 63 68 20 | 64 65 6e 6f 74 65 20 76 |s which |denote v|
|00001270| 61 72 69 61 62 6c 65 73 | 20 61 6e 64 0d 0a 20 20 |ariables| and.. |
|00001280| 66 75 6e 63 74 69 6f 6e | 73 2e 20 56 61 6c 69 64 |function|s. Valid|
|00001290| 20 69 64 65 6e 74 69 66 | 69 65 72 73 20 6d 61 79 | identif|iers may|
|000012a0| 20 62 65 20 63 6f 6d 70 | 6f 73 65 64 20 6f 66 20 | be comp|osed of |
|000012b0| 6c 65 74 74 65 72 73 20 | 28 61 2d 7a 20 61 6e 64 |letters |(a-z and|
|000012c0| 20 41 2d 5a 29 2c 0d 0a | 20 20 6e 75 6d 65 72 69 | A-Z),..| numeri|
|000012d0| 63 20 64 69 67 69 74 73 | 20 28 30 2d 39 29 2c 20 |c digits| (0-9), |
|000012e0| 75 6e 64 65 72 73 63 6f | 72 65 73 20 28 5f 29 2c |undersco|res (_),|
|000012f0| 20 71 75 65 73 74 69 6f | 6e 20 6d 61 72 6b 73 20 | questio|n marks |
|00001300| 28 3f 29 2c 20 61 6e 64 | 20 74 68 65 0d 0a 20 20 |(?), and| the.. |
|00001310| 63 68 61 72 61 63 74 65 | 72 20 28 23 29 2e 20 49 |characte|r (#). I|
|00001320| 64 65 6e 74 69 66 69 65 | 72 73 20 63 61 6e 6e 6f |dentifie|rs canno|
|00001330| 74 20 62 65 67 69 6e 20 | 77 69 74 68 20 61 20 6e |t begin |with a n|
|00001340| 75 6d 65 72 69 63 20 63 | 68 61 72 61 63 74 65 72 |umeric c|haracter|
|00001350| 2c 20 61 6e 64 0d 0a 20 | 20 61 72 65 20 61 6c 77 |, and.. | are alw|
|00001360| 61 79 73 20 63 61 73 65 | 20 73 65 6e 73 69 74 69 |ays case| sensiti|
|00001370| 76 65 2e 20 46 6f 72 20 | 65 78 61 6d 70 6c 65 3a |ve. For |example:|
|00001380| 0d 0a 0d 0a 20 20 54 68 | 65 73 65 20 69 64 65 6e |.... Th|ese iden|
|00001390| 74 69 66 69 65 72 73 20 | 61 72 65 20 76 61 6c 69 |tifiers |are vali|
|000013a0| 64 3a 0d 0a 20 20 20 20 | 61 62 63 0d 0a 20 20 20 |d:.. |abc.. |
|000013b0| 20 76 61 72 69 61 62 6c | 65 31 33 0d 0a 20 20 20 | variabl|e13.. |
|000013c0| 20 5f 64 6f 6e 65 3f 0d | 0a 0d 0a 20 20 54 68 65 | _done?.|... The|
|000013d0| 73 65 20 69 64 65 6e 74 | 69 66 69 65 72 73 20 61 |se ident|ifiers a|
|000013e0| 72 65 20 6e 6f 74 20 76 | 61 6c 69 64 3a 0d 0a 20 |re not v|alid:.. |
|000013f0| 20 20 20 31 32 74 77 65 | 6c 76 65 20 20 20 20 20 | 12twe|lve |
|00001400| 20 20 20 20 20 2f 2f 20 | 69 64 65 6e 74 69 66 69 | // |identifi|
|00001410| 65 72 73 20 6d 61 79 20 | 6e 6f 74 20 73 74 61 72 |ers may |not star|
|00001420| 74 20 77 69 74 68 20 6e | 75 6d 65 72 69 63 20 64 |t with n|umeric d|
|00001430| 69 67 69 74 0d 0a 20 20 | 20 20 62 61 64 20 76 61 |igit.. | bad va|
|00001440| 72 69 61 62 6c 65 20 20 | 20 20 20 20 2f 2f 20 69 |riable | // i|
|00001450| 64 65 6e 74 69 66 69 65 | 72 73 20 6d 61 79 20 6e |dentifie|rs may n|
|00001460| 6f 74 20 69 6e 63 6c 75 | 64 65 20 73 70 61 63 65 |ot inclu|de space|
|00001470| 73 0d 0a 20 20 20 20 76 | 61 72 69 61 62 6c 65 21 |s.. v|ariable!|
|00001480| 20 20 20 20 20 20 20 20 | 20 2f 2f 20 74 68 65 20 | | // the |
|00001490| 27 21 27 20 63 68 61 72 | 61 63 74 65 72 20 6d 61 |'!' char|acter ma|
|000014a0| 79 20 6e 6f 74 20 62 65 | 20 75 73 65 64 0d 0a 0d |y not be| used...|
|000014b0| 0a 0d 0a 20 20 52 65 73 | 65 72 76 65 64 20 57 6f |... Res|erved Wo|
|000014c0| 72 64 73 00 0d 0a 20 20 | c4 c4 c4 c4 c4 c4 c4 c4 |rds... |........|
|000014d0| c4 c4 c4 c4 c4 c4 0d 0a | 20 20 54 68 65 20 66 6f |........| The fo|
|000014e0| 6c 6c 6f 77 69 6e 67 20 | 72 65 73 65 72 76 65 64 |llowing |reserved|
|000014f0| 20 77 6f 72 64 73 20 61 | 72 65 20 75 73 65 64 20 | words a|re used |
|00001500| 62 79 20 74 68 65 20 6d | 61 63 72 6f 20 6c 61 6e |by the m|acro lan|
|00001510| 67 75 61 67 65 20 66 6f | 72 0d 0a 20 20 6b 65 79 |guage fo|r.. key|
|00001520| 77 6f 72 64 73 20 61 6e | 64 20 73 74 61 74 65 6d |words an|d statem|
|00001530| 65 6e 74 73 20 61 6e 64 | 20 63 61 6e 6e 6f 74 20 |ents and| cannot |
|00001540| 62 65 20 75 73 65 64 20 | 61 73 20 69 64 65 6e 74 |be used |as ident|
|00001550| 69 66 69 65 72 73 20 66 | 6f 72 0d 0a 20 20 75 73 |ifiers f|or.. us|
|00001560| 65 72 2d 64 65 66 69 6e | 65 64 20 76 61 72 69 61 |er-defin|ed varia|
|00001570| 62 6c 65 73 20 6f 72 20 | 66 75 6e 63 74 69 6f 6e |bles or |function|
|00001580| 73 3a 0d 0a 0d 0a 20 20 | 20 ff 61 6e 64 20 20 20 |s:.... | .and |
|00001590| 20 20 20 20 65 6e 64 63 | 61 73 65 20 20 20 20 20 | endc|ase |
|000015a0| 20 65 6e 64 77 68 69 6c | 65 20 20 20 6c 6f 6f 70 | endwhil|e loop|
|000015b0| 20 20 20 20 20 20 20 72 | 65 70 65 61 74 20 20 20 | r|epeat |
|000015c0| 74 68 65 6e ff 0d 0a 20 | 20 20 ff 62 72 65 61 6b |then... | .break|
|000015d0| 20 20 20 20 20 65 6e 64 | 64 61 74 61 62 75 66 20 | end|databuf |
|000015e0| 20 20 66 6f 72 77 61 72 | 64 20 20 20 20 6d 65 6e | forwar|d men|
|000015f0| 75 20 20 20 20 20 20 20 | 72 65 74 75 72 6e 20 20 |u |return |
|00001600| 20 75 6e 74 69 6c ff 0d | 0a 20 20 20 ff 63 61 73 | until..|. .cas|
|00001610| 65 20 20 20 20 20 20 65 | 6e 64 64 65 66 69 6e 65 |e e|nddefine|
|00001620| 20 20 20 20 66 75 6e 63 | 74 69 6f 6e 20 20 20 6d | func|tion m|
|00001630| 65 6e 75 62 61 72 20 20 | 20 20 73 65 74 20 20 20 |enubar | set |
|00001640| 20 20 20 76 61 72 ff 0d | 0a 20 20 20 ff 64 61 74 | var..|. .dat|
|00001650| 61 62 75 66 20 20 20 65 | 6e 64 66 75 6e 63 74 69 |abuf e|ndfuncti|
|00001660| 6f 6e 20 20 69 66 20 20 | 20 20 20 20 20 20 20 6d |on if | m|
|00001670| 6f 64 20 20 20 20 20 20 | 20 20 73 65 74 6f 62 6a |od | setobj|
|00001680| 20 20 20 77 68 65 6e ff | 0d 0a 20 20 20 ff 64 65 | when.|.. .de|
|00001690| 66 69 6e 65 20 20 20 20 | 65 6e 64 69 66 20 20 20 |fine |endif |
|000016a0| 20 20 20 20 20 69 66 3f | 20 20 20 20 20 20 20 20 | if?| |
|000016b0| 6e 6f 74 20 20 20 20 20 | 20 20 20 73 65 74 78 20 |not | setx |
|000016c0| 20 20 20 20 77 68 69 6c | 65 ff 0d 0a 20 20 20 ff | whil|e... .|
|000016d0| 64 6f 20 20 20 20 20 20 | 20 20 65 6e 64 6b 65 79 |do | endkey|
|000016e0| 20 20 20 20 20 20 20 69 | 6e 63 6c 75 64 65 20 20 | i|nclude |
|000016f0| 20 20 6f 62 6a 65 63 74 | 20 20 20 20 20 73 65 74 | object| set|
|00001700| 78 66 75 6e ff 0d 0a 20 | 20 20 ff 65 6c 73 65 20 |xfun... | .else |
|00001710| 20 20 20 20 20 65 6e 64 | 6c 6f 6f 70 20 20 20 20 | end|loop |
|00001720| 20 20 69 74 65 6d 20 20 | 20 20 20 20 20 6f 72 20 | item | or |
|00001730| 20 20 20 20 20 20 20 20 | 73 65 74 78 6f 62 6a ff | |setxobj.|
|00001740| 0d 0a 20 20 20 ff 65 6c | 73 65 69 66 20 20 20 20 |.. .el|seif |
|00001750| 65 6e 64 6d 65 6e 75 20 | 20 20 20 20 20 6b 65 79 |endmenu | key|
|00001760| 20 20 20 20 20 20 20 20 | 6f 74 68 65 72 77 69 73 | |otherwis|
|00001770| 65 20 20 73 68 6c ff 0d | 0a 20 20 20 ff 65 6e 64 |e shl..|. .end|
|00001780| 20 20 20 20 20 20 20 65 | 6e 64 6d 65 6e 75 62 61 | e|ndmenuba|
|00001790| 72 20 20 20 6b 65 79 77 | 6f 72 64 20 20 20 20 72 |r keyw|ord r|
|000017a0| 65 66 20 20 20 20 20 20 | 20 20 73 68 72 ff 0d 0a |ef | shr...|
|000017b0| 0d 0a 20 20 55 6e 6c 69 | 6b 65 20 74 68 65 20 69 |.. Unli|ke the i|
|000017c0| 64 65 6e 74 69 66 69 65 | 72 73 20 75 73 65 64 20 |dentifie|rs used |
|000017d0| 66 6f 72 20 76 61 72 69 | 61 62 6c 65 73 20 61 6e |for vari|ables an|
|000017e0| 64 20 66 75 6e 63 74 69 | 6f 6e 73 2c 20 72 65 73 |d functi|ons, res|
|000017f0| 65 72 76 65 64 0d 0a 20 | 20 77 6f 72 64 73 20 6d |erved.. | words m|
|00001800| 61 79 20 62 65 20 65 6e | 74 65 72 65 64 20 69 6e |ay be en|tered in|
|00001810| 20 6d 69 78 65 64 20 63 | 61 73 65 2e 0d 0a 0d 0a | mixed c|ase.....|
|00001820| 0d 0a 20 20 53 74 72 69 | 6e 67 73 00 0d 0a 20 20 |.. Stri|ngs... |
|00001830| c4 c4 c4 c4 c4 c4 c4 0d | 0a 20 20 41 20 73 74 72 |........|. A str|
|00001840| 69 6e 67 20 69 73 20 61 | 20 63 6f 6e 74 69 67 75 |ing is a| contigu|
|00001850| 6f 75 73 20 73 65 71 75 | 65 6e 63 65 20 6f 66 20 |ous sequ|ence of |
|00001860| 63 68 61 72 61 63 74 65 | 72 73 2c 20 75 70 20 74 |characte|rs, up t|
|00001870| 6f 20 61 20 6d 61 78 69 | 6d 75 6d 0d 0a 20 20 6c |o a maxi|mum.. l|
|00001880| 65 6e 67 74 68 20 6f 66 | 20 31 36 30 30 30 20 63 |ength of| 16000 c|
|00001890| 68 61 72 61 63 74 65 72 | 73 2e 20 53 74 72 69 6e |haracter|s. Strin|
|000018a0| 67 20 63 6f 6e 73 74 61 | 6e 74 73 20 6d 75 73 74 |g consta|nts must|
|000018b0| 20 62 65 20 65 6e 63 6c | 6f 73 65 64 20 69 6e 0d | be encl|osed in.|
|000018c0| 0a 20 20 65 69 74 68 65 | 72 20 73 69 6e 67 6c 65 |. eithe|r single|
|000018d0| 20 71 75 6f 74 65 73 20 | 28 27 29 20 6f 72 20 64 | quotes |(') or d|
|000018e0| 6f 75 62 6c 65 20 71 75 | 6f 74 65 73 20 28 22 29 |ouble qu|otes (")|
|000018f0| 20 61 6e 64 20 74 68 65 | 20 73 74 61 72 74 69 6e | and the| startin|
|00001900| 67 20 71 75 6f 74 65 0d | 0a 20 20 63 68 61 72 61 |g quote.|. chara|
|00001910| 63 74 65 72 20 6d 75 73 | 74 20 6d 61 74 63 68 20 |cter mus|t match |
|00001920| 74 68 65 20 65 6e 64 69 | 6e 67 20 71 75 6f 74 65 |the endi|ng quote|
|00001930| 20 63 68 61 72 61 63 74 | 65 72 2e 20 46 6f 72 20 | charact|er. For |
|00001940| 65 78 61 6d 70 6c 65 3a | 0d 0a 0d 0a 20 20 20 20 |example:|.... |
|00001950| 22 54 68 69 73 20 69 73 | 20 76 61 6c 69 64 20 73 |"This is| valid s|
|00001960| 74 72 69 6e 67 22 0d 0a | 20 20 20 20 27 54 68 69 |tring"..| 'Thi|
|00001970| 73 20 69 73 20 61 6c 73 | 6f 20 61 20 76 61 6c 69 |s is als|o a vali|
|00001980| 64 20 73 74 72 69 6e 67 | 27 0d 0a 20 20 20 20 22 |d string|'.. "|
|00001990| 54 68 69 73 20 69 73 20 | 27 4f 6b 27 22 0d 0a 20 |This is |'Ok'".. |
|000019a0| 20 20 20 27 54 68 69 73 | 20 69 73 20 22 4f 6b 22 | 'This| is "Ok"|
|000019b0| 20 74 6f 6f 27 0d 0a 0d | 0a 20 20 20 20 22 54 68 | too'...|. "Th|
|000019c0| 69 73 20 69 73 20 6e 6f | 74 20 61 20 73 74 72 69 |is is no|t a stri|
|000019d0| 6e 67 27 0d 0a 20 20 20 | 20 20 20 20 2f 2f 20 71 |ng'.. | // q|
|000019e0| 75 6f 74 65 73 20 64 6f | 6e 27 74 20 6d 61 74 63 |uotes do|n't matc|
|000019f0| 68 0d 0a 0d 0a 20 20 41 | 20 73 74 72 69 6e 67 20 |h.... A| string |
|00001a00| 77 69 74 68 20 6e 6f 20 | 63 68 61 72 61 63 74 65 |with no |characte|
|00001a10| 72 73 20 69 73 20 72 65 | 66 65 72 72 65 64 20 74 |rs is re|ferred t|
|00001a20| 6f 20 61 73 20 27 74 68 | 65 20 6e 75 6c 6c 20 73 |o as 'th|e null s|
|00001a30| 74 72 69 6e 67 27 3a 0d | 0a 0d 0a 20 20 20 20 27 |tring':.|... '|
|00001a40| 27 20 20 20 20 20 20 20 | 20 2f 2f 20 74 68 65 20 |' | // the |
|00001a50| 6e 75 6c 6c 20 73 74 72 | 69 6e 67 0d 0a 20 20 20 |null str|ing.. |
|00001a60| 20 22 22 20 20 20 20 20 | 20 20 20 2f 2f 20 74 68 | "" | // th|
|00001a70| 65 20 6e 75 6c 6c 20 73 | 74 72 69 6e 67 0d 0a 0d |e null s|tring...|
|00001a80| 0a 20 20 54 68 65 20 62 | 61 63 6b 73 6c 61 73 68 |. The b|ackslash|
|00001a90| 20 63 68 61 72 61 63 74 | 65 72 20 28 5c 29 20 69 | charact|er (\) i|
|00001aa0| 73 20 67 65 6e 65 72 61 | 6c 6c 79 20 75 73 65 64 |s genera|lly used|
|00001ab0| 20 74 6f 20 69 6e 64 69 | 63 61 74 65 20 74 68 61 | to indi|cate tha|
|00001ac0| 74 20 74 68 65 0d 0a 20 | 20 6e 65 78 74 20 63 68 |t the.. | next ch|
|00001ad0| 61 72 61 63 74 65 72 20 | 69 6e 20 74 68 65 20 73 |aracter |in the s|
|00001ae0| 74 72 69 6e 67 20 69 73 | 20 74 6f 20 62 65 20 69 |tring is| to be i|
|00001af0| 6e 74 65 72 70 72 65 74 | 65 64 20 6c 69 74 65 72 |nterpret|ed liter|
|00001b00| 61 6c 6c 79 2e 20 49 74 | 20 6d 61 79 20 62 65 0d |ally. It| may be.|
|00001b10| 0a 20 20 75 73 65 64 20 | 74 6f 20 65 6e 63 6c 6f |. used |to enclo|
|00001b20| 73 65 20 71 75 6f 74 65 | 20 63 68 61 72 61 63 74 |se quote| charact|
|00001b30| 65 72 73 20 28 61 6e 64 | 20 74 68 65 20 6c 69 74 |ers (and| the lit|
|00001b40| 65 72 61 6c 20 63 68 61 | 72 61 63 74 65 72 20 69 |eral cha|racter i|
|00001b50| 74 73 65 6c 66 29 20 69 | 6e 0d 0a 20 20 74 68 65 |tself) i|n.. the|
|00001b60| 20 73 74 72 69 6e 67 2e | 20 46 6f 72 20 65 78 61 | string.| For exa|
|00001b70| 6d 70 6c 65 3a 0d 0a 0d | 0a 20 20 20 20 27 5c 27 |mple:...|. '\'|
|00001b80| 27 20 20 20 20 20 20 2f | 2f 20 6f 6e 65 20 73 69 |' /|/ one si|
|00001b90| 6e 67 6c 65 20 71 75 6f | 74 65 0d 0a 20 20 20 20 |ngle quo|te.. |
|00001ba0| 22 5c 22 5c 22 27 22 20 | 20 20 2f 2f 20 74 77 6f |"\"\"'" | // two|
|00001bb0| 20 64 6f 75 62 6c 65 20 | 71 75 6f 74 65 73 20 61 | double |quotes a|
|00001bc0| 6e 64 20 61 20 73 69 6e | 67 6c 65 20 71 75 6f 74 |nd a sin|gle quot|
|00001bd0| 65 0d 0a 0d 0a 20 20 54 | 6f 20 65 6e 74 65 72 20 |e.... T|o enter |
|00001be0| 73 70 65 63 69 61 6c 20 | 63 6f 6e 74 72 6f 6c 20 |special |control |
|00001bf0| 63 68 61 72 61 63 74 65 | 72 73 20 69 6e 20 61 20 |characte|rs in a |
|00001c00| 73 74 72 69 6e 67 2c 20 | 74 68 65 20 62 61 63 6b |string, |the back|
|00001c10| 73 6c 61 73 68 0d 0a 20 | 20 63 68 61 72 61 63 74 |slash.. | charact|
|00001c20| 65 72 20 6d 61 79 20 62 | 65 20 75 73 65 64 20 77 |er may b|e used w|
|00001c30| 69 74 68 20 6f 6e 65 20 | 6f 66 20 74 68 65 20 66 |ith one |of the f|
|00001c40| 6f 6c 6c 6f 77 69 6e 67 | 20 6c 65 74 74 65 72 73 |ollowing| letters|
|00001c50| 3a 0d 0a 0d 0a 20 20 20 | 20 5c 61 20 2d 20 61 6c |:.... | \a - al|
|00001c60| 65 72 74 20 28 62 65 65 | 70 29 20 63 68 61 72 61 |ert (bee|p) chara|
|00001c70| 63 74 65 72 20 28 41 53 | 43 49 49 20 37 29 0d 0a |cter (AS|CII 7)..|
|00001c80| 20 20 20 20 5c 62 20 2d | 20 62 61 63 6b 73 70 61 | \b -| backspa|
|00001c90| 63 65 20 63 68 61 72 61 | 63 74 65 72 20 28 41 53 |ce chara|cter (AS|
|00001ca0| 43 49 49 20 38 29 0d 0a | 20 20 20 20 5c 66 20 2d |CII 8)..| \f -|
|00001cb0| 20 66 6f 72 6d 66 65 65 | 64 20 63 68 61 72 61 63 | formfee|d charac|
|00001cc0| 74 65 72 20 28 41 53 43 | 49 49 20 31 32 29 0d 0a |ter (ASC|II 12)..|
|00001cd0| 20 20 20 20 5c 6e 20 2d | 20 6e 65 77 6c 69 6e 65 | \n -| newline|
|00001ce0| 20 28 6c 69 6e 65 66 65 | 65 64 29 20 63 68 61 72 | (linefe|ed) char|
|00001cf0| 61 63 74 65 72 20 28 41 | 53 43 49 49 20 31 30 29 |acter (A|SCII 10)|
|00001d00| 0d 0a 20 20 20 20 5c 72 | 20 2d 20 72 65 74 75 72 |.. \r| - retur|
|00001d10| 6e 20 63 68 61 72 61 63 | 74 65 72 20 28 41 53 43 |n charac|ter (ASC|
|00001d20| 49 49 20 31 33 29 0d 0a | 20 20 20 20 5c 74 20 2d |II 13)..| \t -|
|00001d30| 20 74 61 62 20 63 68 61 | 72 61 63 74 65 72 20 28 | tab cha|racter (|
|00001d40| 41 53 43 49 49 20 39 29 | 0d 0a 20 20 20 20 5c 76 |ASCII 9)|.. \v|
|00001d50| 20 2d 20 76 65 72 74 69 | 63 61 6c 20 74 61 62 20 | - verti|cal tab |
|00001d60| 63 68 61 72 61 63 74 65 | 72 20 28 41 53 43 49 49 |characte|r (ASCII|
|00001d70| 20 31 31 29 0d 0a 20 20 | 20 20 5c 78 48 48 20 2d | 11).. | \xHH -|
|00001d80| 20 61 6e 79 20 68 65 78 | 20 63 68 61 72 61 63 74 | any hex| charact|
|00001d90| 65 72 0d 0a 0d 0a 20 20 | 46 6f 72 20 65 78 61 6d |er.... |For exam|
|00001da0| 70 6c 65 3a 0d 0a 0d 0a | 20 20 20 20 22 5c 72 5c |ple:....| "\r\|
|00001db0| 6e 22 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |n" | |
|00001dc0| 2f 2f 20 61 20 63 61 72 | 72 69 61 67 65 20 72 65 |// a car|riage re|
|00001dd0| 74 75 72 6e 20 61 6e 64 | 20 61 20 6c 69 6e 65 66 |turn and| a linef|
|00001de0| 65 65 64 0d 0a 20 20 20 | 20 27 5c 74 5c 78 30 30 |eed.. | '\t\x00|
|00001df0| 27 20 20 20 20 20 20 20 | 20 20 20 20 20 2f 2f 20 |' | // |
|00001e00| 61 20 74 61 62 20 63 68 | 61 72 61 63 74 65 72 20 |a tab ch|aracter |
|00001e10| 61 6e 64 20 61 20 62 69 | 6e 61 72 79 20 7a 65 72 |and a bi|nary zer|
|00001e20| 6f 0d 0a 0d 0a 20 20 49 | 66 20 74 68 65 20 62 61 |o.... I|f the ba|
|00001e30| 63 6b 73 6c 61 73 68 20 | 63 68 61 72 61 63 74 65 |ckslash |characte|
|00001e40| 72 20 28 5c 29 20 69 73 | 20 75 73 65 64 20 69 6e |r (\) is| used in|
|00001e50| 20 61 20 73 74 72 69 6e | 67 2c 20 69 74 20 6d 75 | a strin|g, it mu|
|00001e60| 73 74 20 62 65 0d 0a 20 | 20 70 72 65 63 65 64 65 |st be.. | precede|
|00001e70| 64 20 62 79 20 61 6e 6f | 74 68 65 72 20 62 61 63 |d by ano|ther bac|
|00001e80| 6b 73 6c 61 73 68 20 63 | 68 61 72 61 63 74 65 72 |kslash c|haracter|
|00001e90| 3a 0d 0a 0d 0a 20 20 20 | 20 27 5c 5c 5c 5c 27 20 |:.... | '\\\\' |
|00001ea0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 2f 2f 20 | | // |
|00001eb0| 61 20 73 74 72 69 6e 67 | 20 63 6f 6e 74 61 69 6e |a string| contain|
|00001ec0| 69 6e 67 20 74 77 6f 20 | 62 61 63 6b 73 6c 61 73 |ing two |backslas|
|00001ed0| 68 20 63 68 61 72 61 63 | 74 65 72 73 0d 0a 20 20 |h charac|ters.. |
|00001ee0| 20 20 22 43 3a 5c 5c 54 | 58 54 5c 5c 41 42 43 2e | "C:\\T|XT\\ABC.|
|00001ef0| 54 58 54 22 20 20 2f 2f | 20 61 20 66 75 6c 6c 79 |TXT" //| a fully|
|00001f00| 20 71 75 61 6c 69 66 69 | 65 64 20 66 69 6c 65 6e | qualifi|ed filen|
|00001f10| 61 6d 65 0d 0a 0d 0a 0d | 0a 20 20 4e 75 6d 62 65 |ame.....|. Numbe|
|00001f20| 72 73 00 0d 0a 20 20 c4 | c4 c4 c4 c4 c4 c4 0d 0a |rs... .|........|
|00001f30| 20 20 54 68 65 20 6d 61 | 63 72 6f 20 6c 61 6e 67 | The ma|cro lang|
|00001f40| 75 61 67 65 20 73 75 70 | 70 6f 72 74 73 20 62 6f |uage sup|ports bo|
|00001f50| 74 68 20 64 65 63 69 6d | 61 6c 20 61 6e 64 20 68 |th decim|al and h|
|00001f60| 65 78 61 64 65 63 69 6d | 61 6c 20 69 6e 74 65 67 |exadecim|al integ|
|00001f70| 65 72 0d 0a 20 20 63 6f | 6e 73 74 61 6e 74 73 2e |er.. co|nstants.|
|00001f80| 20 41 20 64 65 63 69 6d | 61 6c 20 63 6f 6e 73 74 | A decim|al const|
|00001f90| 61 6e 74 20 69 73 20 61 | 20 63 6f 6e 74 69 67 75 |ant is a| contigu|
|00001fa0| 6f 75 73 20 73 65 71 75 | 65 6e 63 65 20 6f 66 20 |ous sequ|ence of |
|00001fb0| 6e 75 6d 65 72 69 63 0d | 0a 20 20 64 69 67 69 74 |numeric.|. digit|
|00001fc0| 73 2e 20 41 20 68 65 78 | 61 64 65 63 69 6d 61 6c |s. A hex|adecimal|
|00001fd0| 20 63 6f 6e 73 74 61 6e | 74 20 69 73 20 63 6f 6e | constan|t is con|
|00001fe0| 74 69 67 75 6f 75 73 20 | 73 65 71 75 65 6e 63 65 |tiguous |sequence|
|00001ff0| 20 6f 66 20 6e 75 6d 65 | 72 69 63 0d 0a 20 20 64 | of nume|ric.. d|
|00002000| 69 67 69 74 73 20 6f 72 | 20 74 68 65 20 6c 65 74 |igits or| the let|
|00002010| 74 65 72 73 20 41 20 74 | 68 72 6f 75 67 68 20 46 |ters A t|hrough F|
|00002020| 20 66 6f 6c 6c 6f 77 65 | 64 20 62 79 20 74 68 65 | followe|d by the|
|00002030| 20 6c 65 74 74 65 72 20 | 27 68 27 20 28 74 68 65 | letter |'h' (the|
|00002040| 0d 0a 20 20 63 68 61 72 | 61 63 74 65 72 73 20 41 |.. char|acters A|
|00002050| 20 74 68 72 6f 75 67 68 | 20 46 20 61 6e 64 20 27 | through| F and '|
|00002060| 68 27 20 6d 61 79 20 62 | 65 20 69 6e 20 6d 69 78 |h' may b|e in mix|
|00002070| 65 64 20 63 61 73 65 29 | 2e 20 42 6f 74 68 20 64 |ed case)|. Both d|
|00002080| 65 63 69 6d 61 6c 20 61 | 6e 64 0d 0a 20 20 68 65 |ecimal a|nd.. he|
|00002090| 78 61 64 65 63 69 6d 61 | 6c 20 63 6f 6e 73 74 61 |xadecima|l consta|
|000020a0| 6e 74 73 20 6d 75 73 74 | 20 62 65 67 69 6e 20 77 |nts must| begin w|
|000020b0| 69 74 68 20 61 20 6e 75 | 6d 65 72 69 63 20 64 69 |ith a nu|meric di|
|000020c0| 67 69 74 2e 20 46 6f 72 | 20 65 78 61 6d 70 6c 65 |git. For| example|
|000020d0| 3a 0d 0a 0d 0a 20 20 20 | 20 32 20 20 20 37 32 20 |:.... | 2 72 |
|000020e0| 20 20 31 32 33 34 35 36 | 37 20 20 20 20 20 2f 2f | 123456|7 //|
|000020f0| 20 76 61 6c 69 64 20 64 | 65 63 69 6d 61 6c 20 6e | valid d|ecimal n|
|00002100| 75 6d 62 65 72 73 0d 0a | 20 20 20 20 30 68 20 20 |umbers..| 0h |
|00002110| 32 30 68 20 20 30 44 68 | 20 20 30 66 66 48 20 20 |20h 0Dh| 0ffH |
|00002120| 20 2f 2f 20 76 61 6c 69 | 64 20 68 65 78 61 64 65 | // vali|d hexade|
|00002130| 63 69 6d 61 6c 20 6e 75 | 6d 62 65 72 73 0d 0a 0d |cimal nu|mbers...|
|00002140| 0a 20 20 20 20 66 66 68 | 20 20 20 20 20 20 20 20 |. ffh| |
|00002150| 20 20 20 20 20 20 20 20 | 20 20 2f 2f 20 69 6e 76 | | // inv|
|00002160| 61 6c 69 64 20 2d 20 6d | 75 73 74 20 62 65 67 69 |alid - m|ust begi|
|00002170| 6e 20 77 69 74 68 20 61 | 20 6e 75 6d 65 72 69 63 |n with a| numeric|
|00002180| 20 64 69 67 69 74 0d 0a | 0d 0a 20 20 41 6c 6c 20 | digit..|.. All |
|00002190| 6e 75 6d 62 65 72 73 20 | 6d 75 73 74 20 62 65 20 |numbers |must be |
|000021a0| 77 69 74 68 69 6e 20 74 | 68 65 20 72 61 6e 67 65 |within t|he range|
|000021b0| 20 2d 32 2c 31 34 37 2c | 34 38 33 2c 36 34 38 20 | -2,147,|483,648 |
|000021c0| 74 6f 20 32 2c 31 34 37 | 2c 34 38 33 2c 36 34 37 |to 2,147|,483,647|
|000021d0| 0d 0a 20 20 61 6e 64 20 | 6d 75 73 74 20 62 65 20 |.. and |must be |
|000021e0| 69 6e 74 65 67 65 72 73 | 2e 0d 0a 0d 0a 0d 0a 20 |integers|....... |
|000021f0| 20 53 70 61 63 65 73 00 | 0d 0a 20 20 c4 c4 c4 c4 | Spaces.|.. ....|
|00002200| c4 c4 0d 0a 20 20 54 6f | 20 69 6d 70 72 6f 76 65 |.... To| improve|
|00002210| 20 72 65 61 64 61 62 69 | 6c 69 74 79 2c 20 73 70 | readabi|lity, sp|
|00002220| 61 63 65 73 20 61 6e 64 | 20 6c 69 6e 65 73 20 6d |aces and| lines m|
|00002230| 61 6e 79 20 62 65 20 69 | 6e 73 65 72 74 65 64 20 |any be i|nserted |
|00002240| 61 6e 79 77 68 65 72 65 | 0d 0a 20 20 77 69 74 68 |anywhere|.. with|
|00002250| 69 6e 20 79 6f 75 72 20 | 6d 61 63 72 6f 20 73 6f |in your |macro so|
|00002260| 75 72 63 65 20 63 6f 64 | 65 2c 20 61 73 20 6c 6f |urce cod|e, as lo|
|00002270| 6e 67 20 61 73 20 74 68 | 65 79 20 61 72 65 20 6e |ng as th|ey are n|
|00002280| 6f 74 20 69 6e 73 65 72 | 74 65 64 20 77 69 74 68 |ot inser|ted with|
|00002290| 69 6e 0d 0a 20 20 72 65 | 73 65 72 76 65 64 20 77 |in.. re|served w|
|000022a0| 6f 72 64 73 2c 20 69 64 | 65 6e 74 69 66 69 65 72 |ords, id|entifier|
|000022b0| 73 2c 20 6d 75 6c 74 69 | 2d 63 68 61 72 61 63 74 |s, multi|-charact|
|000022c0| 65 72 20 6f 70 65 72 61 | 74 6f 72 73 2c 20 73 74 |er opera|tors, st|
|000022d0| 72 69 6e 67 73 2c 20 6f | 72 0d 0a 20 20 6e 75 6d |rings, o|r.. num|
|000022e0| 62 65 72 73 2e 20 46 6f | 72 20 65 78 61 6d 70 6c |bers. Fo|r exampl|
|000022f0| 65 3a 0d 0a 0d 0a 20 20 | 20 20 61 3d 32 20 62 3d |e:.... | a=2 b=|
|00002300| 22 61 20 69 73 20 74 77 | 6f 22 ff 69 66 ff 61 3d |"a is tw|o".if.a=|
|00002310| 3d 32 ff 74 68 65 6e ff | 73 61 79 20 62 ff 65 6e |=2.then.|say b.en|
|00002320| 64 ff 0d 0a 0d 0a 20 20 | 63 6f 75 6c 64 20 62 65 |d..... |could be|
|00002330| 20 72 65 77 72 69 74 74 | 65 6e 20 61 73 3a 0d 0a | rewritt|en as:..|
|00002340| 0d 0a 20 20 20 20 61 20 | 3d 20 32 0d 0a 20 20 20 |.. a |= 2.. |
|00002350| 20 62 20 3d 20 22 61 20 | 69 73 20 74 77 6f 22 0d | b = "a |is two".|
|00002360| 0a 0d 0a 20 20 20 ff 69 | 66 ff 61 20 3d 3d 20 32 |... .i|f.a == 2|
|00002370| ff 74 68 65 6e ff 0d 0a | 20 20 20 20 20 20 73 61 |.then...| sa|
|00002380| 79 20 62 0d 0a 20 20 20 | ff 65 6e 64 ff 0d 0a 0d |y b.. |.end....|
|00002390| 0a 0d 0a 20 20 43 6f 6d | 6d 65 6e 74 73 00 0d 0a |... Com|ments...|
|000023a0| 20 20 c4 c4 c4 c4 c4 c4 | c4 c4 0d 0a 20 20 43 6f | ......|.... Co|
|000023b0| 6d 6d 65 6e 74 73 20 63 | 61 6e 20 6d 61 6b 65 20 |mments c|an make |
|000023c0| 79 6f 75 72 20 73 6f 75 | 72 63 65 20 63 6f 64 65 |your sou|rce code|
|000023d0| 20 6d 75 63 68 20 6d 6f | 72 65 20 64 65 73 63 72 | much mo|re descr|
|000023e0| 69 70 74 69 76 65 20 61 | 6e 64 20 72 65 61 64 61 |iptive a|nd reada|
|000023f0| 62 6c 65 2e 0d 0a 20 20 | 41 4d 4c 20 73 75 70 70 |ble... |AML supp|
|00002400| 6f 72 74 73 20 62 6f 74 | 68 20 73 69 6e 67 6c 65 |orts bot|h single|
|00002410| 2d 6c 69 6e 65 20 61 6e | 64 20 6d 75 6c 74 69 2d |-line an|d multi-|
|00002420| 6c 69 6e 65 20 63 6f 6d | 6d 65 6e 74 73 2e 0d 0a |line com|ments...|
|00002430| 0d 0a 20 20 54 6f 20 70 | 6c 61 63 65 20 61 20 63 |.. To p|lace a c|
|00002440| 6f 6d 6d 65 6e 74 20 61 | 74 20 74 68 65 20 65 6e |omment a|t the en|
|00002450| 64 20 6f 66 20 61 20 73 | 69 6e 67 6c 65 20 6c 69 |d of a s|ingle li|
|00002460| 6e 65 2c 20 75 73 65 20 | 74 68 65 20 73 69 6e 67 |ne, use |the sing|
|00002470| 6c 65 2d 6c 69 6e 65 0d | 0a 20 20 63 6f 6d 6d 65 |le-line.|. comme|
|00002480| 6e 74 20 64 65 6c 69 6d | 69 74 65 72 20 27 2f 2f |nt delim|iter '//|
|00002490| 27 2e 20 49 6e 20 61 20 | 73 69 6e 67 6c 65 20 6c |'. In a |single l|
|000024a0| 69 6e 65 20 63 6f 6d 6d | 65 6e 74 2c 20 61 6e 79 |ine comm|ent, any|
|000024b0| 20 63 68 61 72 61 63 74 | 65 72 73 0d 0a 20 20 6c | charact|ers.. l|
|000024c0| 6f 63 61 74 65 64 20 62 | 65 74 77 65 65 6e 20 74 |ocated b|etween t|
|000024d0| 68 65 20 64 65 6c 69 6d | 69 74 65 72 20 27 2f 2f |he delim|iter '//|
|000024e0| 27 20 61 6e 64 20 74 68 | 65 20 65 6e 64 20 6f 66 |' and th|e end of|
|000024f0| 20 74 68 65 20 6c 69 6e | 65 20 77 69 6c 6c 20 62 | the lin|e will b|
|00002500| 65 0d 0a 20 20 69 67 6e | 6f 72 65 64 2e 20 46 6f |e.. ign|ored. Fo|
|00002510| 72 20 65 78 61 6d 70 6c | 65 3a 0d 0a 0d 0a 20 20 |r exampl|e:.... |
|00002520| 20 20 78 20 3d 20 32 20 | 20 20 20 20 20 20 20 2f | x = 2 | /|
|00002530| 2f 20 74 68 69 73 20 69 | 73 20 61 20 73 69 6e 67 |/ this i|s a sing|
|00002540| 6c 65 20 6c 69 6e 65 20 | 63 6f 6d 6d 65 6e 74 0d |le line |comment.|
|00002550| 0a 0d 0a 20 20 20 20 2f | 2f 20 74 68 69 73 20 69 |... /|/ this i|
|00002560| 73 20 61 6e 6f 74 68 65 | 72 20 73 69 6e 67 6c 65 |s anothe|r single|
|00002570| 20 6c 69 6e 65 20 63 6f | 6d 6d 65 6e 74 0d 0a 20 | line co|mment.. |
|00002580| 20 20 20 79 20 3d 20 33 | 0d 0a 0d 0a 20 20 4d 75 | y = 3|.... Mu|
|00002590| 6c 74 69 2d 6c 69 6e 65 | 20 63 6f 6d 6d 65 6e 74 |lti-line| comment|
|000025a0| 73 20 63 61 6e 20 73 70 | 61 6e 20 61 6e 79 20 6e |s can sp|an any n|
|000025b0| 75 6d 62 65 72 20 6f 66 | 20 6c 69 6e 65 73 2e 20 |umber of| lines. |
|000025c0| 46 6f 72 20 6d 75 6c 74 | 69 2d 6c 69 6e 65 0d 0a |For mult|i-line..|
|000025d0| 20 20 63 6f 6d 6d 65 6e | 74 73 2c 20 61 6e 79 20 | commen|ts, any |
|000025e0| 63 68 61 72 61 63 74 65 | 72 73 20 6c 6f 63 61 74 |characte|rs locat|
|000025f0| 65 64 20 62 65 74 77 65 | 65 6e 20 74 68 65 20 63 |ed betwe|en the c|
|00002600| 6f 6d 6d 65 6e 74 20 64 | 65 6c 69 6d 69 74 65 72 |omment d|elimiter|
|00002610| 73 20 27 2f 2a 27 0d 0a | 20 20 61 6e 64 20 27 2a |s '/*'..| and '*|
|00002620| 2f 27 20 61 72 65 20 69 | 67 6e 6f 72 65 64 2e 20 |/' are i|gnored. |
|00002630| 46 6f 72 20 65 78 61 6d | 70 6c 65 3a 0d 0a 0d 0a |For exam|ple:....|
|00002640| 20 20 20 20 78 20 3d 20 | 32 20 20 2f 2a 20 74 68 | x = |2 /* th|
|00002650| 69 73 20 69 73 20 6d 75 | 6c 74 69 2d 6c 69 6e 65 |is is mu|lti-line|
|00002660| 20 63 6f 6d 6d 65 6e 74 | 20 2a 2f 20 20 79 20 3d | comment| */ y =|
|00002670| 20 33 0d 0a 0d 0a 20 20 | 20 20 2f 2a 20 74 68 69 | 3.... | /* thi|
|00002680| 73 20 69 73 0d 0a 20 20 | 20 20 20 20 20 61 6e 6f |s is.. | ano|
|00002690| 74 68 65 72 0d 0a 20 20 | 20 20 20 20 20 6d 75 6c |ther.. | mul|
|000026a0| 74 69 2d 6c 69 6e 65 0d | 0a 20 20 20 20 20 20 20 |ti-line.|. |
|000026b0| 63 6f 6d 6d 65 6e 74 20 | 2a 2f 0d 0a 20 20 20 20 |comment |*/.. |
|000026c0| 79 20 3d 20 33 0d 0a 0d | 0a 20 20 4d 75 6c 74 69 |y = 3...|. Multi|
|000026d0| 2d 6c 69 6e 65 20 63 6f | 6d 6d 65 6e 74 73 20 63 |-line co|mments c|
|000026e0| 61 6e 6e 6f 74 20 62 65 | 20 6e 65 73 74 65 64 2e |annot be| nested.|
|000026f0| 0d 0a 0d 0a 0d 0a 20 20 | 56 61 72 69 61 62 6c 65 |...... |Variable|
|00002700| 73 00 0d 0a 20 20 c4 c4 | c4 c4 c4 c4 c4 c4 c4 0d |s... ..|........|
|00002710| 0a 20 20 41 20 76 61 72 | 69 61 62 6c 65 20 69 73 |. A var|iable is|
|00002720| 20 61 6e 20 69 64 65 6e | 74 69 66 69 65 72 20 77 | an iden|tifier w|
|00002730| 68 69 63 68 20 69 73 20 | 61 73 73 6f 63 69 61 74 |hich is |associat|
|00002740| 65 64 20 77 69 74 68 20 | 61 20 76 61 6c 75 65 20 |ed with |a value |
|00002750| 74 68 61 74 20 63 61 6e | 0d 0a 20 20 62 65 20 63 |that can|.. be c|
|00002760| 68 61 6e 67 65 64 20 64 | 75 72 69 6e 67 20 65 78 |hanged d|uring ex|
|00002770| 65 63 75 74 69 6f 6e 2e | 20 53 69 6e 63 65 20 41 |ecution.| Since A|
|00002780| 4d 4c 20 69 73 20 74 79 | 70 65 6c 65 73 73 2c 20 |ML is ty|peless, |
|00002790| 76 61 72 69 61 62 6c 65 | 73 20 64 6f 20 6e 6f 74 |variable|s do not|
|000027a0| 0d 0a 20 20 6e 65 65 64 | 20 74 6f 20 62 65 20 64 |.. need| to be d|
|000027b0| 65 66 69 6e 65 64 20 77 | 69 74 68 20 64 61 74 61 |efined w|ith data|
|000027c0| 20 74 79 70 65 73 20 73 | 75 63 68 20 61 73 20 27 | types s|uch as '|
|000027d0| 6e 75 6d 65 72 69 63 27 | 2c 20 27 63 68 61 72 61 |numeric'|, 'chara|
|000027e0| 63 74 65 72 27 2c 20 6f | 72 0d 0a 20 20 27 73 74 |cter', o|r.. 'st|
|000027f0| 72 69 6e 67 27 2e 20 54 | 68 65 20 6d 61 63 72 6f |ring'. T|he macro|
|00002800| 20 6c 61 6e 67 75 61 67 | 65 20 63 6f 6d 70 69 6c | languag|e compil|
|00002810| 65 72 20 61 6e 64 20 69 | 6e 74 65 72 70 72 65 74 |er and i|nterpret|
|00002820| 65 72 20 77 69 6c 6c 0d | 0a 20 20 61 75 74 6f 6d |er will.|. autom|
|00002830| 61 74 69 63 61 6c 6c 79 | 20 68 61 6e 64 6c 65 20 |atically| handle |
|00002840| 74 68 65 73 65 20 64 61 | 74 61 20 74 79 70 65 73 |these da|ta types|
|00002850| 20 69 6e 74 65 72 6e 61 | 6c 6c 79 2c 20 62 61 73 | interna|lly, bas|
|00002860| 65 64 20 6f 6e 20 74 68 | 65 20 75 73 61 67 65 0d |ed on th|e usage.|
|00002870| 0a 20 20 6f 66 20 74 68 | 65 20 76 61 72 69 61 62 |. of th|e variab|
|00002880| 6c 65 2e 0d 0a 0d 0a 20 | 20 56 61 72 69 61 62 6c |le..... | Variabl|
|00002890| 65 73 20 66 61 6c 6c 20 | 69 6e 74 6f 20 74 68 72 |es fall |into thr|
|000028a0| 65 65 20 63 61 74 65 67 | 6f 72 69 65 73 3a 0d 0a |ee categ|ories:..|
|000028b0| 0d 0a 20 20 4c 6f 63 61 | 6c 20 76 61 72 69 61 62 |.. Loca|l variab|
|000028c0| 6c 65 73 3a 0d 0a 20 20 | 20 20 4c 6f 63 61 6c 20 |les:.. | Local |
|000028d0| 76 61 72 69 61 62 6c 65 | 73 20 61 72 65 20 64 65 |variable|s are de|
|000028e0| 66 69 6e 65 64 20 6f 6e | 6c 79 20 77 69 74 68 69 |fined on|ly withi|
|000028f0| 6e 20 74 68 65 20 73 63 | 6f 70 65 20 6f 66 20 61 |n the sc|ope of a|
|00002900| 20 66 75 6e 63 74 69 6f | 6e 0d 0a 20 20 20 20 64 | functio|n.. d|
|00002910| 65 66 69 6e 69 74 69 6f | 6e 20 61 6e 64 20 6f 6e |efinitio|n and on|
|00002920| 6c 79 20 68 61 76 65 20 | 76 61 6c 75 65 73 20 77 |ly have |values w|
|00002930| 68 69 6c 65 20 74 68 65 | 20 66 75 6e 63 74 69 6f |hile the| functio|
|00002940| 6e 20 69 73 20 65 78 65 | 63 75 74 69 6e 67 2e 0d |n is exe|cuting..|
|00002950| 0a 20 20 20 20 4c 6f 63 | 61 6c 20 76 61 72 69 61 |. Loc|al varia|
|00002960| 62 6c 65 73 20 63 61 6e | 20 6f 6e 6c 79 20 62 65 |bles can| only be|
|00002970| 20 72 65 66 65 72 65 6e | 63 65 64 20 61 66 74 65 | referen|ced afte|
|00002980| 72 20 74 68 65 79 20 61 | 72 65 20 64 65 66 69 6e |r they a|re defin|
|00002990| 65 64 20 61 6e 64 0d 0a | 20 20 20 20 6f 6e 6c 79 |ed and..| only|
|000029a0| 20 66 72 6f 6d 20 77 69 | 74 68 69 6e 20 74 68 65 | from wi|thin the|
|000029b0| 20 66 75 6e 63 74 69 6f | 6e 20 69 6e 20 77 68 69 | functio|n in whi|
|000029c0| 63 68 20 74 68 65 79 20 | 61 72 65 20 64 65 66 69 |ch they |are defi|
|000029d0| 6e 65 64 2e 20 46 6f 72 | 0d 0a 20 20 20 20 65 78 |ned. For|.. ex|
|000029e0| 61 6d 70 6c 65 3a 0d 0a | 20 20 20 20 20 20 20 20 |ample:..| |
|000029f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002a00| 2f 2f 20 76 61 72 69 61 | 62 6c 65 20 27 61 27 20 |// varia|ble 'a' |
|00002a10| 69 73 20 6e 6f 74 20 64 | 65 66 69 6e 65 64 20 68 |is not d|efined h|
|00002a20| 65 72 65 0d 0a 20 20 20 | 20 20 ff 66 75 6e 63 74 |ere.. | .funct|
|00002a30| 69 6f 6e ff 78 79 7a 0d | 0a 20 20 20 20 20 20 20 |ion.xyz.|. |
|00002a40| 20 61 20 3d 20 31 20 20 | 20 20 20 20 20 20 20 20 | a = 1 | |
|00002a50| 20 2f 2f 20 76 61 72 69 | 61 62 6c 65 20 27 61 27 | // vari|able 'a'|
|00002a60| 20 69 73 20 6c 6f 63 61 | 6c 20 74 6f 20 66 75 6e | is loca|l to fun|
|00002a70| 63 74 69 6f 6e 20 27 78 | 79 7a 27 0d 0a 20 20 20 |ction 'x|yz'.. |
|00002a80| 20 20 ff 65 6e 64 ff 0d | 0a 20 20 20 20 20 20 20 | .end..|. |
|00002a90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002aa0| 20 2f 2f 20 76 61 72 69 | 61 62 6c 65 20 27 61 27 | // vari|able 'a'|
|00002ab0| 20 69 73 20 6e 6f 74 20 | 64 65 66 69 6e 65 64 20 | is not |defined |
|00002ac0| 68 65 72 65 0d 0a 0d 0a | 20 20 47 6c 6f 62 61 6c |here....| Global|
|00002ad0| 20 76 61 72 69 61 62 6c | 65 73 3a 0d 0a 20 20 20 | variabl|es:.. |
|00002ae0| 20 47 6c 6f 62 61 6c 20 | 76 61 72 69 61 62 6c 65 | Global |variable|
|00002af0| 73 20 61 72 65 20 64 65 | 66 69 6e 65 64 20 6f 75 |s are de|fined ou|
|00002b00| 74 73 69 64 65 20 74 68 | 65 20 73 63 6f 70 65 20 |tside th|e scope |
|00002b10| 6f 66 20 61 6e 79 20 66 | 75 6e 63 74 69 6f 6e 0d |of any f|unction.|
|00002b20| 0a 20 20 20 20 64 65 66 | 69 6e 69 74 69 6f 6e 20 |. def|inition |
|00002b30| 61 6e 64 20 6f 6e 6c 79 | 20 68 61 76 65 20 76 61 |and only| have va|
|00002b40| 6c 75 65 73 20 77 68 69 | 6c 65 20 74 68 65 20 6d |lues whi|le the m|
|00002b50| 61 63 72 6f 20 66 69 6c | 65 20 69 6e 20 77 68 69 |acro fil|e in whi|
|00002b60| 63 68 20 74 68 65 79 0d | 0a 20 20 20 20 61 72 65 |ch they.|. are|
|00002b70| 20 63 6f 6e 74 61 69 6e | 65 64 20 69 73 20 72 65 | contain|ed is re|
|00002b80| 73 69 64 65 6e 74 2e 20 | 47 6c 6f 62 61 6c 20 76 |sident. |Global v|
|00002b90| 61 72 69 61 62 6c 65 73 | 20 63 61 6e 20 6f 6e 6c |ariables| can onl|
|00002ba0| 79 20 62 65 20 72 65 66 | 65 72 65 6e 63 65 64 0d |y be ref|erenced.|
|00002bb0| 0a 20 20 20 20 61 66 74 | 65 72 20 74 68 65 79 20 |. aft|er they |
|00002bc0| 61 72 65 20 64 65 66 69 | 6e 65 64 20 61 6e 64 20 |are defi|ned and |
|00002bd0| 6f 6e 6c 79 20 66 72 6f | 6d 20 77 69 74 68 69 6e |only fro|m within|
|00002be0| 20 74 68 65 20 6d 61 63 | 72 6f 20 73 6f 75 72 63 | the mac|ro sourc|
|00002bf0| 65 20 66 69 6c 65 20 69 | 6e 0d 0a 20 20 20 20 77 |e file i|n.. w|
|00002c00| 68 69 63 68 20 74 68 65 | 79 20 61 72 65 20 64 65 |hich the|y are de|
|00002c10| 66 69 6e 65 64 2e 0d 0a | 0d 0a 20 20 20 20 47 6c |fined...|.. Gl|
|00002c20| 6f 62 61 6c 20 76 61 72 | 69 61 62 6c 65 73 20 63 |obal var|iables c|
|00002c30| 61 6e 20 62 65 20 72 65 | 66 65 72 65 6e 63 65 64 |an be re|ferenced|
|00002c40| 20 66 72 6f 6d 20 69 6e | 73 69 64 65 20 6f 72 20 | from in|side or |
|00002c50| 6f 75 74 73 69 64 65 20 | 74 68 65 20 73 63 6f 70 |outside |the scop|
|00002c60| 65 0d 0a 20 20 20 20 6f | 66 20 61 20 66 75 6e 63 |e.. o|f a func|
|00002c70| 74 69 6f 6e 20 64 65 66 | 69 6e 69 74 69 6f 6e 2e |tion def|inition.|
|00002c80| 20 46 6f 72 20 65 78 61 | 6d 70 6c 65 3a 0d 0a 0d | For exa|mple:...|
|00002c90| 0a 20 20 20 20 20 20 67 | 20 3d 20 32 20 20 20 20 |. g| = 2 |
|00002ca0| 20 20 20 20 20 20 20 20 | 20 2f 2f 20 27 67 27 20 | | // 'g' |
|00002cb0| 69 73 20 61 20 67 6c 6f | 62 61 6c 20 76 61 72 69 |is a glo|bal vari|
|00002cc0| 61 62 6c 65 0d 0a 20 20 | 20 20 20 ff 66 75 6e 63 |able.. | .func|
|00002cd0| 74 69 6f 6e ff 78 79 7a | 0d 0a 20 20 20 20 20 20 |tion.xyz|.. |
|00002ce0| 20 20 61 20 3d 20 67 20 | 20 20 20 20 20 20 20 20 | a = g | |
|00002cf0| 20 20 2f 2f 20 27 67 27 | 20 69 73 20 64 65 66 69 | // 'g'| is defi|
|00002d00| 6e 65 64 20 68 65 72 65 | 2c 20 27 61 27 20 69 73 |ned here|, 'a' is|
|00002d10| 20 6c 6f 63 61 6c 0d 0a | 20 20 20 20 20 ff 65 6e | local..| .en|
|00002d20| 64 ff 0d 0a 20 20 20 20 | 20 20 67 20 3d 20 33 20 |d... | g = 3 |
|00002d30| 20 20 20 20 20 20 20 20 | 20 20 20 20 2f 2f 20 27 | | // '|
|00002d40| 67 27 20 69 73 20 64 65 | 66 69 6e 65 64 20 68 65 |g' is de|fined he|
|00002d50| 72 65 0d 0a 0d 0a 20 20 | 20 20 49 66 20 61 20 72 |re.... | If a r|
|00002d60| 65 66 65 72 65 6e 63 65 | 20 69 73 20 6d 61 64 65 |eference| is made|
|00002d70| 20 74 6f 20 61 20 76 61 | 72 69 61 62 6c 65 20 66 | to a va|riable f|
|00002d80| 72 6f 6d 20 77 69 74 68 | 69 6e 20 61 20 66 75 6e |rom with|in a fun|
|00002d90| 63 74 69 6f 6e 20 61 6e | 64 20 74 68 65 0d 0a 20 |ction an|d the.. |
|00002da0| 20 20 20 76 61 72 69 61 | 62 6c 65 20 6e 61 6d 65 | varia|ble name|
|00002db0| 20 72 65 66 65 72 73 20 | 74 6f 20 62 6f 74 68 20 | refers |to both |
|00002dc0| 61 20 6c 6f 63 61 6c 20 | 61 6e 64 20 61 20 67 6c |a local |and a gl|
|00002dd0| 6f 62 61 6c 20 76 61 72 | 69 61 62 6c 65 2c 20 74 |obal var|iable, t|
|00002de0| 68 65 6e 20 74 68 65 0d | 0a 20 20 20 20 6c 6f 63 |hen the.|. loc|
|00002df0| 61 6c 20 76 61 72 69 61 | 62 6c 65 20 61 6c 77 61 |al varia|ble alwa|
|00002e00| 79 73 20 74 61 6b 65 73 | 20 70 72 65 63 65 64 65 |ys takes| precede|
|00002e10| 6e 63 65 2e 0d 0a 0d 0a | 20 20 4f 62 6a 65 63 74 |nce.....| Object|
|00002e20| 20 76 61 72 69 61 62 6c | 65 73 3a 0d 0a 20 20 20 | variabl|es:.. |
|00002e30| 20 4f 62 6a 65 63 74 20 | 76 61 72 69 61 62 6c 65 | Object |variable|
|00002e40| 73 20 61 72 65 20 64 65 | 66 69 6e 65 64 20 61 73 |s are de|fined as|
|00002e50| 20 74 68 65 79 20 61 72 | 65 20 75 73 65 64 20 66 | they ar|e used f|
|00002e60| 72 6f 6d 20 61 6e 79 20 | 6c 6f 63 61 74 69 6f 6e |rom any |location|
|00002e70| 0d 0a 20 20 20 20 77 69 | 74 68 69 6e 20 61 20 6d |.. wi|thin a m|
|00002e80| 61 63 72 6f 2e 20 57 68 | 65 6e 20 61 6e 20 6f 62 |acro. Wh|en an ob|
|00002e90| 6a 65 63 74 20 76 61 72 | 69 61 62 6c 65 20 69 73 |ject var|iable is|
|00002ea0| 20 61 73 73 69 67 6e 65 | 64 20 61 20 76 61 6c 75 | assigne|d a valu|
|00002eb0| 65 2c 20 69 74 0d 0a 20 | 20 20 20 63 6f 6e 74 69 |e, it.. | conti|
|00002ec0| 6e 75 65 73 20 74 6f 20 | 68 6f 6c 64 20 74 68 65 |nues to |hold the|
|00002ed0| 20 76 61 6c 75 65 20 75 | 6e 74 69 6c 20 69 74 20 | value u|ntil it |
|00002ee0| 69 73 20 61 73 73 69 67 | 6e 65 64 20 61 20 6e 65 |is assig|ned a ne|
|00002ef0| 77 20 76 61 6c 75 65 2c | 20 6f 72 20 74 68 65 0d |w value,| or the.|
|00002f00| 0a 20 20 20 20 6f 62 6a | 65 63 74 20 69 6e 20 77 |. obj|ect in w|
|00002f10| 68 69 63 68 20 69 74 20 | 69 73 20 63 6f 6e 74 61 |hich it |is conta|
|00002f20| 69 6e 65 64 20 69 73 20 | 64 65 73 74 72 6f 79 65 |ined is |destroye|
|00002f30| 64 20 28 73 65 65 20 27 | 4f 62 6a 65 63 74 73 27 |d (see '|Objects'|
|00002f40| 29 2e 0d 0a 0d 0a 20 20 | 20 20 4f 62 6a 65 63 74 |)..... | Object|
|00002f50| 20 76 61 72 69 61 62 6c | 65 73 20 77 68 69 63 68 | variabl|es which|
|00002f60| 20 61 72 65 20 61 73 73 | 69 67 6e 65 64 20 61 20 | are ass|igned a |
|00002f70| 76 61 6c 75 65 20 69 6e | 20 6f 6e 65 20 6d 61 63 |value in| one mac|
|00002f80| 72 6f 20 66 69 6c 65 20 | 63 61 6e 20 62 65 0d 0a |ro file |can be..|
|00002f90| 20 20 20 20 72 65 66 65 | 72 65 6e 63 65 64 20 69 | refe|renced i|
|00002fa0| 6e 20 61 6e 6f 74 68 65 | 72 20 6d 61 63 72 6f 20 |n anothe|r macro |
|00002fb0| 66 69 6c 65 2e 20 49 6e | 20 74 68 69 73 20 73 65 |file. In| this se|
|00002fc0| 6e 73 65 2c 20 6f 62 6a | 65 63 74 20 76 61 72 69 |nse, obj|ect vari|
|00002fd0| 61 62 6c 65 73 0d 0a 20 | 20 20 20 61 72 65 20 6d |ables.. | are m|
|00002fe0| 6f 72 65 20 70 65 72 73 | 69 73 74 65 6e 74 20 61 |ore pers|istent a|
|00002ff0| 6e 64 20 68 61 76 65 20 | 61 6e 20 65 76 65 6e 20 |nd have |an even |
|00003000| 6c 61 72 67 65 72 20 73 | 63 6f 70 65 20 74 68 61 |larger s|cope tha|
|00003010| 6e 20 67 6c 6f 62 61 6c | 0d 0a 20 20 20 20 76 61 |n global|.. va|
|00003020| 72 69 61 62 6c 65 73 2e | 20 4f 62 6a 65 63 74 20 |riables.| Object |
|00003030| 76 61 72 69 61 62 6c 65 | 73 20 63 61 6e 20 62 65 |variable|s can be|
|00003040| 20 72 65 66 65 72 65 6e | 63 65 64 20 66 72 6f 6d | referen|ced from|
|00003050| 20 61 6e 79 20 6c 6f 63 | 61 74 69 6f 6e 0d 0a 20 | any loc|ation.. |
|00003060| 20 20 20 77 69 74 68 69 | 6e 20 61 20 6d 61 63 72 | withi|n a macr|
|00003070| 6f 20 61 6e 64 20 6d 75 | 73 74 20 75 73 75 61 6c |o and mu|st usual|
|00003080| 6c 79 20 62 65 20 70 72 | 65 66 69 78 65 64 20 77 |ly be pr|efixed w|
|00003090| 69 74 68 20 61 6e 20 75 | 6e 64 65 72 73 63 6f 72 |ith an u|nderscor|
|000030a0| 65 0d 0a 20 20 20 20 63 | 68 61 72 61 63 74 65 72 |e.. c|haracter|
|000030b0| 20 77 68 65 6e 20 72 65 | 66 65 72 65 6e 63 65 64 | when re|ferenced|
|000030c0| 2e 20 46 6f 72 20 65 78 | 61 6d 70 6c 65 3a 0d 0a |. For ex|ample:..|
|000030d0| 0d 0a 20 20 20 20 20 20 | 5f 61 62 63 20 3d 20 32 |.. |_abc = 2|
|000030e0| 20 20 20 20 20 20 20 20 | 20 20 2f 2f 20 27 61 62 | | // 'ab|
|000030f0| 63 27 20 69 73 20 61 6e | 20 6f 62 6a 65 63 74 20 |c' is an| object |
|00003100| 76 61 72 69 61 62 6c 65 | 0d 0a 20 20 20 20 20 ff |variable|.. .|
|00003110| 66 75 6e 63 74 69 6f 6e | ff 78 79 7a 0d 0a 20 20 |function|.xyz.. |
|00003120| 20 20 20 20 20 20 61 20 | 3d 20 5f 61 62 63 20 20 | a |= _abc |
|00003130| 20 20 20 20 20 20 2f 2f | 20 27 61 62 63 27 20 69 | //| 'abc' i|
|00003140| 73 20 64 65 66 69 6e 65 | 64 20 68 65 72 65 2c 20 |s define|d here, |
|00003150| 27 61 27 20 69 73 20 6c | 6f 63 61 6c 0d 0a 20 20 |'a' is l|ocal.. |
|00003160| 20 20 20 ff 65 6e 64 ff | 0d 0a 20 20 20 20 20 20 | .end.|.. |
|00003170| 5f 61 62 63 20 3d 20 33 | 20 20 20 20 20 20 20 20 |_abc = 3| |
|00003180| 20 20 2f 2f 20 27 61 62 | 63 27 20 69 73 20 64 65 | // 'ab|c' is de|
|00003190| 66 69 6e 65 64 20 68 65 | 72 65 0d 0a 0d 0a 0d 0a |fined he|re......|
|000031a0| 20 20 54 68 65 20 41 73 | 73 69 67 6e 6d 65 6e 74 | The As|signment|
|000031b0| 20 53 74 61 74 65 6d 65 | 6e 74 00 0d 0a 20 20 c4 | Stateme|nt... .|
|000031c0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|000031d0| c4 c4 c4 c4 c4 c4 c4 0d | 0a 20 20 54 68 65 20 61 |........|. The a|
|000031e0| 73 73 69 67 6e 6d 65 6e | 74 20 73 74 61 74 65 6d |ssignmen|t statem|
|000031f0| 65 6e 74 20 69 73 20 75 | 73 65 64 20 74 6f 20 63 |ent is u|sed to c|
|00003200| 68 61 6e 67 65 20 74 68 | 65 20 76 61 6c 75 65 20 |hange th|e value |
|00003210| 6f 66 20 61 20 76 61 72 | 69 61 62 6c 65 2e 0d 0a |of a var|iable...|
|00003220| 20 20 41 73 73 69 67 6e | 6d 65 6e 74 20 73 74 61 | Assign|ment sta|
|00003230| 74 65 6d 65 6e 74 73 20 | 75 73 65 20 74 68 65 20 |tements |use the |
|00003240| 66 6f 6c 6c 6f 77 69 6e | 67 20 66 6f 72 6d 3a 0d |followin|g form:.|
|00003250| 0a 0d 0a 20 20 20 20 76 | 61 72 69 61 62 6c 65 5f |... v|ariable_|
|00003260| 6e 61 6d 65 ff 3d ff 65 | 78 70 72 65 73 73 69 6f |name.=.e|xpressio|
|00003270| 6e 0d 0a 0d 0a 20 20 77 | 68 65 72 65 20 74 68 65 |n.... w|here the|
|00003280| 20 76 61 72 69 61 62 6c | 65 20 27 76 61 72 69 61 | variabl|e 'varia|
|00003290| 62 6c 65 5f 6e 61 6d 65 | 27 20 69 73 20 61 73 73 |ble_name|' is ass|
|000032a0| 69 67 6e 65 64 20 74 68 | 65 20 76 61 6c 75 65 20 |igned th|e value |
|000032b0| 6f 66 0d 0a 20 20 27 65 | 78 70 72 65 73 73 69 6f |of.. 'e|xpressio|
|000032c0| 6e 27 2e 20 27 65 78 70 | 72 65 73 73 69 6f 6e 27 |n'. 'exp|ression'|
|000032d0| 20 6d 61 79 20 62 65 20 | 61 20 73 69 6d 70 6c 65 | may be |a simple|
|000032e0| 20 6f 72 20 63 6f 6d 70 | 6c 65 78 20 6d 61 63 72 | or comp|lex macr|
|000032f0| 6f 20 6c 61 6e 67 75 61 | 67 65 0d 0a 20 20 65 78 |o langua|ge.. ex|
|00003300| 70 72 65 73 73 69 6f 6e | 20 63 6f 6d 70 6f 73 65 |pression| compose|
|00003310| 64 20 6f 66 20 6e 75 6d | 62 65 72 73 2c 20 73 74 |d of num|bers, st|
|00003320| 72 69 6e 67 73 2c 20 6f | 74 68 65 72 20 76 61 72 |rings, o|ther var|
|00003330| 69 61 62 6c 65 73 2c 20 | 6f 74 68 65 72 0d 0a 20 |iables, |other.. |
|00003340| 20 65 78 70 72 65 73 73 | 69 6f 6e 73 2c 20 66 75 | express|ions, fu|
|00003350| 6e 63 74 69 6f 6e 20 63 | 61 6c 6c 73 2c 20 6f 72 |nction c|alls, or|
|00003360| 20 65 76 65 6e 20 6f 74 | 68 65 72 20 73 74 61 74 | even ot|her stat|
|00003370| 65 6d 65 6e 74 73 2e 0d | 0a 0d 0a 20 20 41 20 66 |ements..|... A f|
|00003380| 65 77 20 73 69 6d 70 6c | 65 20 65 78 61 6d 70 6c |ew simpl|e exampl|
|00003390| 65 73 20 6f 66 20 74 68 | 65 20 61 73 73 69 67 6e |es of th|e assign|
|000033a0| 6d 65 6e 74 20 73 74 61 | 74 65 6d 65 6e 74 20 61 |ment sta|tement a|
|000033b0| 72 65 3a 0d 0a 0d 0a 20 | 20 20 20 78 20 3d 20 32 |re:.... | x = 2|
|000033c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000033d0| 20 20 20 20 20 20 20 20 | 2f 2f 20 73 65 74 73 20 | |// sets |
|000033e0| 74 68 65 20 76 61 72 69 | 61 62 6c 65 20 78 20 74 |the vari|able x t|
|000033f0| 6f 20 32 0d 0a 20 20 20 | 20 78 20 3d 20 78 20 2b |o 2.. | x = x +|
|00003400| 20 33 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | 3 | |
|00003410| 20 20 20 20 20 20 2f 2f | 20 73 65 74 73 20 74 68 | //| sets th|
|00003420| 65 20 76 61 72 69 61 62 | 6c 65 20 78 20 74 6f 20 |e variab|le x to |
|00003430| 35 0d 0a 20 20 20 20 66 | 72 75 69 74 20 3d 20 27 |5.. f|ruit = '|
|00003440| 61 70 70 6c 65 27 20 20 | 20 20 20 20 20 20 20 20 |apple' | |
|00003450| 20 20 20 20 2f 2f 20 73 | 65 74 73 20 74 68 65 20 | // s|ets the |
|00003460| 76 61 72 69 61 62 6c 65 | 20 66 72 75 69 74 20 74 |variable| fruit t|
|00003470| 6f 20 27 61 70 70 6c 65 | 27 0d 0a 20 20 20 20 66 |o 'apple|'.. f|
|00003480| 72 75 69 74 73 20 3d 20 | 66 72 75 69 74 20 2b 20 |ruits = |fruit + |
|00003490| 22 20 6f 72 61 6e 67 65 | 22 20 20 20 2f 2f 20 73 |" orange|" // s|
|000034a0| 65 74 73 20 74 68 65 20 | 76 61 72 69 61 62 6c 65 |ets the |variable|
|000034b0| 20 66 72 75 69 74 73 20 | 74 6f 0d 0a 20 20 20 20 | fruits |to.. |
|000034c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000034d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 2f 2f 20 | | // |
|000034e0| 20 20 20 27 61 70 70 6c | 65 20 6f 72 61 6e 67 65 | 'appl|e orange|
|000034f0| 27 0d 0a 0d 0a 20 20 4f | 62 6a 65 63 74 20 76 61 |'.... O|bject va|
|00003500| 72 69 61 62 6c 65 73 20 | 63 61 6e 20 61 6c 73 6f |riables |can also|
|00003510| 20 62 65 20 61 73 73 69 | 67 6e 65 64 20 76 61 6c | be assi|gned val|
|00003520| 75 65 73 20 62 79 20 75 | 73 69 6e 67 20 74 68 65 |ues by u|sing the|
|00003530| 20 27 73 65 74 27 0d 0a | 20 20 73 74 61 74 65 6d | 'set'..| statem|
|00003540| 65 6e 74 2e 20 46 6f 72 | 20 65 78 61 6d 70 6c 65 |ent. For| example|
|00003550| 2c 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |, the fo|llowing |
|00003560| 74 77 6f 20 73 74 61 74 | 65 6d 65 6e 74 73 20 61 |two stat|ements a|
|00003570| 72 65 20 65 71 75 69 76 | 61 6c 65 6e 74 3a 0d 0a |re equiv|alent:..|
|00003580| 0d 0a 20 20 20 20 5f 63 | 6f 75 6e 74 20 3d 20 31 |.. _c|ount = 1|
|00003590| 20 20 20 20 20 2f 2f 20 | 73 65 74 20 6f 62 6a 65 | // |set obje|
|000035a0| 63 74 20 76 61 72 69 61 | 62 6c 65 20 27 63 6f 75 |ct varia|ble 'cou|
|000035b0| 6e 74 27 20 74 6f 20 31 | 0d 0a 20 20 20 ff 73 65 |nt' to 1|.. .se|
|000035c0| 74 ff 63 6f 75 6e 74 20 | 31 20 20 20 20 2f 2f 20 |t.count |1 // |
|000035d0| 73 65 74 20 6f 62 6a 65 | 63 74 20 76 61 72 69 61 |set obje|ct varia|
|000035e0| 62 6c 65 20 27 63 6f 75 | 6e 74 27 20 74 6f 20 31 |ble 'cou|nt' to 1|
|000035f0| 0d 0a 0d 0a 20 20 4e 6f | 74 65 20 74 68 61 74 20 |.... No|te that |
|00003600| 74 68 65 20 75 6e 64 65 | 72 73 63 6f 72 65 20 28 |the unde|rscore (|
|00003610| 5f 29 20 63 68 61 72 61 | 63 74 65 72 20 69 73 20 |_) chara|cter is |
|00003620| 6e 6f 74 20 72 65 71 75 | 69 72 65 64 20 77 68 65 |not requ|ired whe|
|00003630| 6e 20 61 6e 20 6f 62 6a | 65 63 74 0d 0a 20 20 76 |n an obj|ect.. v|
|00003640| 61 72 69 61 62 6c 65 20 | 69 73 20 72 65 66 65 72 |ariable |is refer|
|00003650| 65 6e 63 65 64 20 69 6e | 20 74 68 65 20 66 69 72 |enced in| the fir|
|00003660| 73 74 20 70 61 72 74 20 | 6f 66 20 74 68 65 20 27 |st part |of the '|
|00003670| 73 65 74 27 20 73 74 61 | 74 65 6d 65 6e 74 2e 0d |set' sta|tement..|
|00003680| 0a 0d 0a 0d 0a 20 20 56 | 61 72 69 61 62 6c 65 20 |..... V|ariable |
|00003690| 44 65 63 6c 61 72 61 74 | 69 6f 6e 73 00 0d 0a 20 |Declarat|ions... |
|000036a0| 20 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 | .......|........|
|000036b0| c4 c4 c4 c4 c4 c4 0d 0a | 20 20 49 6e 20 6d 6f 73 |........| In mos|
|000036c0| 74 20 63 61 73 65 73 2c | 20 76 61 72 69 61 62 6c |t cases,| variabl|
|000036d0| 65 73 20 61 72 65 20 61 | 75 74 6f 6d 61 74 69 63 |es are a|utomatic|
|000036e0| 61 6c 6c 79 20 64 65 63 | 6c 61 72 65 64 20 74 68 |ally dec|lared th|
|000036f0| 65 20 66 69 72 73 74 20 | 74 69 6d 65 0d 0a 20 20 |e first |time.. |
|00003700| 74 68 65 79 20 61 72 65 | 20 61 73 73 69 67 6e 65 |they are| assigne|
|00003710| 64 20 61 20 76 61 6c 75 | 65 2c 20 61 6e 64 20 76 |d a valu|e, and v|
|00003720| 61 72 69 61 62 6c 65 20 | 64 65 63 6c 61 72 61 74 |ariable |declarat|
|00003730| 69 6f 6e 73 20 61 72 65 | 20 6e 6f 74 20 72 65 71 |ions are| not req|
|00003740| 75 69 72 65 64 2e 0d 0a | 20 20 46 6f 72 20 65 78 |uired...| For ex|
|00003750| 61 6d 70 6c 65 3a 0d 0a | 0d 0a 20 20 20 ff 66 75 |ample:..|.. .fu|
|00003760| 6e 63 74 69 6f 6e ff 61 | 62 63 0d 0a 20 20 20 20 |nction.a|bc.. |
|00003770| 20 20 61 20 3d 20 31 20 | 20 20 20 20 20 20 20 20 | a = 1 | |
|00003780| 20 20 20 20 20 20 20 2f | 2f 20 6c 6f 63 61 6c 20 | /|/ local |
|00003790| 76 61 72 69 61 62 6c 65 | 2c 20 64 65 63 6c 61 72 |variable|, declar|
|000037a0| 61 74 69 6f 6e 20 6e 6f | 74 20 72 65 71 75 69 72 |ation no|t requir|
|000037b0| 65 64 0d 0a 20 20 20 20 | 20 20 73 61 79 20 61 20 |ed.. | say a |
|000037c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 2f | | /|
|000037d0| 2f 20 64 69 73 70 6c 61 | 79 73 20 27 31 27 0d 0a |/ displa|ys '1'..|
|000037e0| 20 20 20 ff 65 6e 64 ff | 0d 0a 0d 0a 20 20 20 20 | .end.|.... |
|000037f0| 78 79 7a 20 3d 20 27 48 | 65 6c 6c 6f 20 74 68 65 |xyz = 'H|ello the|
|00003800| 72 65 21 27 20 20 20 2f | 2f 20 67 6c 6f 62 61 6c |re!' /|/ global|
|00003810| 20 76 61 72 69 61 62 6c | 65 2c 20 64 65 63 6c 61 | variabl|e, decla|
|00003820| 72 61 74 69 6f 6e 20 6e | 6f 74 20 72 65 71 75 69 |ration n|ot requi|
|00003830| 72 65 64 0d 0a 20 20 20 | 20 73 61 79 20 78 79 7a |red.. | say xyz|
|00003840| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003850| 2f 2f 20 64 69 73 70 6c | 61 79 73 20 27 48 65 6c |// displ|ays 'Hel|
|00003860| 6c 6f 20 74 68 65 72 65 | 21 27 0d 0a 0d 0a 20 20 |lo there|!'.... |
|00003870| 48 6f 77 65 76 65 72 2c | 20 69 66 20 61 20 6c 6f |However,| if a lo|
|00003880| 63 61 6c 20 6f 72 20 67 | 6c 6f 62 61 6c 20 76 61 |cal or g|lobal va|
|00003890| 72 69 61 62 6c 65 20 69 | 73 20 72 65 66 65 72 65 |riable i|s refere|
|000038a0| 6e 63 65 64 20 62 65 66 | 6f 72 65 20 69 74 20 69 |nced bef|ore it i|
|000038b0| 73 0d 0a 20 20 61 73 73 | 69 67 6e 65 64 20 61 20 |s.. ass|igned a |
|000038c0| 76 61 6c 75 65 2c 20 74 | 68 65 6e 20 69 74 20 6d |value, t|hen it m|
|000038d0| 75 73 74 20 66 69 72 73 | 74 20 62 65 20 64 65 63 |ust firs|t be dec|
|000038e0| 6c 61 72 65 64 20 77 69 | 74 68 20 74 68 65 20 27 |lared wi|th the '|
|000038f0| 76 61 72 27 0d 0a 20 20 | 6b 65 79 77 6f 72 64 2e |var'.. |keyword.|
|00003900| 20 54 68 65 20 27 76 61 | 72 27 20 6b 65 79 77 6f | The 'va|r' keywo|
|00003910| 72 64 20 64 65 66 69 6e | 65 73 20 74 68 65 20 69 |rd defin|es the i|
|00003920| 64 65 6e 74 69 66 69 65 | 72 20 77 68 69 63 68 20 |dentifie|r which |
|00003930| 66 6f 6c 6c 6f 77 73 20 | 69 74 20 61 73 0d 0a 20 |follows |it as.. |
|00003940| 20 61 20 76 61 72 69 61 | 62 6c 65 20 6e 61 6d 65 | a varia|ble name|
|00003950| 20 61 6e 64 20 69 6e 69 | 74 69 61 6c 69 7a 65 73 | and ini|tializes|
|00003960| 20 74 68 65 20 76 61 6c | 75 65 20 6f 66 20 74 68 | the val|ue of th|
|00003970| 65 20 6e 65 77 20 76 61 | 72 69 61 62 6c 65 20 74 |e new va|riable t|
|00003980| 6f 20 74 68 65 0d 0a 20 | 20 6e 75 6c 6c 20 73 74 |o the.. | null st|
|00003990| 72 69 6e 67 2e 20 46 6f | 72 20 65 78 61 6d 70 6c |ring. Fo|r exampl|
|000039a0| 65 3a 0d 0a 0d 0a 20 20 | 20 ff 76 61 72 ff 20 78 |e:.... | .var. x|
|000039b0| 79 7a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |yz | |
|000039c0| 20 20 20 20 20 2f 2f 20 | 67 6c 6f 62 61 6c 20 76 | // |global v|
|000039d0| 61 72 69 61 62 6c 65 20 | 27 78 79 7a 27 20 69 73 |ariable |'xyz' is|
|000039e0| 20 64 65 63 6c 61 72 65 | 64 0d 0a 20 20 20 20 73 | declare|d.. s|
|000039f0| 61 79 20 20 78 79 7a 20 | 20 20 20 20 20 20 20 20 |ay xyz | |
|00003a00| 20 20 20 20 20 20 20 20 | 20 20 2f 2f 20 64 69 73 | | // dis|
|00003a10| 70 6c 61 79 73 20 6e 6f | 74 68 69 6e 67 20 28 74 |plays no|thing (t|
|00003a20| 68 65 20 6e 75 6c 6c 20 | 73 74 72 69 6e 67 29 0d |he null |string).|
|00003a30| 0a 0d 0a 20 20 20 ff 66 | 75 6e 63 74 69 6f 6e ff |... .f|unction.|
|00003a40| 0d 0a 20 20 20 20 20 ff | 76 61 72 ff 61 20 20 20 |.. .|var.a |
|00003a50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003a60| 20 2f 2f 20 6c 6f 63 61 | 6c 20 76 61 72 69 61 62 | // loca|l variab|
|00003a70| 6c 65 20 27 61 27 20 69 | 73 20 64 65 63 6c 61 72 |le 'a' i|s declar|
|00003a80| 65 64 0d 0a 20 20 20 20 | 20 ff 72 65 70 65 61 74 |ed.. | .repeat|
|00003a90| ff 0d 0a 20 20 20 20 20 | 20 20 20 61 20 3d 20 61 |... | a = a|
|00003aa0| 20 2b 20 31 20 20 20 20 | 20 20 20 20 20 20 20 20 | + 1 | |
|00003ab0| 20 20 2f 2f 20 27 61 27 | 20 69 73 20 72 65 66 65 | // 'a'| is refe|
|00003ac0| 72 65 6e 63 65 64 20 62 | 65 66 6f 72 65 20 61 73 |renced b|efore as|
|00003ad0| 73 69 67 6e 65 64 0d 0a | 20 20 20 20 20 ff 75 6e |signed..| .un|
|00003ae0| 74 69 6c ff 61 20 3d 3d | 20 31 30 0d 0a 20 20 20 |til.a ==| 10.. |
|00003af0| ff 65 6e 64 ff 0d 0a 0d | 0a 20 20 4f 62 6a 65 63 |.end....|. Objec|
|00003b00| 74 20 76 61 72 69 61 62 | 6c 65 73 20 64 6f 20 6e |t variab|les do n|
|00003b10| 6f 74 20 6e 65 65 64 20 | 74 6f 20 62 65 20 64 65 |ot need |to be de|
|00003b20| 63 6c 61 72 65 64 2e 20 | 53 69 6e 63 65 20 72 65 |clared. |Since re|
|00003b30| 66 65 72 65 6e 63 65 73 | 20 74 6f 20 61 6e 0d 0a |ferences| to an..|
|00003b40| 20 20 6f 62 6a 65 63 74 | 20 76 61 72 69 61 62 6c | object| variabl|
|00003b50| 65 20 6d 75 73 74 20 62 | 65 20 70 72 65 63 65 64 |e must b|e preced|
|00003b60| 65 64 20 62 79 20 61 6e | 20 75 6e 64 65 72 73 63 |ed by an| undersc|
|00003b70| 6f 72 65 20 63 68 61 72 | 61 63 74 65 72 20 28 5f |ore char|acter (_|
|00003b80| 29 2c 20 74 68 65 0d 0a | 20 20 63 6f 6d 70 69 6c |), the..| compil|
|00003b90| 65 72 20 61 75 74 6f 6d | 61 74 69 63 61 6c 6c 79 |er autom|atically|
|00003ba0| 20 72 65 63 6f 67 6e 69 | 7a 65 73 20 6f 62 6a 65 | recogni|zes obje|
|00003bb0| 63 74 20 76 61 72 69 61 | 62 6c 65 73 2e 20 49 66 |ct varia|bles. If|
|00003bc0| 20 61 6e 20 6f 62 6a 65 | 63 74 0d 0a 20 20 76 61 | an obje|ct.. va|
|00003bd0| 72 69 61 62 6c 65 20 69 | 73 20 72 65 66 65 72 65 |riable i|s refere|
|00003be0| 6e 63 65 64 20 61 6e 64 | 20 68 61 73 20 6e 6f 74 |nced and| has not|
|00003bf0| 20 79 65 74 20 62 65 65 | 6e 20 61 73 73 69 67 6e | yet bee|n assign|
|00003c00| 65 64 20 61 20 76 61 6c | 75 65 2c 20 74 68 65 0d |ed a val|ue, the.|
|00003c10| 0a 20 20 76 61 6c 75 65 | 20 6f 66 20 74 68 65 20 |. value| of the |
|00003c20| 6f 62 6a 65 63 74 20 76 | 61 72 69 61 62 6c 65 20 |object v|ariable |
|00003c30| 69 73 20 74 68 65 20 6e | 75 6c 6c 20 73 74 72 69 |is the n|ull stri|
|00003c40| 6e 67 2e 20 46 6f 72 20 | 65 78 61 6d 70 6c 65 3a |ng. For |example:|
|00003c50| 0d 0a 0d 0a 20 20 20 20 | 73 61 79 20 5f 6f 62 6a |.... |say _obj|
|00003c60| 65 63 74 76 61 72 20 20 | 20 20 20 20 20 20 20 20 |ectvar | |
|00003c70| 20 20 20 2f 2f 20 64 69 | 73 70 6c 61 79 73 20 6e | // di|splays n|
|00003c80| 6f 74 68 69 6e 67 20 28 | 74 68 65 20 6e 75 6c 6c |othing (|the null|
|00003c90| 20 73 74 72 69 6e 67 29 | 0d 0a 0d 0a 20 20 20 20 | string)|.... |
|00003ca0| 5f 6f 62 6a 65 63 74 76 | 61 72 20 3d 20 31 32 0d |_objectv|ar = 12.|
|00003cb0| 0a 20 20 20 20 73 61 79 | 20 5f 6f 62 6a 65 63 74 |. say| _object|
|00003cc0| 76 61 72 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |var | |
|00003cd0| 2f 2f 20 64 69 73 70 6c | 61 79 73 20 31 32 0d 0a |// displ|ays 12..|
|00003ce0| 0d 0a 0d 0a 20 20 43 6f | 6e 76 65 72 73 69 6f 6e |.... Co|nversion|
|00003cf0| 73 00 0d 0a 20 20 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |s... ..|........|
|00003d00| c4 0d 0a 20 20 53 69 6e | 63 65 20 74 68 65 20 6d |... Sin|ce the m|
|00003d10| 61 63 72 6f 20 6c 61 6e | 67 75 61 67 65 20 69 73 |acro lan|guage is|
|00003d20| 20 74 79 70 65 6c 65 73 | 73 2c 20 65 78 70 6c 69 | typeles|s, expli|
|00003d30| 63 69 74 20 63 6f 6e 76 | 65 72 73 69 6f 6e 20 62 |cit conv|ersion b|
|00003d40| 65 74 77 65 65 6e 20 64 | 61 74 61 0d 0a 20 20 74 |etween d|ata.. t|
|00003d50| 79 70 65 73 20 69 73 20 | 6e 6f 74 20 72 65 71 75 |ypes is |not requ|
|00003d60| 69 72 65 64 2e 20 49 66 | 20 61 20 73 74 72 69 6e |ired. If| a strin|
|00003d70| 67 20 69 73 20 73 70 65 | 63 69 66 69 65 64 20 77 |g is spe|cified w|
|00003d80| 68 65 72 65 20 61 20 6e | 75 6d 62 65 72 20 69 73 |here a n|umber is|
|00003d90| 0d 0a 20 20 65 78 70 65 | 63 74 65 64 2c 20 69 74 |.. expe|cted, it|
|00003da0| 20 69 73 20 63 6f 6e 76 | 65 72 74 65 64 20 74 6f | is conv|erted to|
|00003db0| 20 61 20 6e 75 6d 62 65 | 72 20 61 73 20 69 74 20 | a numbe|r as it |
|00003dc0| 69 73 20 75 73 65 64 2e | 20 53 69 6d 69 6c 61 72 |is used.| Similar|
|00003dd0| 6c 79 2c 20 69 66 20 61 | 0d 0a 20 20 6e 75 6d 62 |ly, if a|.. numb|
|00003de0| 65 72 20 69 73 20 73 70 | 65 63 69 66 69 65 64 20 |er is sp|ecified |
|00003df0| 77 68 65 72 65 20 61 20 | 73 74 72 69 6e 67 20 69 |where a |string i|
|00003e00| 73 20 65 78 70 65 63 74 | 65 64 2c 20 69 74 20 69 |s expect|ed, it i|
|00003e10| 73 20 63 6f 6e 76 65 72 | 74 65 64 20 74 6f 20 61 |s conver|ted to a|
|00003e20| 0d 0a 20 20 73 74 72 69 | 6e 67 2e 20 46 6f 72 20 |.. stri|ng. For |
|00003e30| 65 78 61 6d 70 6c 65 3a | 0d 0a 0d 0a 20 20 20 20 |example:|.... |
|00003e40| 78 20 3d 20 22 31 32 22 | 20 2b 20 22 33 34 22 20 |x = "12"| + "34" |
|00003e50| 20 20 20 20 20 20 2f 2f | 20 78 20 69 73 20 27 34 | //| x is '4|
|00003e60| 36 27 0d 0a 20 20 20 20 | 78 20 3d 20 31 32 20 2b |6'.. |x = 12 +|
|00003e70| 20 22 61 62 63 22 20 20 | 20 20 20 20 20 20 2f 2f | "abc" | //|
|00003e80| 20 78 20 69 73 20 27 31 | 32 61 62 63 27 0d 0a 0d | x is '1|2abc'...|
|00003e90| 0a 0d 0a 20 20 45 78 70 | 72 65 73 73 69 6f 6e 73 |... Exp|ressions|
|00003ea0| 00 0d 0a 20 20 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |... ...|........|
|00003eb0| 0d 0a 20 20 45 78 70 72 | 65 73 73 69 6f 6e 73 20 |.. Expr|essions |
|00003ec0| 61 72 65 20 73 69 6d 70 | 6c 65 20 6f 72 20 63 6f |are simp|le or co|
|00003ed0| 6d 70 6c 65 78 20 67 72 | 6f 75 70 73 20 6f 66 20 |mplex gr|oups of |
|00003ee0| 6e 75 6d 62 65 72 73 2c | 20 73 74 72 69 6e 67 73 |numbers,| strings|
|00003ef0| 2c 0d 0a 20 20 76 61 72 | 69 61 62 6c 65 73 2c 20 |,.. var|iables, |
|00003f00| 66 75 6e 63 74 69 6f 6e | 20 63 61 6c 6c 73 2c 20 |function| calls, |
|00003f10| 73 74 61 74 65 6d 65 6e | 74 73 2c 20 6f 72 20 6f |statemen|ts, or o|
|00003f20| 74 68 65 72 20 65 78 70 | 72 65 73 73 69 6f 6e 73 |ther exp|ressions|
|00003f30| 20 6a 6f 69 6e 65 64 0d | 0a 20 20 74 6f 67 65 74 | joined.|. toget|
|00003f40| 68 65 72 20 62 79 20 7a | 65 72 6f 20 6f 72 20 6d |her by z|ero or m|
|00003f50| 6f 72 65 20 6d 61 63 72 | 6f 20 6c 61 6e 67 75 61 |ore macr|o langua|
|00003f60| 67 65 20 27 6f 70 65 72 | 61 74 6f 72 73 27 2e 20 |ge 'oper|ators'. |
|00003f70| 54 68 65 73 65 20 61 72 | 65 20 6a 75 73 74 20 61 |These ar|e just a|
|00003f80| 0d 0a 20 20 66 65 77 20 | 65 78 61 6d 70 6c 65 73 |.. few |examples|
|00003f90| 20 6f 66 20 73 69 6d 70 | 6c 65 20 65 78 70 72 65 | of simp|le expre|
|00003fa0| 73 73 69 6f 6e 73 3a 0d | 0a 0d 0a 20 20 20 20 31 |ssions:.|... 1|
|00003fb0| 0d 0a 20 20 20 20 61 62 | 63 0d 0a 20 20 20 20 78 |.. ab|c.. x|
|00003fc0| 20 2f 20 34 0d 0a 20 20 | 20 20 22 61 70 70 6c 65 | / 4.. | "apple|
|00003fd0| 73 20 22 20 2b 20 22 6f | 72 61 6e 67 65 73 22 0d |s " + "o|ranges".|
|00003fe0| 0a 20 20 20 20 78 20 61 | 6e 64 20 79 0d 0a 20 20 |. x a|nd y.. |
|00003ff0| 20 20 67 65 74 6c 69 6e | 65 73 20 2d 20 67 65 74 | getlin|es - get|
|00004000| 72 6f 77 0d 0a 0d 0a 20 | 20 45 78 70 72 65 73 73 |row.... | Express|
|00004010| 69 6f 6e 73 20 6d 61 79 | 20 62 65 20 65 6e 63 6c |ions may| be encl|
|00004020| 6f 73 65 64 20 69 6e 20 | 70 61 72 65 6e 74 68 65 |osed in |parenthe|
|00004030| 73 65 73 20 28 63 61 6c | 6c 65 64 20 27 73 75 62 |ses (cal|led 'sub|
|00004040| 65 78 70 72 65 73 73 69 | 6f 6e 73 27 29 0d 0a 20 |expressi|ons').. |
|00004050| 20 61 6e 64 20 6a 6f 69 | 6e 65 64 20 62 79 20 6f | and joi|ned by o|
|00004060| 70 65 72 61 74 6f 72 73 | 20 74 6f 20 66 6f 72 6d |perators| to form|
|00004070| 20 6d 6f 72 65 20 63 6f | 6d 70 6c 65 78 20 65 78 | more co|mplex ex|
|00004080| 70 72 65 73 73 69 6f 6e | 73 3a 0d 0a 0d 0a 20 20 |pression|s:.... |
|00004090| 20 20 28 78 20 2b 20 79 | 29 20 2f 20 32 0d 0a 20 | (x + y|) / 2.. |
|000040a0| 20 20 20 28 28 61 20 2b | 20 62 29 20 2a 20 28 62 | ((a +| b) * (b|
|000040b0| 20 2b 20 63 29 29 20 73 | 68 6c 20 28 63 20 2d 20 | + c)) s|hl (c - |
|000040c0| 64 29 0d 0a 20 20 20 20 | 28 61 20 6f 72 20 62 29 |d).. |(a or b)|
|000040d0| ff 61 6e 64 ff 28 28 6e | 6f 74 20 63 29 20 6f 72 |.and.((n|ot c) or|
|000040e0| 20 64 29 0d 0a 0d 0a 20 | 20 54 68 65 20 65 76 61 | d).... | The eva|
|000040f0| 6c 75 61 74 69 6f 6e 20 | 6f 66 20 65 78 70 72 65 |luation |of expre|
|00004100| 73 73 69 6f 6e 73 20 67 | 65 6e 65 72 61 6c 6c 79 |ssions g|enerally|
|00004110| 20 70 72 6f 63 65 65 64 | 73 20 66 72 6f 6d 20 6c | proceed|s from l|
|00004120| 65 66 74 20 74 6f 20 72 | 69 67 68 74 2c 0d 0a 20 |eft to r|ight,.. |
|00004130| 20 62 75 74 20 69 73 20 | 61 6c 73 6f 20 62 61 73 | but is |also bas|
|00004140| 65 64 20 6f 6e 20 74 68 | 65 20 70 72 69 6f 72 69 |ed on th|e priori|
|00004150| 74 79 20 6f 66 20 74 68 | 65 20 6f 70 65 72 61 74 |ty of th|e operat|
|00004160| 6f 72 73 20 77 69 74 68 | 69 6e 20 74 68 65 0d 0a |ors with|in the..|
|00004170| 20 20 65 78 70 72 65 73 | 73 69 6f 6e 2c 20 6f 72 | expres|sion, or|
|00004180| 20 74 68 65 20 27 6f 70 | 65 72 61 74 6f 72 20 70 | the 'op|erator p|
|00004190| 72 65 63 65 64 65 6e 63 | 65 27 2e 20 4f 70 65 72 |recedenc|e'. Oper|
|000041a0| 61 74 6f 72 73 20 77 69 | 74 68 20 68 69 67 68 65 |ators wi|th highe|
|000041b0| 72 0d 0a 20 20 70 72 65 | 63 65 64 65 6e 63 65 20 |r.. pre|cedence |
|000041c0| 61 72 65 20 65 76 61 6c | 75 61 74 65 64 20 62 65 |are eval|uated be|
|000041d0| 66 6f 72 65 20 6f 70 65 | 72 61 74 6f 72 73 20 77 |fore ope|rators w|
|000041e0| 69 74 68 20 6c 6f 77 65 | 72 20 70 72 65 63 65 64 |ith lowe|r preced|
|000041f0| 65 6e 63 65 2e 20 46 6f | 72 0d 0a 20 20 65 78 61 |ence. Fo|r.. exa|
|00004200| 6d 70 6c 65 2c 20 69 6e | 20 74 68 65 20 65 78 70 |mple, in| the exp|
|00004210| 72 65 73 73 69 6f 6e 3a | 0d 0a 0d 0a 20 20 20 20 |ression:|.... |
|00004220| 78 20 2d 20 79 20 2a 20 | 35 0d 0a 0d 0a 20 20 27 |x - y * |5.... '|
|00004230| 79 20 2a 20 35 27 20 69 | 73 20 65 76 61 6c 75 61 |y * 5' i|s evalua|
|00004240| 74 65 64 20 66 69 72 73 | 74 20 61 6e 64 20 74 68 |ted firs|t and th|
|00004250| 65 6e 20 73 75 62 74 72 | 61 63 74 65 64 20 66 72 |en subtr|acted fr|
|00004260| 6f 6d 20 27 78 27 2c 20 | 73 69 6e 63 65 20 74 68 |om 'x', |since th|
|00004270| 65 0d 0a 20 20 6d 75 6c | 74 69 70 6c 69 63 61 74 |e.. mul|tiplicat|
|00004280| 69 6f 6e 20 6f 70 65 72 | 61 74 6f 72 20 27 2a 27 |ion oper|ator '*'|
|00004290| 20 68 61 73 20 61 20 68 | 69 67 68 65 72 20 70 72 | has a h|igher pr|
|000042a0| 65 63 65 64 65 6e 63 65 | 20 74 68 61 6e 20 74 68 |ecedence| than th|
|000042b0| 65 0d 0a 20 20 73 75 62 | 74 72 61 63 74 69 6f 6e |e.. sub|traction|
|000042c0| 20 6f 70 65 72 61 74 6f | 72 20 27 2d 27 2e 20 50 | operato|r '-'. P|
|000042d0| 61 72 65 6e 74 68 65 73 | 65 73 20 6d 61 79 20 62 |arenthes|es may b|
|000042e0| 65 20 75 73 65 64 20 74 | 6f 20 66 6f 72 63 65 20 |e used t|o force |
|000042f0| 74 68 65 0d 0a 20 20 65 | 78 70 72 65 73 73 69 6f |the.. e|xpressio|
|00004300| 6e 20 74 6f 20 62 65 20 | 65 76 61 6c 75 61 74 65 |n to be |evaluate|
|00004310| 64 20 77 69 74 68 20 61 | 20 75 73 65 72 2d 64 65 |d with a| user-de|
|00004320| 66 69 6e 65 64 20 70 72 | 69 6f 72 69 74 79 2e 20 |fined pr|iority. |
|00004330| 46 6f 72 20 65 78 61 6d | 70 6c 65 3a 0d 0a 0d 0a |For exam|ple:....|
|00004340| 20 20 20 20 28 78 20 2d | 20 79 29 20 2a 20 35 0d | (x -| y) * 5.|
|00004350| 0a 0d 0a 20 20 49 6e 20 | 74 68 65 20 61 62 6f 76 |... In |the abov|
|00004360| 65 20 65 78 61 6d 70 6c | 65 2c 20 27 78 20 2d 20 |e exampl|e, 'x - |
|00004370| 79 27 20 69 73 20 65 76 | 61 6c 75 61 74 65 64 20 |y' is ev|aluated |
|00004380| 66 69 72 73 74 2c 20 61 | 6e 64 20 74 68 65 6e 20 |first, a|nd then |
|00004390| 6d 75 6c 74 69 70 6c 69 | 65 64 0d 0a 20 20 62 79 |multipli|ed.. by|
|000043a0| 20 27 35 27 2e 0d 0a 0d | 0a 20 20 4e 6f 74 65 20 | '5'....|. Note |
|000043b0| 74 68 61 74 20 77 68 69 | 6c 65 20 74 68 65 20 76 |that whi|le the v|
|000043c0| 61 6c 75 65 20 6f 66 20 | 61 6e 20 65 78 70 72 65 |alue of |an expre|
|000043d0| 73 73 69 6f 6e 20 69 73 | 20 61 6c 77 61 79 73 20 |ssion is| always |
|000043e0| 62 61 73 65 64 20 6f 6e | 0d 0a 20 20 70 61 72 65 |based on|.. pare|
|000043f0| 6e 74 68 65 73 65 73 20 | 61 6e 64 20 6f 70 65 72 |ntheses |and oper|
|00004400| 61 74 6f 72 20 70 72 65 | 63 65 64 65 6e 63 65 2c |ator pre|cedence,|
|00004410| 20 74 68 65 20 61 63 74 | 75 61 6c 20 6f 72 64 65 | the act|ual orde|
|00004420| 72 20 69 6e 20 74 69 6d | 65 20 69 6e 20 77 68 69 |r in tim|e in whi|
|00004430| 63 68 0d 0a 20 20 65 6c | 65 6d 65 6e 74 73 20 6f |ch.. el|ements o|
|00004440| 66 20 74 68 65 20 65 78 | 70 72 65 73 73 69 6f 6e |f the ex|pression|
|00004450| 20 61 72 65 20 65 76 61 | 6c 75 61 74 65 64 20 69 | are eva|luated i|
|00004460| 73 20 6e 6f 74 20 64 65 | 66 69 6e 65 64 20 28 74 |s not de|fined (t|
|00004470| 68 65 20 27 61 6e 64 27 | 20 61 6e 64 0d 0a 20 20 |he 'and'| and.. |
|00004480| 27 6f 72 27 20 6f 70 65 | 72 61 74 6f 72 73 20 61 |'or' ope|rators a|
|00004490| 72 65 20 65 78 63 65 70 | 74 69 6f 6e 73 20 2d 20 |re excep|tions - |
|000044a0| 73 65 65 20 27 4c 6f 67 | 69 63 61 6c 20 4f 70 65 |see 'Log|ical Ope|
|000044b0| 72 61 74 6f 72 73 27 29 | 20 2e 20 46 6f 72 0d 0a |rators')| . For..|
|000044c0| 20 20 65 78 61 6d 70 6c | 65 3a 0d 0a 0d 0a 20 20 | exampl|e:.... |
|000044d0| 20 20 28 66 75 6e 41 20 | 31 29 20 2b 20 28 66 75 | (funA |1) + (fu|
|000044e0| 6e 42 20 32 29 20 2a 20 | 28 66 75 6e 43 20 33 29 |nB 2) * |(funC 3)|
|000044f0| 0d 0a 0d 0a 20 20 49 6e | 20 74 68 65 20 65 78 70 |.... In| the exp|
|00004500| 72 65 73 73 69 6f 6e 20 | 61 62 6f 76 65 2c 20 79 |ression |above, y|
|00004510| 6f 75 20 6d 61 79 20 6e | 6f 74 20 61 73 73 75 6d |ou may n|ot assum|
|00004520| 65 20 74 68 61 74 20 74 | 68 65 20 66 75 6e 63 74 |e that t|he funct|
|00004530| 69 6f 6e 20 27 66 75 6e | 43 27 0d 0a 20 20 69 73 |ion 'fun|C'.. is|
|00004540| 20 63 61 6c 6c 65 64 20 | 62 65 66 6f 72 65 20 74 | called |before t|
|00004550| 68 65 20 66 75 6e 63 74 | 69 6f 6e 20 27 66 75 6e |he funct|ion 'fun|
|00004560| 41 27 2e 0d 0a 0d 0a 0d | 0a 20 20 54 72 75 65 20 |A'......|. True |
|00004570| 61 6e 64 20 46 61 6c 73 | 65 00 0d 0a 20 20 c4 c4 |and Fals|e... ..|
|00004580| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 0d 0a 20 20 |........|...... |
|00004590| 53 65 76 65 72 61 6c 20 | 6d 61 63 72 6f 20 6c 61 |Several |macro la|
|000045a0| 6e 67 75 61 67 65 20 6f | 70 65 72 61 74 6f 72 73 |nguage o|perators|
|000045b0| 20 61 6e 64 20 73 74 61 | 74 65 6d 65 6e 74 73 20 | and sta|tements |
|000045c0| 74 65 73 74 20 77 68 65 | 74 68 65 72 20 61 6e 0d |test whe|ther an.|
|000045d0| 0a 20 20 65 78 70 72 65 | 73 73 69 6f 6e 20 69 73 |. expre|ssion is|
|000045e0| 20 54 52 55 45 20 6f 72 | 20 46 41 4c 53 45 2e 20 | TRUE or| FALSE. |
|000045f0| 41 6e 20 65 78 70 72 65 | 73 73 69 6f 6e 20 69 73 |An expre|ssion is|
|00004600| 20 46 41 4c 53 45 20 69 | 66 20 69 74 20 69 73 20 | FALSE i|f it is |
|00004610| 65 71 75 61 6c 20 74 6f | 0d 0a 20 20 7a 65 72 6f |equal to|.. zero|
|00004620| 20 6f 72 20 74 68 65 20 | 6e 75 6c 6c 20 73 74 72 | or the |null str|
|00004630| 69 6e 67 2e 20 46 6f 72 | 20 61 6e 79 20 6f 74 68 |ing. For| any oth|
|00004640| 65 72 20 76 61 6c 75 65 | 73 2c 20 74 68 65 20 65 |er value|s, the e|
|00004650| 78 70 72 65 73 73 69 6f | 6e 20 69 73 20 54 52 55 |xpressio|n is TRU|
|00004660| 45 2e 0d 0a 20 20 46 6f | 72 20 65 78 61 6d 70 6c |E... Fo|r exampl|
|00004670| 65 3a 0d 0a 0d 0a 20 20 | 20 20 78 20 3d 20 34 20 |e:.... | x = 4 |
|00004680| 20 20 2f 2f 20 78 20 69 | 73 20 54 52 55 45 0d 0a | // x i|s TRUE..|
|00004690| 20 20 20 20 78 20 2b 20 | 33 20 20 20 2f 2f 20 76 | x + |3 // v|
|000046a0| 61 6c 75 65 20 69 73 20 | 54 52 55 45 0d 0a 20 20 |alue is |TRUE.. |
|000046b0| 20 20 78 20 2d 20 34 20 | 20 20 2f 2f 20 76 61 6c | x - 4 | // val|
|000046c0| 75 65 20 69 73 20 46 41 | 4c 53 45 0d 0a 20 20 20 |ue is FA|LSE.. |
|000046d0| 20 78 20 3d 20 27 27 20 | 20 2f 2f 20 78 20 69 73 | x = '' | // x is|
|000046e0| 20 46 41 4c 53 45 0d 0a | 0d 0a 0d 0a 20 20 41 72 | FALSE..|.... Ar|
|000046f0| 69 74 68 6d 65 74 69 63 | 20 4f 70 65 72 61 74 6f |ithmetic| Operato|
|00004700| 72 73 00 0d 0a 20 20 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |rs... .|........|
|00004710| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 0d 0a 20 20 41 |........|..... A|
|00004720| 72 69 74 68 6d 65 74 69 | 63 20 6f 70 65 72 61 74 |rithmeti|c operat|
|00004730| 6f 72 73 20 61 72 65 20 | 75 73 65 64 20 74 6f 20 |ors are |used to |
|00004740| 70 65 72 66 6f 72 6d 20 | 73 69 6d 70 6c 65 20 69 |perform |simple i|
|00004750| 6e 74 65 67 65 72 20 61 | 72 69 74 68 6d 65 74 69 |nteger a|rithmeti|
|00004760| 63 20 6f 6e 0d 0a 20 20 | 6e 75 6d 62 65 72 73 20 |c on.. |numbers |
|00004770| 77 69 74 68 69 6e 20 65 | 78 70 72 65 73 73 69 6f |within e|xpressio|
|00004780| 6e 73 2e 20 54 68 65 20 | 72 65 73 75 6c 74 20 6f |ns. The |result o|
|00004790| 66 20 61 6e 79 20 61 72 | 69 74 68 6d 65 74 69 63 |f any ar|ithmetic|
|000047a0| 20 65 78 70 72 65 73 73 | 69 6f 6e 20 69 73 0d 0a | express|ion is..|
|000047b0| 20 20 61 6c 77 61 79 73 | 20 61 6e 20 69 6e 74 65 | always| an inte|
|000047c0| 67 65 72 20 69 6e 20 74 | 68 65 20 72 61 6e 67 65 |ger in t|he range|
|000047d0| 20 6f 66 20 2d 32 2c 31 | 34 37 2c 34 38 33 2c 36 | of -2,1|47,483,6|
|000047e0| 34 38 20 74 6f 20 32 2c | 31 34 37 2c 34 38 33 2c |48 to 2,|147,483,|
|000047f0| 36 34 37 2e 20 54 68 65 | 0d 0a 20 20 61 72 69 74 |647. The|.. arit|
|00004800| 68 6d 65 74 69 63 20 6f | 70 65 72 61 74 6f 72 73 |hmetic o|perators|
|00004810| 20 61 72 65 3a 0d 0a 0d | 0a 20 20 20 ff 2a ff 20 | are:...|. .*. |
|00004820| 20 20 6d 75 6c 74 69 70 | 6c 69 63 61 74 69 6f 6e | multip|lication|
|00004830| 0d 0a 20 20 20 ff 2f ff | 20 20 20 64 69 76 69 73 |.. ./.| divis|
|00004840| 69 6f 6e 0d 0a 20 20 20 | ff 6d 6f 64 ff 20 6d 6f |ion.. |.mod. mo|
|00004850| 64 75 6c 61 74 69 6f 6e | 0d 0a 20 20 20 ff 2b ff |dulation|.. .+.|
|00004860| 20 20 20 61 64 64 69 74 | 69 6f 6e 0d 0a 20 20 20 | addit|ion.. |
|00004870| ff 2d ff 20 20 20 73 75 | 62 74 72 61 63 74 69 6f |.-. su|btractio|
|00004880| 6e 20 28 6f 72 20 75 6e | 61 72 79 20 6e 65 67 61 |n (or un|ary nega|
|00004890| 74 69 6f 6e 29 0d 0a 0d | 0a 20 20 54 68 65 20 64 |tion)...|. The d|
|000048a0| 69 76 69 73 69 6f 6e 20 | 61 6e 64 20 6d 6f 64 20 |ivision |and mod |
|000048b0| 6f 70 65 72 61 74 6f 72 | 73 20 70 65 72 66 6f 72 |operator|s perfor|
|000048c0| 6d 20 61 6e 20 69 6e 74 | 65 67 65 72 20 64 69 76 |m an int|eger div|
|000048d0| 69 73 69 6f 6e 2e 20 54 | 68 65 0d 0a 20 20 64 69 |ision. T|he.. di|
|000048e0| 76 69 73 69 6f 6e 20 6f | 70 65 72 61 74 6f 72 20 |vision o|perator |
|000048f0| 74 72 75 6e 63 61 74 65 | 73 20 61 6e 79 20 66 72 |truncate|s any fr|
|00004900| 61 63 74 69 6f 6e 61 6c | 20 72 65 73 75 6c 74 2e |actional| result.|
|00004910| 20 54 68 65 20 6d 6f 64 | 20 6f 70 65 72 61 74 6f | The mod| operato|
|00004920| 72 0d 0a 20 20 72 65 74 | 75 72 6e 73 20 61 6e 20 |r.. ret|urns an |
|00004930| 69 6e 74 65 67 65 72 20 | 72 65 6d 61 69 6e 64 65 |integer |remainde|
|00004940| 72 2e 0d 0a 0d 0a 20 20 | 41 64 64 69 74 69 6f 6e |r..... |Addition|
|00004950| 20 61 6e 64 20 73 75 62 | 74 72 61 63 74 69 6f 6e | and sub|traction|
|00004960| 20 68 61 76 65 20 61 20 | 6c 6f 77 65 72 20 70 72 | have a |lower pr|
|00004970| 65 63 65 64 65 6e 63 65 | 20 74 68 61 6e 20 6d 75 |ecedence| than mu|
|00004980| 6c 74 69 70 6c 69 63 61 | 74 69 6f 6e 0d 0a 20 20 |ltiplica|tion.. |
|00004990| 61 6e 64 20 64 69 76 69 | 73 69 6f 6e 2e 20 55 6e |and divi|sion. Un|
|000049a0| 61 72 79 20 6e 65 67 61 | 74 69 6f 6e 20 68 61 73 |ary nega|tion has|
|000049b0| 20 61 20 68 69 67 68 65 | 72 20 70 72 65 63 65 64 | a highe|r preced|
|000049c0| 65 6e 63 65 20 74 68 61 | 6e 20 74 68 61 6e 20 61 |ence tha|n than a|
|000049d0| 6c 6c 20 74 68 65 0d 0a | 20 20 6f 74 68 65 72 20 |ll the..| other |
|000049e0| 61 72 69 74 68 6d 65 74 | 69 63 20 6f 70 65 72 61 |arithmet|ic opera|
|000049f0| 74 6f 72 73 20 28 61 6e | 64 20 61 6c 6c 20 6f 74 |tors (an|d all ot|
|00004a00| 68 65 72 20 6f 70 65 72 | 61 74 6f 72 73 20 65 78 |her oper|ators ex|
|00004a10| 63 65 70 74 20 74 68 65 | 0d 0a 20 20 70 61 72 65 |cept the|.. pare|
|00004a20| 6e 74 68 65 73 65 73 20 | 61 6e 64 20 73 75 62 73 |ntheses |and subs|
|00004a30| 74 72 69 6e 67 20 6f 70 | 65 72 61 74 6f 72 73 29 |tring op|erators)|
|00004a40| 2e 0d 0a 0d 0a 20 20 45 | 78 61 6d 70 6c 65 73 3a |..... E|xamples:|
|00004a50| 0d 0a 0d 0a 20 20 20 20 | 79 20 3d 20 35 0d 0a 20 |.... |y = 5.. |
|00004a60| 20 20 20 78 20 3d 20 28 | 36 20 2b 20 79 20 2a 20 | x = (|6 + y * |
|00004a70| 33 29 20 2f 20 32 20 20 | 20 20 2f 2f 20 78 20 69 |3) / 2 | // x i|
|00004a80| 73 20 31 30 0d 0a 20 20 | 20 20 7a 20 3d 20 78 20 |s 10.. | z = x |
|00004a90| 6d 6f 64 20 33 20 20 20 | 20 20 20 20 20 20 20 20 |mod 3 | |
|00004aa0| 20 2f 2f 20 7a 20 69 73 | 20 31 0d 0a 0d 0a 0d 0a | // z is| 1......|
|00004ab0| 20 20 52 65 6c 61 74 69 | 6f 6e 61 6c 20 4f 70 65 | Relati|onal Ope|
|00004ac0| 72 61 74 6f 72 73 00 0d | 0a 20 20 c4 c4 c4 c4 c4 |rators..|. .....|
|00004ad0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 0d |........|........|
|00004ae0| 0a 20 20 52 65 6c 61 74 | 69 6f 6e 61 6c 20 6f 70 |. Relat|ional op|
|00004af0| 65 72 61 74 6f 72 73 20 | 61 72 65 20 75 73 65 64 |erators |are used|
|00004b00| 20 74 6f 20 63 6f 6d 70 | 61 72 65 20 74 77 6f 20 | to comp|are two |
|00004b10| 65 78 70 72 65 73 73 69 | 6f 6e 73 2e 20 54 68 65 |expressi|ons. The|
|00004b20| 20 72 65 73 75 6c 74 0d | 0a 20 20 6f 66 20 65 76 | result.|. of ev|
|00004b30| 61 6c 75 61 74 69 6e 67 | 20 61 20 72 65 6c 61 74 |aluating| a relat|
|00004b40| 69 6f 6e 61 6c 20 6f 70 | 65 72 61 74 6f 72 20 69 |ional op|erator i|
|00004b50| 73 20 61 6c 77 61 79 73 | 20 65 69 74 68 65 72 20 |s always| either |
|00004b60| 54 52 55 45 20 28 31 29 | 20 6f 72 20 46 41 4c 53 |TRUE (1)| or FALS|
|00004b70| 45 0d 0a 20 20 28 74 68 | 65 20 6e 75 6c 6c 20 73 |E.. (th|e null s|
|00004b80| 74 72 69 6e 67 29 2e 20 | 52 65 6c 61 74 69 6f 6e |tring). |Relation|
|00004b90| 61 6c 20 6f 70 65 72 61 | 74 6f 72 73 20 68 61 76 |al opera|tors hav|
|00004ba0| 65 20 61 20 6c 6f 77 65 | 72 20 70 72 65 63 65 64 |e a lowe|r preced|
|00004bb0| 65 6e 63 65 20 74 68 61 | 6e 0d 0a 20 20 61 72 69 |ence tha|n.. ari|
|00004bc0| 74 68 6d 65 74 69 63 20 | 6f 70 65 72 61 74 6f 72 |thmetic |operator|
|00004bd0| 73 2e 20 54 68 65 20 72 | 65 6c 61 74 69 6f 6e 61 |s. The r|elationa|
|00004be0| 6c 20 6f 70 65 72 61 74 | 6f 72 73 20 61 72 65 3a |l operat|ors are:|
|00004bf0| 0d 0a 0d 0a 20 20 20 ff | 3c ff 20 20 20 6c 65 73 |.... .|<. les|
|00004c00| 73 20 74 68 61 6e 0d 0a | 20 20 20 ff 3c 3d ff 20 |s than..| .<=. |
|00004c10| 20 6c 65 73 73 20 74 68 | 61 6e 20 6f 72 20 65 71 | less th|an or eq|
|00004c20| 75 61 6c 20 74 6f 0d 0a | 20 20 20 ff 3e ff 20 20 |ual to..| .>. |
|00004c30| 20 67 72 65 61 74 65 72 | 20 74 68 61 6e 0d 0a 20 | greater| than.. |
|00004c40| 20 20 ff 3e 3d ff 20 20 | 67 72 65 61 74 65 72 20 | .>=. |greater |
|00004c50| 74 68 61 6e 20 6f 72 20 | 65 71 75 61 6c 20 74 6f |than or |equal to|
|00004c60| 0d 0a 20 20 20 ff 3d 3d | ff 20 20 65 71 75 61 6c |.. .==|. equal|
|00004c70| 20 74 6f 0d 0a 20 20 20 | ff 3c 3e ff 20 20 6e 6f | to.. |.<>. no|
|00004c80| 74 20 65 71 75 61 6c 20 | 74 6f 0d 0a 0d 0a 20 20 |t equal |to.... |
|00004c90| 4e 6f 74 65 20 74 68 61 | 74 20 72 65 6c 61 74 69 |Note tha|t relati|
|00004ca0| 6f 6e 61 6c 20 6f 70 65 | 72 61 74 6f 72 73 20 63 |onal ope|rators c|
|00004cb0| 61 6e 20 62 65 20 75 73 | 65 64 20 74 6f 20 63 6f |an be us|ed to co|
|00004cc0| 6d 70 61 72 65 20 62 6f | 74 68 20 6e 75 6d 62 65 |mpare bo|th numbe|
|00004cd0| 72 73 20 61 6e 64 0d 0a | 20 20 73 74 72 69 6e 67 |rs and..| string|
|00004ce0| 73 2e 20 53 74 72 69 6e | 67 73 20 61 72 65 20 63 |s. Strin|gs are c|
|00004cf0| 6f 6d 70 61 72 65 64 20 | 62 79 20 74 65 73 74 69 |ompared |by testi|
|00004d00| 6e 67 20 74 68 65 20 41 | 53 43 49 49 20 76 61 6c |ng the A|SCII val|
|00004d10| 75 65 73 20 6f 66 20 65 | 61 63 68 0d 0a 20 20 63 |ues of e|ach.. c|
|00004d20| 68 61 72 61 63 74 65 72 | 20 69 6e 20 74 68 65 20 |haracter| in the |
|00004d30| 73 74 72 69 6e 67 20 66 | 72 6f 6d 20 6c 65 66 74 |string f|rom left|
|00004d40| 20 74 6f 20 72 69 67 68 | 74 20 28 61 20 63 61 73 | to righ|t (a cas|
|00004d50| 65 20 73 65 6e 73 69 74 | 69 76 65 0d 0a 20 20 63 |e sensit|ive.. c|
|00004d60| 6f 6d 70 61 72 69 73 6f | 6e 29 2e 0d 0a 0d 0a 20 |ompariso|n)..... |
|00004d70| 20 45 78 61 6d 70 6c 65 | 73 3a 0d 0a 0d 0a 20 20 | Example|s:.... |
|00004d80| 20 20 2f 2f 20 6e 75 6d | 65 72 69 63 20 63 6f 6d | // num|eric com|
|00004d90| 70 61 72 69 73 6f 6e 73 | 0d 0a 20 20 20 20 61 20 |parisons|.. a |
|00004da0| 3d 20 34 20 20 62 20 3d | 20 35 0d 0a 20 20 20 20 |= 4 b =| 5.. |
|00004db0| 61 20 3c 20 62 20 20 20 | 61 20 3c 3e 20 62 20 20 |a < b |a <> b |
|00004dc0| 61 20 3d 3d 20 62 20 2d | 20 31 20 20 2f 2f 20 74 |a == b -| 1 // t|
|00004dd0| 68 65 73 65 20 65 78 70 | 72 65 73 73 69 6f 6e 73 |hese exp|ressions|
|00004de0| 20 61 72 65 20 54 52 55 | 45 0d 0a 20 20 20 20 61 | are TRU|E.. a|
|00004df0| 20 3e 20 62 20 20 20 61 | 20 3d 3d 20 62 20 20 20 | > b a| == b |
|00004e00| 20 20 20 20 20 20 20 20 | 20 20 20 2f 2f 20 74 68 | | // th|
|00004e10| 65 73 65 20 65 78 70 72 | 65 73 73 69 6f 6e 73 20 |ese expr|essions |
|00004e20| 61 72 65 20 46 41 4c 53 | 45 0d 0a 20 20 20 20 78 |are FALS|E.. x|
|00004e30| 20 3d 20 61 20 3c 20 62 | 20 20 20 20 20 20 20 20 | = a < b| |
|00004e40| 20 20 20 20 20 20 20 20 | 20 20 20 2f 2f 20 78 20 | | // x |
|00004e50| 69 73 20 61 73 73 69 67 | 6e 65 64 20 61 20 76 61 |is assig|ned a va|
|00004e60| 6c 75 65 20 6f 66 20 27 | 31 27 0d 0a 20 20 20 20 |lue of '|1'.. |
|00004e70| 78 20 3d 20 61 20 3d 3d | 20 62 20 20 20 20 20 20 |x = a ==| b |
|00004e80| 20 20 20 20 20 20 20 20 | 20 20 20 20 2f 2f 20 78 | | // x|
|00004e90| 20 69 73 20 61 73 73 69 | 67 6e 65 64 20 74 68 65 | is assi|gned the|
|00004ea0| 20 6e 75 6c 6c 20 73 74 | 72 69 6e 67 0d 0a 0d 0a | null st|ring....|
|00004eb0| 20 20 20 20 2f 2f 20 73 | 74 72 69 6e 67 20 63 6f | // s|tring co|
|00004ec0| 6d 70 61 72 69 73 6f 6e | 73 0d 0a 20 20 20 20 61 |mparison|s.. a|
|00004ed0| 20 3d 20 22 61 62 63 22 | 20 20 62 20 3d 20 22 78 | = "abc"| b = "x|
|00004ee0| 79 7a 22 0d 0a 20 20 20 | 20 61 20 3c 20 62 20 20 |yz".. | a < b |
|00004ef0| 20 61 20 3c 3e 20 62 20 | 20 20 20 20 20 20 20 20 | a <> b | |
|00004f00| 20 20 20 20 20 2f 2f 20 | 74 68 65 73 65 20 65 78 | // |these ex|
|00004f10| 70 72 65 73 73 69 6f 6e | 73 20 61 72 65 20 54 52 |pression|s are TR|
|00004f20| 55 45 0d 0a 20 20 20 20 | 61 20 3e 20 62 20 20 20 |UE.. |a > b |
|00004f30| 61 20 3d 3d 20 62 20 20 | 20 20 20 20 20 20 20 20 |a == b | |
|00004f40| 20 20 20 20 2f 2f 20 74 | 68 65 73 65 20 65 78 70 | // t|hese exp|
|00004f50| 72 65 73 73 69 6f 6e 73 | 20 61 72 65 20 46 41 4c |ressions| are FAL|
|00004f60| 53 45 0d 0a 20 20 20 20 | 78 20 3d 20 61 20 3c 20 |SE.. |x = a < |
|00004f70| 62 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |b | |
|00004f80| 20 20 20 20 2f 2f 20 78 | 20 69 73 20 61 73 73 69 | // x| is assi|
|00004f90| 67 6e 65 64 20 61 20 76 | 61 6c 75 65 20 6f 66 20 |gned a v|alue of |
|00004fa0| 27 31 27 0d 0a 20 20 20 | 20 78 20 3d 20 61 20 3d |'1'.. | x = a =|
|00004fb0| 3d 20 62 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |= b | |
|00004fc0| 20 20 20 20 20 2f 2f 20 | 78 20 69 73 20 61 73 73 | // |x is ass|
|00004fd0| 69 67 6e 65 64 20 74 68 | 65 20 6e 75 6c 6c 20 73 |igned th|e null s|
|00004fe0| 74 72 69 6e 67 0d 0a 0d | 0a 0d 0a 20 20 53 74 72 |tring...|... Str|
|00004ff0| 69 6e 67 20 4f 70 65 72 | 61 74 6f 72 73 00 0d 0a |ing Oper|ators...|
|00005000| 20 20 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 | ......|........|
|00005010| c4 c4 0d 0a 20 20 53 74 | 72 69 6e 67 20 6f 70 65 |.... St|ring ope|
|00005020| 72 61 74 6f 72 73 20 61 | 72 65 20 75 73 65 64 20 |rators a|re used |
|00005030| 74 6f 20 70 65 72 66 6f | 72 6d 20 73 74 72 69 6e |to perfo|rm strin|
|00005040| 67 20 63 6f 6e 63 61 74 | 65 6e 61 74 69 6f 6e 20 |g concat|enation |
|00005050| 61 6e 64 0d 0a 20 20 73 | 75 62 73 74 72 69 6e 67 |and.. s|ubstring|
|00005060| 20 6f 70 65 72 61 74 69 | 6f 6e 73 20 6f 6e 20 63 | operati|ons on c|
|00005070| 68 61 72 61 63 74 65 72 | 20 73 74 72 69 6e 67 73 |haracter| strings|
|00005080| 2e 20 54 68 65 20 72 65 | 73 75 6c 74 20 6f 66 20 |. The re|sult of |
|00005090| 65 76 61 6c 75 61 74 69 | 6e 67 20 61 0d 0a 20 20 |evaluati|ng a.. |
|000050a0| 73 74 72 69 6e 67 20 65 | 78 70 72 65 73 73 69 6f |string e|xpressio|
|000050b0| 6e 20 69 73 20 61 6c 77 | 61 79 73 20 61 20 63 68 |n is alw|ays a ch|
|000050c0| 61 72 61 63 74 65 72 20 | 73 74 72 69 6e 67 2e 20 |aracter |string. |
|000050d0| 54 68 65 20 73 74 72 69 | 6e 67 20 6f 70 65 72 61 |The stri|ng opera|
|000050e0| 74 6f 72 73 0d 0a 20 20 | 61 72 65 3a 0d 0a 0d 0a |tors.. |are:....|
|000050f0| 20 20 20 ff 2b ff 20 20 | 20 20 20 20 20 20 20 20 | .+. | |
|00005100| 20 20 20 20 20 63 6f 6e | 63 61 74 65 6e 61 74 69 | con|catenati|
|00005110| 6f 6e 0d 0a 20 20 20 ff | 5b ff 65 78 70 72 ff 5d |on.. .|[.expr.]|
|00005120| ff 20 20 20 20 20 20 20 | 20 6f 6e 65 2d 63 68 61 |. | one-cha|
|00005130| 72 61 63 74 65 72 20 73 | 75 62 73 74 72 69 6e 67 |racter s|ubstring|
|00005140| 0d 0a 20 20 20 ff 5b ff | 65 78 70 72 ff 3a ff 65 |.. .[.|expr.:.e|
|00005150| 78 70 72 ff 5d ff 20 6d | 75 6c 74 69 2d 63 68 61 |xpr.]. m|ulti-cha|
|00005160| 72 61 63 74 65 72 20 73 | 75 62 73 74 72 69 6e 67 |racter s|ubstring|
|00005170| 0d 0a 0d 0a 20 20 54 68 | 65 20 63 6f 6e 63 61 74 |.... Th|e concat|
|00005180| 65 6e 61 74 69 6f 6e 20 | 6f 70 65 72 61 74 6f 72 |enation |operator|
|00005190| 20 27 2b 27 20 69 73 20 | 75 73 65 64 20 74 6f 20 | '+' is |used to |
|000051a0| 6a 6f 69 6e 20 74 77 6f | 20 6f 72 20 6d 6f 72 65 |join two| or more|
|000051b0| 20 73 74 72 69 6e 67 73 | 0d 0a 20 20 74 6f 67 65 | strings|.. toge|
|000051c0| 74 68 65 72 2e 20 46 6f | 72 20 65 78 61 6d 70 6c |ther. Fo|r exampl|
|000051d0| 65 3a 0d 0a 0d 0a 20 20 | 20 20 61 20 3d 20 22 61 |e:.... | a = "a|
|000051e0| 70 70 6c 65 73 22 0d 0a | 20 20 20 20 62 20 3d 20 |pples"..| b = |
|000051f0| 22 6f 72 61 6e 67 65 73 | 22 0d 0a 20 20 20 20 78 |"oranges|".. x|
|00005200| 20 3d 20 61 20 2b 20 22 | 20 61 6e 64 20 22 20 2b | = a + "| and " +|
|00005210| 20 62 20 20 20 20 20 20 | 20 20 2f 2f 20 78 20 69 | b | // x i|
|00005220| 73 20 27 61 70 70 6c 65 | 73 20 61 6e 64 20 6f 72 |s 'apple|s and or|
|00005230| 61 6e 67 65 73 27 0d 0a | 20 20 20 20 78 20 3d 20 |anges'..| x = |
|00005240| 34 20 2b 20 27 20 27 20 | 2b 20 61 20 20 20 20 20 |4 + ' ' |+ a |
|00005250| 20 20 20 20 20 20 20 2f | 2f 20 78 20 69 73 20 27 | /|/ x is '|
|00005260| 34 20 61 70 70 6c 65 73 | 27 0d 0a 0d 0a 20 20 53 |4 apples|'.... S|
|00005270| 69 6e 63 65 20 74 68 65 | 20 63 6f 6e 63 61 74 65 |ince the| concate|
|00005280| 6e 61 74 69 6f 6e 20 6f | 70 65 72 61 74 6f 72 20 |nation o|perator |
|00005290| 27 2b 27 20 69 73 20 69 | 64 65 6e 74 69 63 61 6c |'+' is i|dentical|
|000052a0| 20 74 6f 20 74 68 65 20 | 61 64 64 69 74 69 6f 6e | to the |addition|
|000052b0| 0d 0a 20 20 6f 70 65 72 | 61 74 6f 72 20 27 2b 27 |.. oper|ator '+'|
|000052c0| 2c 20 74 77 6f 20 6e 75 | 6d 65 72 69 63 20 73 74 |, two nu|meric st|
|000052d0| 72 69 6e 67 73 20 63 61 | 6e 6e 6f 74 20 62 65 20 |rings ca|nnot be |
|000052e0| 63 6f 6e 63 61 74 65 6e | 61 74 65 64 20 77 69 74 |concaten|ated wit|
|000052f0| 68 20 27 2b 27 2e 20 49 | 6e 0d 0a 20 20 74 68 69 |h '+'. I|n.. thi|
|00005300| 73 20 63 61 73 65 2c 20 | 61 64 64 69 74 69 6f 6e |s case, |addition|
|00005310| 20 74 61 6b 65 73 20 70 | 72 65 63 65 64 65 6e 63 | takes p|recedenc|
|00005320| 65 20 28 41 4d 4c 20 69 | 73 20 61 20 74 79 70 65 |e (AML i|s a type|
|00005330| 6c 65 73 73 20 6c 61 6e | 67 75 61 67 65 29 3a 0d |less lan|guage):.|
|00005340| 0a 0d 0a 20 20 20 20 78 | 20 3d 20 22 31 33 22 20 |... x| = "13" |
|00005350| 2b 20 22 31 32 22 20 20 | 20 20 20 20 20 20 20 20 |+ "12" | |
|00005360| 20 20 2f 2f 20 78 20 69 | 73 20 32 35 0d 0a 20 20 | // x i|s 25.. |
|00005370| 20 20 78 20 3d 20 22 31 | 33 22 20 2b 20 34 20 20 | x = "1|3" + 4 |
|00005380| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 2f 2f 20 | | // |
|00005390| 78 20 69 73 20 31 37 0d | 0a 0d 0a 20 20 54 6f 20 |x is 17.|... To |
|000053a0| 63 6f 6e 63 61 74 65 6e | 61 74 65 20 74 77 6f 20 |concaten|ate two |
|000053b0| 6f 72 20 6d 6f 72 65 20 | 6e 75 6d 65 72 69 63 20 |or more |numeric |
|000053c0| 73 74 72 69 6e 67 73 2c | 20 75 73 65 20 74 68 65 |strings,| use the|
|000053d0| 20 27 63 6f 6e 63 61 74 | 27 20 62 75 69 6c 74 69 | 'concat|' builti|
|000053e0| 6e 0d 0a 20 20 66 75 6e | 63 74 69 6f 6e 3a 0d 0a |n.. fun|ction:..|
|000053f0| 0d 0a 20 20 20 20 78 20 | 3d 20 63 6f 6e 63 61 74 |.. x |= concat|
|00005400| 20 22 31 33 22 20 22 31 | 32 22 20 20 20 20 20 20 | "13" "1|2" |
|00005410| 20 2f 2f 20 78 20 69 73 | 20 22 31 33 31 32 22 0d | // x is| "1312".|
|00005420| 0a 0d 0a 20 20 54 68 65 | 20 73 75 62 73 74 72 69 |... The| substri|
|00005430| 6e 67 20 6f 70 65 72 61 | 74 6f 72 20 5b 5d 20 69 |ng opera|tor [] i|
|00005440| 73 20 75 73 65 64 20 74 | 6f 20 72 65 74 75 72 6e |s used t|o return|
|00005450| 20 61 20 70 6f 72 74 69 | 6f 6e 20 6f 66 20 61 20 | a porti|on of a |
|00005460| 73 74 72 69 6e 67 2e 20 | 49 66 0d 0a 20 20 6f 6e |string. |If.. on|
|00005470| 6c 79 20 6f 6e 65 20 6e | 75 6d 65 72 69 63 20 6f |ly one n|umeric o|
|00005480| 70 65 72 61 6e 64 20 69 | 73 20 73 70 65 63 69 66 |perand i|s specif|
|00005490| 69 65 64 2c 20 74 68 65 | 6e 20 74 68 65 20 73 75 |ied, the|n the su|
|000054a0| 62 73 74 72 69 6e 67 20 | 6f 70 65 72 61 74 6f 72 |bstring |operator|
|000054b0| 0d 0a 20 20 72 65 66 65 | 72 65 6e 63 65 73 20 61 |.. refe|rences a|
|000054c0| 20 6f 6e 65 2d 63 68 61 | 72 61 63 74 65 72 20 73 | one-cha|racter s|
|000054d0| 75 62 73 74 72 69 6e 67 | 20 61 74 20 74 68 65 20 |ubstring| at the |
|000054e0| 70 6f 73 69 74 69 6f 6e | 20 69 6e 20 74 68 65 20 |position| in the |
|000054f0| 73 74 72 69 6e 67 0d 0a | 20 20 73 70 65 63 69 66 |string..| specif|
|00005500| 69 65 64 20 62 79 20 74 | 68 65 20 6f 70 65 72 61 |ied by t|he opera|
|00005510| 6e 64 2e 20 46 6f 72 20 | 65 78 61 6d 70 6c 65 3a |nd. For |example:|
|00005520| 0d 0a 0d 0a 20 20 20 20 | 61 20 3d 20 22 61 70 70 |.... |a = "app|
|00005530| 6c 65 73 22 0d 0a 20 20 | 20 20 62 20 3d 20 22 6f |les".. | b = "o|
|00005540| 72 61 6e 67 65 73 22 0d | 0a 20 20 20 20 78 20 3d |ranges".|. x =|
|00005550| 20 61 20 5b 31 5d 20 20 | 20 20 20 20 20 20 20 20 | a [1] | |
|00005560| 20 20 20 20 20 20 20 20 | 2f 2f 20 78 20 69 73 20 | |// x is |
|00005570| 27 61 27 0d 0a 20 20 20 | 20 78 20 3d 20 62 20 5b |'a'.. | x = b [|
|00005580| 35 5d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |5] | |
|00005590| 20 20 20 20 2f 2f 20 78 | 20 69 73 20 27 67 27 0d | // x| is 'g'.|
|000055a0| 0a 20 20 20 20 6e 20 3d | 20 34 0d 0a 20 20 20 20 |. n =| 4.. |
|000055b0| 78 20 3d 20 62 20 5b 6e | 20 2b 20 32 5d 20 20 20 |x = b [n| + 2] |
|000055c0| 20 20 20 20 20 20 20 20 | 20 20 20 2f 2f 20 78 20 | | // x |
|000055d0| 69 73 20 27 65 27 0d 0a | 0d 0a 20 20 53 70 65 63 |is 'e'..|.. Spec|
|000055e0| 69 66 79 69 6e 67 20 61 | 20 70 6f 73 69 74 69 6f |ifying a| positio|
|000055f0| 6e 20 6f 66 20 7a 65 72 | 6f 20 72 65 66 65 72 65 |n of zer|o refere|
|00005600| 6e 63 65 73 20 74 68 65 | 20 6c 61 73 74 20 63 68 |nces the| last ch|
|00005610| 61 72 61 63 74 65 72 20 | 69 6e 20 74 68 65 0d 0a |aracter |in the..|
|00005620| 20 20 73 74 72 69 6e 67 | 3a 0d 0a 0d 0a 20 20 20 | string|:.... |
|00005630| 20 61 20 3d 20 22 61 70 | 70 6c 65 73 22 0d 0a 20 | a = "ap|ples".. |
|00005640| 20 20 20 78 20 3d 20 61 | 20 5b 30 5d 20 20 20 20 | x = a| [0] |
|00005650| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 2f 2f | | //|
|00005660| 20 78 20 69 73 20 27 73 | 27 0d 0a 0d 0a 20 20 49 | x is 's|'.... I|
|00005670| 66 20 74 77 6f 20 6e 75 | 6d 65 72 69 63 20 6f 70 |f two nu|meric op|
|00005680| 65 72 61 6e 64 73 20 61 | 72 65 20 73 70 65 63 69 |erands a|re speci|
|00005690| 66 69 65 64 20 73 65 70 | 61 72 61 74 65 64 20 62 |fied sep|arated b|
|000056a0| 79 20 61 20 63 6f 6c 6f | 6e 2c 20 74 68 65 6e 20 |y a colo|n, then |
|000056b0| 74 68 65 0d 0a 20 20 73 | 75 62 73 74 72 69 6e 67 |the.. s|ubstring|
|000056c0| 20 6f 70 65 72 61 74 6f | 72 20 72 65 66 65 72 65 | operato|r refere|
|000056d0| 6e 63 65 73 20 61 20 6d | 75 6c 74 69 2d 63 68 61 |nces a m|ulti-cha|
|000056e0| 72 61 63 74 65 72 20 73 | 75 62 73 74 72 69 6e 67 |racter s|ubstring|
|000056f0| 20 61 74 20 74 68 65 0d | 0a 20 20 70 6f 73 69 74 | at the.|. posit|
|00005700| 69 6f 6e 20 69 6e 20 74 | 68 65 20 73 74 72 69 6e |ion in t|he strin|
|00005710| 67 20 73 70 65 63 69 66 | 69 65 64 20 62 79 20 74 |g specif|ied by t|
|00005720| 68 65 20 66 69 72 73 74 | 20 6f 70 65 72 61 6e 64 |he first| operand|
|00005730| 20 66 6f 72 20 74 68 65 | 20 6c 65 6e 67 74 68 0d | for the| length.|
|00005740| 0a 20 20 73 70 65 63 69 | 66 69 65 64 20 62 79 20 |. speci|fied by |
|00005750| 74 68 65 20 73 65 63 6f | 6e 64 20 6f 70 65 72 61 |the seco|nd opera|
|00005760| 6e 64 2e 20 46 6f 72 20 | 65 78 61 6d 70 6c 65 3a |nd. For |example:|
|00005770| 0d 0a 0d 0a 20 20 20 20 | 61 20 3d 20 22 61 70 70 |.... |a = "app|
|00005780| 6c 65 73 22 0d 0a 20 20 | 20 20 62 20 3d 20 22 6f |les".. | b = "o|
|00005790| 72 61 6e 67 65 73 22 0d | 0a 20 20 20 20 78 20 3d |ranges".|. x =|
|000057a0| 20 61 20 5b 31 3a 33 5d | 20 20 20 20 20 20 20 20 | a [1:3]| |
|000057b0| 20 20 20 20 20 20 20 20 | 2f 2f 20 78 20 69 73 20 | |// x is |
|000057c0| 27 61 70 70 27 0d 0a 20 | 20 20 20 78 20 3d 20 62 |'app'.. | x = b|
|000057d0| 20 5b 32 3a 35 5d 20 20 | 20 20 20 20 20 20 20 20 | [2:5] | |
|000057e0| 20 20 20 20 20 20 2f 2f | 20 78 20 69 73 20 27 72 | //| x is 'r|
|000057f0| 61 6e 67 65 27 0d 0a 20 | 20 20 20 6e 20 3d 20 33 |ange'.. | n = 3|
|00005800| 0d 0a 20 20 20 20 78 20 | 3d 20 62 20 5b 6e 20 2d |.. x |= b [n -|
|00005810| 20 31 20 3a 20 6e 20 2b | 20 32 5d 20 20 20 20 20 | 1 : n +| 2] |
|00005820| 20 2f 2f 20 78 20 69 73 | 20 27 72 61 6e 67 65 27 | // x is| 'range'|
|00005830| 0d 0a 0d 0a 20 20 53 70 | 65 63 69 66 79 69 6e 67 |.... Sp|ecifying|
|00005840| 20 61 20 6c 65 6e 67 74 | 68 20 6f 66 20 7a 65 72 | a lengt|h of zer|
|00005850| 6f 20 72 65 74 75 72 6e | 73 20 74 68 65 20 72 65 |o return|s the re|
|00005860| 6d 61 69 6e 64 65 72 20 | 6f 66 20 74 68 65 20 73 |mainder |of the s|
|00005870| 74 72 69 6e 67 2c 0d 0a | 20 20 73 74 61 72 74 69 |tring,..| starti|
|00005880| 6e 67 20 61 74 20 74 68 | 65 20 73 70 65 63 69 66 |ng at th|e specif|
|00005890| 69 65 64 20 70 6f 73 69 | 74 69 6f 6e 3a 0d 0a 0d |ied posi|tion:...|
|000058a0| 0a 20 20 20 20 62 20 3d | 20 22 6f 72 61 6e 67 65 |. b =| "orange|
|000058b0| 73 22 0d 0a 20 20 20 20 | 78 20 3d 20 62 20 5b 32 |s".. |x = b [2|
|000058c0| 3a 30 5d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |:0] | |
|000058d0| 20 20 20 2f 2f 20 78 20 | 69 73 20 27 72 61 6e 67 | // x |is 'rang|
|000058e0| 65 73 27 0d 0a 0d 0a 20 | 20 4e 6f 74 65 20 74 68 |es'.... | Note th|
|000058f0| 61 74 20 74 68 65 20 5b | 5d 20 6f 70 65 72 61 74 |at the [|] operat|
|00005900| 6f 72 20 69 73 20 6e 6f | 74 20 6c 69 6d 69 74 65 |or is no|t limite|
|00005910| 64 20 74 6f 20 76 61 72 | 69 61 62 6c 65 73 2e 20 |d to var|iables. |
|00005920| 54 68 65 20 5b 5d 20 6f | 70 65 72 61 74 6f 72 0d |The [] o|perator.|
|00005930| 0a 20 20 63 61 6e 20 61 | 6c 73 6f 20 62 65 20 75 |. can a|lso be u|
|00005940| 73 65 64 20 77 69 74 68 | 20 63 6f 6e 73 74 61 6e |sed with| constan|
|00005950| 74 73 2c 20 6e 75 6d 62 | 65 72 73 2c 20 65 78 70 |ts, numb|ers, exp|
|00005960| 72 65 73 73 69 6f 6e 73 | 2c 20 61 6e 64 20 66 75 |ressions|, and fu|
|00005970| 6e 63 74 69 6f 6e 0d 0a | 20 20 63 61 6c 6c 73 2e |nction..| calls.|
|00005980| 20 46 6f 72 20 65 78 61 | 6d 70 6c 65 3a 0d 0a 0d | For exa|mple:...|
|00005990| 0a 20 20 20 20 69 20 3d | 20 32 0d 0a 20 20 20 20 |. i =| 2.. |
|000059a0| 78 20 3d 20 22 6f 72 61 | 6e 67 65 73 22 20 5b 69 |x = "ora|nges" [i|
|000059b0| 20 3a 20 35 5d 20 20 20 | 20 20 20 20 20 20 20 20 | : 5] | |
|000059c0| 20 20 20 2f 2f 20 78 20 | 69 73 20 27 72 61 6e 67 | // x |is 'rang|
|000059d0| 65 27 0d 0a 20 20 20 20 | 78 20 3d 20 32 36 33 38 |e'.. |x = 2638|
|000059e0| 31 20 5b 33 20 3a 20 69 | 5d 20 20 20 20 20 20 20 |1 [3 : i|] |
|000059f0| 20 20 20 20 20 20 20 20 | 20 20 20 2f 2f 20 78 20 | | // x |
|00005a00| 69 73 20 27 33 38 27 0d | 0a 20 20 20 20 78 20 3d |is '38'.|. x =|
|00005a10| 20 28 27 6f 72 61 6e 67 | 65 73 27 20 2b 20 27 61 | ('orang|es' + 'a|
|00005a20| 70 70 6c 65 73 27 29 20 | 5b 37 3a 33 5d 20 20 20 |pples') |[7:3] |
|00005a30| 2f 2f 20 78 20 69 73 20 | 27 73 61 70 27 0d 0a 20 |// x is |'sap'.. |
|00005a40| 20 20 20 78 20 3d 20 67 | 65 74 6c 69 6e 65 73 20 | x = g|etlines |
|00005a50| 5b 30 5d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |[0] | |
|00005a60| 20 20 20 20 20 20 2f 2f | 20 78 20 69 73 20 74 68 | //| x is th|
|00005a70| 65 20 6c 61 73 74 20 64 | 69 67 69 74 20 6f 66 20 |e last d|igit of |
|00005a80| 74 68 65 0d 0a 20 20 20 | 20 20 20 20 20 20 20 20 |the.. | |
|00005a90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005aa0| 20 20 20 20 20 20 20 20 | 20 20 20 20 2f 2f 20 20 | | // |
|00005ab0| 20 74 6f 74 61 6c 20 6e | 75 6d 62 65 72 20 6f 66 | total n|umber of|
|00005ac0| 20 6c 69 6e 65 73 20 69 | 6e 20 74 68 65 0d 0a 20 | lines i|n the.. |
|00005ad0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005ae0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005af0| 20 20 20 20 20 20 2f 2f | 20 20 20 63 75 72 72 65 | //| curre|
|00005b00| 6e 74 20 62 75 66 66 65 | 72 0d 0a 0d 0a 0d 0a 20 |nt buffe|r...... |
|00005b10| 20 4c 6f 67 69 63 61 6c | 20 4f 70 65 72 61 74 6f | Logical| Operato|
|00005b20| 72 73 00 0d 0a 20 20 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |rs... .|........|
|00005b30| c4 c4 c4 c4 c4 c4 c4 c4 | 0d 0a 20 20 4c 6f 67 69 |........|.. Logi|
|00005b40| 63 61 6c 20 6f 70 65 72 | 61 74 6f 72 73 20 74 65 |cal oper|ators te|
|00005b50| 73 74 20 77 68 65 74 68 | 65 72 20 6f 72 20 6e 6f |st wheth|er or no|
|00005b60| 74 20 65 78 70 72 65 73 | 73 69 6f 6e 73 20 61 72 |t expres|sions ar|
|00005b70| 65 20 54 52 55 45 20 6f | 72 20 46 41 4c 53 45 2e |e TRUE o|r FALSE.|
|00005b80| 0d 0a 20 20 54 68 65 20 | 72 65 73 75 6c 74 20 6f |.. The |result o|
|00005b90| 66 20 65 76 61 6c 75 61 | 74 69 6e 67 20 61 20 6c |f evalua|ting a l|
|00005ba0| 6f 67 69 63 61 6c 20 6f | 70 65 72 61 74 6f 72 20 |ogical o|perator |
|00005bb0| 69 73 20 61 6c 73 6f 20 | 65 69 74 68 65 72 20 54 |is also |either T|
|00005bc0| 52 55 45 20 28 31 29 20 | 6f 72 0d 0a 20 20 46 41 |RUE (1) |or.. FA|
|00005bd0| 4c 53 45 20 28 74 68 65 | 20 6e 75 6c 6c 20 73 74 |LSE (the| null st|
|00005be0| 72 69 6e 67 29 2e 20 54 | 68 65 20 6c 6f 67 69 63 |ring). T|he logic|
|00005bf0| 61 6c 20 6f 70 65 72 61 | 74 6f 72 73 20 61 72 65 |al opera|tors are|
|00005c00| 3a 0d 0a 0d 0a 20 20 20 | ff 61 6e 64 ff 20 2d 20 |:.... |.and. - |
|00005c10| 74 65 73 74 73 20 69 66 | 20 74 77 6f 20 65 78 70 |tests if| two exp|
|00005c20| 72 65 73 73 69 6f 6e 73 | 20 61 72 65 20 54 52 55 |ressions| are TRU|
|00005c30| 45 0d 0a 20 20 20 ff 6f | 72 ff 20 20 2d 20 74 65 |E.. .o|r. - te|
|00005c40| 73 74 73 20 69 66 20 61 | 74 20 6c 65 61 73 74 20 |sts if a|t least |
|00005c50| 6f 6e 65 20 6f 66 20 74 | 77 6f 20 65 78 70 72 65 |one of t|wo expre|
|00005c60| 73 73 69 6f 6e 73 20 69 | 73 20 54 52 55 45 0d 0a |ssions i|s TRUE..|
|00005c70| 20 20 20 ff 6e 6f 74 ff | 20 2d 20 74 65 73 74 73 | .not.| - tests|
|00005c80| 20 69 66 20 61 6e 20 65 | 78 70 72 65 73 73 69 6f | if an e|xpressio|
|00005c90| 6e 20 69 73 20 46 41 4c | 53 45 0d 0a 0d 0a 20 20 |n is FAL|SE.... |
|00005ca0| 45 78 61 6d 70 6c 65 73 | 3a 0d 0a 0d 0a 20 20 20 |Examples|:.... |
|00005cb0| 20 61 20 3d 20 34 20 20 | 62 20 3d 20 35 0d 0a 20 | a = 4 |b = 5.. |
|00005cc0| 20 20 20 61 ff 61 6e 64 | ff 62 20 20 20 20 20 20 | a.and|.b |
|00005cd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005ce0| 20 2f 2f 20 76 61 6c 75 | 65 20 69 73 20 54 52 55 | // valu|e is TRU|
|00005cf0| 45 0d 0a 20 20 20 20 61 | 20 2d 20 34 ff 61 6e 64 |E.. a| - 4.and|
|00005d00| ff 62 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.b | |
|00005d10| 20 20 20 20 20 2f 2f 20 | 76 61 6c 75 65 20 69 73 | // |value is|
|00005d20| 20 46 41 4c 53 45 0d 0a | 20 20 20 20 61 20 2d 20 | FALSE..| a - |
|00005d30| 34 ff 6f 72 ff 62 20 20 | 20 20 20 20 20 20 20 20 |4.or.b | |
|00005d40| 20 20 20 20 20 20 20 20 | 20 20 2f 2f 20 76 61 6c | | // val|
|00005d50| 75 65 20 69 73 20 54 52 | 55 45 0d 0a 20 20 20 20 |ue is TR|UE.. |
|00005d60| 61 20 3d 3d 20 35 ff 6f | 72 ff 62 20 3d 3d 20 34 |a == 5.o|r.b == 4|
|00005d70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 2f 2f | | //|
|00005d80| 20 76 61 6c 75 65 20 69 | 73 20 46 41 4c 53 45 0d | value i|s FALSE.|
|00005d90| 0a 20 20 20 ff 6e 6f 74 | ff 61 20 20 20 20 20 20 |. .not|.a |
|00005da0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005db0| 20 20 20 2f 2f 20 76 61 | 6c 75 65 20 69 73 20 46 | // va|lue is F|
|00005dc0| 41 4c 53 45 0d 0a 20 20 | 20 ff 6e 6f 74 ff 28 62 |ALSE.. | .not.(b|
|00005dd0| 20 2d 20 61 20 2d 20 31 | 29 20 20 20 20 20 20 20 | - a - 1|) |
|00005de0| 20 20 20 20 20 20 20 20 | 2f 2f 20 76 61 6c 75 65 | |// value|
|00005df0| 20 69 73 20 54 52 55 45 | 0d 0a 0d 0a 20 20 54 68 | is TRUE|.... Th|
|00005e00| 65 20 27 61 6e 64 27 20 | 61 6e 64 20 27 6f 72 27 |e 'and' |and 'or'|
|00005e10| 20 6f 70 65 72 61 74 6f | 72 73 20 68 61 76 65 20 | operato|rs have |
|00005e20| 61 20 6c 6f 77 65 72 20 | 70 72 65 63 65 64 65 6e |a lower |preceden|
|00005e30| 63 65 20 74 68 61 6e 20 | 74 68 65 0d 0a 20 20 61 |ce than |the.. a|
|00005e40| 72 69 74 68 6d 65 74 69 | 63 20 61 6e 64 20 72 65 |rithmeti|c and re|
|00005e50| 6c 61 74 69 6f 6e 61 6c | 20 6f 70 65 72 61 74 6f |lational| operato|
|00005e60| 72 73 2e 20 46 6f 72 20 | 65 78 61 6d 70 6c 65 3a |rs. For |example:|
|00005e70| 0d 0a 0d 0a 20 20 20 20 | 61 20 3d 3d 20 34 ff 61 |.... |a == 4.a|
|00005e80| 6e 64 ff 61 20 3d 3d 20 | 62 20 2d 20 31 20 20 20 |nd.a == |b - 1 |
|00005e90| 20 20 20 20 20 20 2f 2f | 20 69 73 20 65 71 75 69 | //| is equi|
|00005ea0| 76 61 6c 65 6e 74 20 74 | 6f 2e 2e 0d 0a 20 20 20 |valent t|o.... |
|00005eb0| 20 28 61 20 3d 3d 20 34 | 29 ff 61 6e 64 ff 28 61 | (a == 4|).and.(a|
|00005ec0| 20 3d 3d 20 28 62 20 2d | 20 31 29 29 0d 0a 0d 0a | == (b -| 1))....|
|00005ed0| 20 20 54 68 65 20 27 6e | 6f 74 27 20 6f 70 65 72 | The 'n|ot' oper|
|00005ee0| 61 74 6f 72 20 68 61 73 | 20 61 20 68 69 67 68 65 |ator has| a highe|
|00005ef0| 72 20 70 72 65 63 65 64 | 65 6e 63 65 20 74 68 61 |r preced|ence tha|
|00005f00| 6e 20 62 6f 74 68 20 74 | 68 65 20 61 72 69 74 68 |n both t|he arith|
|00005f10| 6d 65 74 69 63 0d 0a 20 | 20 61 6e 64 20 72 65 6c |metic.. | and rel|
|00005f20| 61 74 69 6f 6e 61 6c 20 | 6f 70 65 72 61 74 6f 72 |ational |operator|
|00005f30| 73 2e 20 46 6f 72 20 65 | 78 61 6d 70 6c 65 3a 0d |s. For e|xample:.|
|00005f40| 0a 0d 0a 20 20 20 20 62 | 20 3d 20 33 3b 0d 0a 20 |... b| = 3;.. |
|00005f50| 20 20 20 61 20 3d 20 6e | 6f 74 20 62 20 2b 20 31 | a = n|ot b + 1|
|00005f60| 20 20 20 20 20 20 20 2f | 2f 20 61 20 69 73 20 31 | /|/ a is 1|
|00005f70| 0d 0a 0d 0a 20 20 4e 6f | 74 65 20 74 68 61 74 20 |.... No|te that |
|00005f80| 74 68 65 20 27 61 6e 64 | 27 20 61 6e 64 20 27 6f |the 'and|' and 'o|
|00005f90| 72 27 20 6f 70 65 72 61 | 74 6f 72 73 20 64 6f 20 |r' opera|tors do |
|00005fa0| 6e 6f 74 20 61 6c 77 61 | 79 73 20 65 76 61 6c 75 |not alwa|ys evalu|
|00005fb0| 61 74 65 20 61 6c 6c 20 | 74 68 65 0d 0a 20 20 65 |ate all |the.. e|
|00005fc0| 78 70 72 65 73 73 69 6f | 6e 73 20 74 68 65 79 20 |xpressio|ns they |
|00005fd0| 63 6f 6d 70 61 72 65 2e | 20 4f 6e 63 65 20 74 68 |compare.| Once th|
|00005fe0| 65 20 76 61 6c 75 65 20 | 6f 66 20 74 68 65 20 6c |e value |of the l|
|00005ff0| 6f 67 69 63 61 6c 20 65 | 78 70 72 65 73 73 69 6f |ogical e|xpressio|
|00006000| 6e 20 69 73 0d 0a 20 20 | 6b 6e 6f 77 6e 2c 20 6e |n is.. |known, n|
|00006010| 6f 20 66 75 72 74 68 65 | 72 20 65 76 61 6c 75 61 |o furthe|r evalua|
|00006020| 74 69 6f 6e 20 6f 63 63 | 75 72 73 2e 20 46 6f 72 |tion occ|urs. For|
|00006030| 20 65 78 61 6d 70 6c 65 | 3a 0d 0a 0d 0a 20 20 20 | example|:.... |
|00006040| 20 28 66 75 6e 41 20 31 | 29 ff 6f 72 ff 28 66 75 | (funA 1|).or.(fu|
|00006050| 6e 42 20 32 29 0d 0a 0d | 0a 20 20 49 6e 20 74 68 |nB 2)...|. In th|
|00006060| 65 20 65 78 61 6d 70 6c | 65 20 61 62 6f 76 65 2c |e exampl|e above,|
|00006070| 20 69 66 20 27 66 75 6e | 41 20 31 27 20 69 73 20 | if 'fun|A 1' is |
|00006080| 54 52 55 45 2c 20 74 68 | 65 20 6f 72 2d 65 78 70 |TRUE, th|e or-exp|
|00006090| 72 65 73 73 69 6f 6e 20 | 69 73 20 54 52 55 45 0d |ression |is TRUE.|
|000060a0| 0a 20 20 61 6e 64 20 74 | 68 65 20 66 75 6e 63 74 |. and t|he funct|
|000060b0| 69 6f 6e 20 27 66 75 6e | 42 27 20 69 73 20 6e 6f |ion 'fun|B' is no|
|000060c0| 74 20 63 61 6c 6c 65 64 | 2e 20 53 69 6d 69 6c 61 |t called|. Simila|
|000060d0| 72 6c 79 3a 0d 0a 0d 0a | 20 20 20 20 28 66 75 6e |rly:....| (fun|
|000060e0| 41 20 31 29 ff 61 6e 64 | ff 28 66 75 6e 42 20 32 |A 1).and|.(funB 2|
|000060f0| 29 0d 0a 0d 0a 20 20 49 | 6e 20 74 68 65 20 61 62 |).... I|n the ab|
|00006100| 6f 76 65 20 65 78 61 6d | 70 6c 65 2c 20 69 66 20 |ove exam|ple, if |
|00006110| 27 66 75 6e 41 20 31 27 | 20 69 73 20 46 41 4c 53 |'funA 1'| is FALS|
|00006120| 45 2c 20 74 68 65 20 61 | 6e 64 2d 65 78 70 72 65 |E, the a|nd-expre|
|00006130| 73 73 69 6f 6e 20 69 73 | 0d 0a 20 20 46 41 4c 53 |ssion is|.. FALS|
|00006140| 45 20 61 6e 64 20 74 68 | 65 20 66 75 6e 63 74 69 |E and th|e functi|
|00006150| 6f 6e 20 27 66 75 6e 42 | 27 20 69 73 20 6e 6f 74 |on 'funB|' is not|
|00006160| 20 63 61 6c 6c 65 64 2e | 0d 0a 0d 0a 0d 0a 20 20 | called.|...... |
|00006170| 42 69 74 77 69 73 65 20 | 4f 70 65 72 61 74 6f 72 |Bitwise |Operator|
|00006180| 73 00 0d 0a 20 20 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |s... ..|........|
|00006190| c4 c4 c4 c4 c4 c4 c4 0d | 0a 20 20 54 68 65 20 62 |........|. The b|
|000061a0| 69 74 77 69 73 65 20 6f | 70 65 72 61 74 6f 72 73 |itwise o|perators|
|000061b0| 20 63 61 6e 20 62 65 20 | 75 73 65 64 20 74 6f 20 | can be |used to |
|000061c0| 6d 61 6e 69 70 75 6c 61 | 74 65 20 6f 72 20 74 65 |manipula|te or te|
|000061d0| 73 74 20 69 6e 64 69 76 | 69 64 75 61 6c 0d 0a 20 |st indiv|idual.. |
|000061e0| 20 62 69 74 73 20 69 6e | 20 6e 75 6d 65 72 69 63 | bits in| numeric|
|000061f0| 20 65 78 70 72 65 73 73 | 69 6f 6e 73 2e 20 42 69 | express|ions. Bi|
|00006200| 74 77 69 73 65 20 6f 70 | 65 72 61 74 6f 72 73 20 |twise op|erators |
|00006210| 68 61 76 65 20 61 20 68 | 69 67 68 65 72 0d 0a 20 |have a h|igher.. |
|00006220| 20 70 72 65 63 65 64 65 | 6e 63 65 20 74 68 61 6e | precede|nce than|
|00006230| 20 74 68 65 20 27 61 6e | 64 27 20 61 6e 64 20 27 | the 'an|d' and '|
|00006240| 6f 72 27 20 6c 6f 67 69 | 63 61 6c 20 6f 70 65 72 |or' logi|cal oper|
|00006250| 61 74 6f 72 73 20 61 6e | 64 20 61 20 6c 6f 77 65 |ators an|d a lowe|
|00006260| 72 0d 0a 20 20 70 72 65 | 63 65 64 65 6e 63 65 20 |r.. pre|cedence |
|00006270| 74 68 61 6e 20 74 68 65 | 20 72 65 6c 61 74 69 6f |than the| relatio|
|00006280| 6e 61 6c 20 6f 70 65 72 | 61 74 6f 72 73 2e 20 54 |nal oper|ators. T|
|00006290| 68 65 20 62 69 74 77 69 | 73 65 20 6f 70 65 72 61 |he bitwi|se opera|
|000062a0| 74 6f 72 73 20 61 72 65 | 3a 0d 0a 0d 0a 20 20 20 |tors are|:.... |
|000062b0| ff 73 68 6c ff 20 20 73 | 68 69 66 74 20 62 69 74 |.shl. s|hift bit|
|000062c0| 73 20 6c 65 66 74 0d 0a | 20 20 20 ff 73 68 72 ff |s left..| .shr.|
|000062d0| 20 20 73 68 69 66 74 20 | 62 69 74 73 20 72 69 67 | shift |bits rig|
|000062e0| 68 74 0d 0a 20 20 20 ff | 26 ff 20 20 20 20 62 69 |ht.. .|&. bi|
|000062f0| 74 77 69 73 65 20 61 6e | 64 0d 0a 20 20 20 ff 7c |twise an|d.. .||
|00006300| ff 20 20 20 20 62 69 74 | 77 69 73 65 20 6f 72 0d |. bit|wise or.|
|00006310| 0a 20 20 20 ff 5e ff 20 | 20 20 20 62 69 74 77 69 |. .^. | bitwi|
|00006320| 73 65 20 65 78 63 6c 75 | 73 69 76 65 2d 6f 72 0d |se exclu|sive-or.|
|00006330| 0a 0d 0a 20 20 45 78 61 | 6d 70 6c 65 73 3a 0d 0a |... Exa|mples:..|
|00006340| 0d 0a 20 20 20 20 61 20 | 3d 20 33 20 20 62 20 3d |.. a |= 3 b =|
|00006350| 20 36 20 20 20 20 20 2f | 2f 20 61 20 3d 20 30 30 | 6 /|/ a = 00|
|00006360| 30 30 30 30 31 31 20 69 | 6e 20 62 69 6e 61 72 79 |000011 i|n binary|
|00006370| 2c 20 62 20 3d 20 30 30 | 30 30 30 31 31 30 20 69 |, b = 00|000110 i|
|00006380| 6e 20 62 69 6e 61 72 79 | 0d 0a 20 20 20 20 61 20 |n binary|.. a |
|00006390| 73 68 6c 20 32 20 20 20 | 20 20 20 20 20 20 20 2f |shl 2 | /|
|000063a0| 2f 20 76 61 6c 75 65 20 | 69 73 20 30 30 30 30 31 |/ value |is 00001|
|000063b0| 31 30 30 20 69 6e 20 62 | 69 6e 61 72 79 2c 20 6f |100 in b|inary, o|
|000063c0| 72 20 31 32 20 69 6e 20 | 64 65 63 69 6d 61 6c 0d |r 12 in |decimal.|
|000063d0| 0a 20 20 20 20 62 20 73 | 68 6c 20 31 20 20 20 20 |. b s|hl 1 |
|000063e0| 20 20 20 20 20 20 2f 2f | 20 76 61 6c 75 65 20 69 | //| value i|
|000063f0| 73 20 30 30 30 30 30 30 | 31 31 20 69 6e 20 62 69 |s 000000|11 in bi|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.