home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
You can browse this item here: TADSREF.TEX
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| LaTeX document, ASCII text, with CRLF line terminators
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| x-fmt/111 Plain Text File
| default
| |
100%
| detectItEasy
| Format: plain text[CRLF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 25 20 24 48 65 61 64 65 | 72 3a 20 63 3a 2f 74 61 |% $Heade|r: c:/ta|
|00000010| 64 73 2f 64 6f 63 2f 52 | 43 53 2f 74 61 64 73 72 |ds/doc/R|CS/tadsr|
|00000020| 65 66 2e 74 65 78 20 31 | 2e 32 20 39 32 2f 31 31 |ef.tex 1|.2 92/11|
|00000030| 2f 31 33 20 31 36 3a 34 | 34 3a 32 32 20 6d 72 6f |/13 16:4|4:22 mro|
|00000040| 62 65 72 74 73 20 45 78 | 70 20 4c 6f 63 6b 65 72 |berts Ex|p Locker|
|00000050| 3a 20 6d 72 6f 62 65 72 | 74 73 20 24 0d 0a 25 0d |: mrober|ts $..%.|
|00000060| 0a 25 20 54 41 44 53 20 | 44 6f 63 75 6d 65 6e 74 |.% TADS |Document|
|00000070| 61 74 69 6f 6e 2c 20 43 | 68 61 70 74 65 72 20 46 |ation, C|hapter F|
|00000080| 69 76 65 3a 20 20 4c 61 | 6e 67 75 61 67 65 20 52 |ive: La|nguage R|
|00000090| 65 66 65 72 65 6e 63 65 | 0d 0a 25 0d 0a 25 20 43 |eference|..%..% C|
|000000a0| 6f 70 79 72 69 67 68 74 | 20 28 63 29 20 31 39 38 |opyright| (c) 198|
|000000b0| 39 20 62 79 20 4d 69 63 | 68 61 65 6c 20 4a 2e 20 |9 by Mic|hael J. |
|000000c0| 52 6f 62 65 72 74 73 2e | 20 20 41 6c 6c 20 52 69 |Roberts.| All Ri|
|000000d0| 67 68 74 73 20 52 65 73 | 65 72 76 65 64 2e 0d 0a |ghts Res|erved...|
|000000e0| 0d 0a 5c 63 68 61 70 74 | 65 72 68 65 61 64 65 72 |..\chapt|erheader|
|000000f0| 7b 43 68 61 70 74 65 72 | 20 46 69 76 65 7d 7b 4c |{Chapter| Five}{L|
|00000100| 61 6e 67 75 61 67 65 20 | 52 65 66 65 72 65 6e 63 |anguage |Referenc|
|00000110| 65 7d 7b 35 7d 0d 0a 0d | 0a 54 68 69 73 20 73 65 |e}{5}...|.This se|
|00000120| 63 74 69 6f 6e 20 64 65 | 73 63 72 69 62 65 73 20 |ction de|scribes |
|00000130| 69 6e 20 64 65 74 61 69 | 6c 20 61 6c 6c 20 6f 66 |in detai|l all of|
|00000140| 20 74 68 65 20 6b 65 79 | 77 6f 72 64 73 2c 20 6f | the key|words, o|
|00000150| 70 65 72 61 74 6f 72 73 | 2c 0d 0a 73 79 6e 74 61 |perators|,..synta|
|00000160| 63 74 69 63 20 65 6c 65 | 6d 65 6e 74 73 2c 20 62 |ctic ele|ments, b|
|00000170| 75 69 6c 74 2d 69 6e 20 | 66 75 6e 63 74 69 6f 6e |uilt-in |function|
|00000180| 73 2c 20 61 6e 64 20 73 | 70 65 63 69 61 6c 20 63 |s, and s|pecial c|
|00000190| 6f 6e 73 69 64 65 72 61 | 74 69 6f 6e 73 20 6f 66 |onsidera|tions of|
|000001a0| 20 74 68 65 0d 0a 54 41 | 44 53 20 6c 61 6e 67 75 | the..TA|DS langu|
|000001b0| 61 67 65 2e 5c 62 75 6c | 6c 0d 0a 0d 0a 5c 63 68 |age.\bul|l....\ch|
|000001c0| 61 70 74 65 72 62 6f 64 | 79 0d 0a 0d 0a 5c 6d 61 |apterbod|y....\ma|
|000001d0| 6a 6f 72 73 65 63 74 69 | 6f 6e 7b 54 79 70 6f 67 |jorsecti|on{Typog|
|000001e0| 72 61 70 68 69 63 61 6c | 20 43 6f 6e 76 65 6e 74 |raphical| Convent|
|000001f0| 69 6f 6e 73 7d 0d 0a 0d | 0a 54 68 69 73 20 73 65 |ions}...|.This se|
|00000200| 63 74 69 6f 6e 20 75 73 | 65 73 20 61 62 73 74 72 |ction us|es abstr|
|00000210| 61 63 74 20 73 79 6e 74 | 61 78 20 64 69 61 67 72 |act synt|ax diagr|
|00000220| 61 6d 73 20 74 6f 20 64 | 65 73 63 72 69 62 65 20 |ams to d|escribe |
|00000230| 74 68 65 20 6c 61 6e 67 | 75 61 67 65 2e 20 20 49 |the lang|uage. I|
|00000240| 6e 0d 0a 74 68 65 73 65 | 20 64 69 61 67 72 61 6d |n..these| diagram|
|00000250| 73 2c 20 73 65 76 65 72 | 61 6c 20 5e 7b 74 79 70 |s, sever|al ^{typ|
|00000260| 6f 67 72 61 70 68 69 63 | 61 6c 20 63 6f 6e 76 65 |ographic|al conve|
|00000270| 6e 74 69 6f 6e 73 7d 20 | 61 72 65 20 75 73 65 64 |ntions} |are used|
|00000280| 3a 0d 0a 0d 0a 7b 5c 70 | 61 72 69 6e 64 65 6e 74 |:....{\p|arindent|
|00000290| 3d 31 2e 32 35 69 6e 5c | 73 6d 61 6c 6c 73 6b 69 |=1.25in\|smallski|
|000002a0| 70 0d 0a 5c 69 74 65 6d | 7b 7b 5c 69 74 20 69 74 |p..\item|{{\it it|
|000002b0| 61 6c 69 63 73 7d 7d 20 | 61 72 65 20 75 73 65 64 |alics}} |are used|
|000002c0| 20 74 6f 20 72 65 70 72 | 65 73 65 6e 74 20 61 20 | to repr|esent a |
|000002d0| 64 65 73 63 72 69 70 74 | 69 6f 6e 20 6f 66 20 61 |descript|ion of a|
|000002e0| 6e 20 69 74 65 6d 20 74 | 68 61 74 0d 0a 6d 75 73 |n item t|hat..mus|
|000002f0| 74 20 62 65 20 72 65 70 | 6c 61 63 65 64 20 77 69 |t be rep|laced wi|
|00000300| 74 68 20 61 6e 20 61 63 | 74 75 61 6c 20 69 6e 73 |th an ac|tual ins|
|00000310| 74 61 6e 63 65 20 6f 66 | 20 74 68 65 20 69 74 65 |tance of| the ite|
|00000320| 6d 2e 0d 0a 5c 69 74 65 | 6d 7b 5b 53 71 75 61 72 |m...\ite|m{[Squar|
|00000330| 65 20 42 72 61 63 6b 65 | 74 73 5d 7d 20 61 72 65 |e Bracke|ts]} are|
|00000340| 20 75 73 65 64 20 74 6f | 20 69 6e 64 69 63 61 74 | used to| indicat|
|00000350| 65 20 74 68 61 74 20 74 | 68 65 20 65 6e 63 6c 6f |e that t|he enclo|
|00000360| 73 65 64 20 69 74 65 6d | 20 6f 72 0d 0a 69 74 65 |sed item| or..ite|
|00000370| 6d 73 20 61 72 65 20 6f | 70 74 69 6f 6e 61 6c 2e |ms are o|ptional.|
|00000380| 0d 0a 5c 69 74 65 6d 7b | 7b 5c 74 74 20 54 79 70 |..\item{|{\tt Typ|
|00000390| 65 77 72 69 74 65 72 7d | 7d 20 74 65 78 74 20 69 |ewriter}|} text i|
|000003a0| 73 20 74 6f 20 62 65 20 | 75 73 65 64 20 76 65 72 |s to be |used ver|
|000003b0| 62 61 74 69 6d 2e 20 20 | 54 68 65 20 73 61 6d 65 |batim. |The same|
|000003c0| 20 61 70 70 6c 69 65 73 | 20 74 6f 0d 0a 61 6e 79 | applies| to..any|
|000003d0| 20 6f 74 68 65 72 20 70 | 75 6e 63 74 75 61 74 69 | other p|unctuati|
|000003e0| 6f 6e 20 73 68 6f 77 6e | 2e 0d 0a 5c 73 6d 61 6c |on shown|...\smal|
|000003f0| 6c 73 6b 69 70 7d 0d 0a | 0d 0a 5c 6d 61 6a 6f 72 |lskip}..|..\major|
|00000400| 73 65 63 74 69 6f 6e 7b | 43 6f 6d 70 6f 6e 65 6e |section{|Componen|
|00000410| 74 73 20 6f 66 20 54 41 | 44 53 7d 0d 0a 0d 0a 54 |ts of TA|DS}....T|
|00000420| 68 65 20 54 41 44 53 20 | 64 65 76 65 6c 6f 70 6d |he TADS |developm|
|00000430| 65 6e 74 20 73 79 73 74 | 65 6d 20 69 6e 63 6c 75 |ent syst|em inclu|
|00000440| 64 65 73 20 61 20 5e 7b | 63 6f 6d 70 69 6c 65 72 |des a ^{|compiler|
|00000450| 7d 2c 20 61 20 5e 7b 72 | 75 6e 2d 74 69 6d 65 20 |}, a ^{r|un-time |
|00000460| 73 79 73 74 65 6d 7d 2c | 0d 0a 61 6e 64 20 73 65 |system},|..and se|
|00000470| 76 65 72 61 6c 20 54 41 | 44 53 20 73 6f 75 72 63 |veral TA|DS sourc|
|00000480| 65 20 66 69 6c 65 73 20 | 63 6f 6e 74 61 69 6e 69 |e files |containi|
|00000490| 6e 67 20 62 61 73 69 63 | 20 61 64 76 65 6e 74 75 |ng basic| adventu|
|000004a0| 72 65 20 64 65 66 69 6e | 69 74 69 6f 6e 73 2e 0d |re defin|itions..|
|000004b0| 0a 0d 0a 57 68 65 6e 20 | 79 6f 75 20 77 72 69 74 |...When |you writ|
|000004c0| 65 20 61 20 54 41 44 53 | 20 70 72 6f 67 72 61 6d |e a TADS| program|
|000004d0| 2c 20 79 6f 75 20 75 73 | 65 20 61 20 74 65 78 74 |, you us|e a text|
|000004e0| 20 65 64 69 74 6f 72 20 | 28 77 68 69 63 68 20 69 | editor |(which i|
|000004f0| 73 20 6e 6f 74 20 69 6e | 63 6c 75 64 65 64 0d 0a |s not in|cluded..|
|00000500| 77 69 74 68 20 54 41 44 | 53 29 20 74 6f 20 70 72 |with TAD|S) to pr|
|00000510| 65 70 61 72 65 20 61 20 | 73 6f 75 72 63 65 20 66 |epare a |source f|
|00000520| 69 6c 65 2c 20 74 68 65 | 6e 20 79 6f 75 20 63 6f |ile, the|n you co|
|00000530| 6d 70 69 6c 65 20 74 68 | 65 20 66 69 6c 65 2e 20 |mpile th|e file. |
|00000540| 20 54 68 65 20 63 6f 6d | 70 69 6c 65 72 0d 0a 63 | The com|piler..c|
|00000550| 68 65 63 6b 73 20 74 68 | 65 20 65 6e 74 69 72 65 |hecks th|e entire|
|00000560| 20 70 72 6f 67 72 61 6d | 20 66 6f 72 20 73 79 6e | program| for syn|
|00000570| 74 61 78 20 65 72 72 6f | 72 73 2c 20 74 68 65 6e |tax erro|rs, then|
|00000580| 20 63 72 65 61 74 65 73 | 20 61 6e 6f 74 68 65 72 | creates| another|
|00000590| 20 66 69 6c 65 0d 0a 63 | 6f 6e 74 61 69 6e 69 6e | file..c|ontainin|
|000005a0| 67 20 61 20 62 69 6e 61 | 72 79 20 72 65 70 72 65 |g a bina|ry repre|
|000005b0| 73 65 6e 74 61 74 69 6f | 6e 20 6f 66 20 79 6f 75 |sentatio|n of you|
|000005c0| 72 20 73 6f 75 72 63 65 | 20 66 69 6c 65 3b 0d 0a |r source| file;..|
|000005d0| 74 68 69 73 20 66 6f 72 | 6d 20 69 73 20 6d 6f 72 |this for|m is mor|
|000005e0| 65 20 65 66 66 69 63 69 | 65 6e 74 20 74 6f 20 65 |e effici|ent to e|
|000005f0| 78 65 63 75 74 65 2c 20 | 73 6f 20 79 6f 75 72 20 |xecute, |so your |
|00000600| 67 61 6d 65 20 77 69 6c | 6c 20 72 65 71 75 69 72 |game wil|l requir|
|00000610| 65 20 6c 65 73 73 0d 0a | 6d 65 6d 6f 72 79 20 61 |e less..|memory a|
|00000620| 6e 64 20 72 75 6e 20 66 | 61 73 74 65 72 2e 0d 0a |nd run f|aster...|
|00000630| 0d 0a 41 66 74 65 72 20 | 79 6f 75 20 68 61 76 65 |..After |you have|
|00000640| 20 63 6f 6d 70 69 6c 65 | 64 20 79 6f 75 72 20 70 | compile|d your p|
|00000650| 72 6f 67 72 61 6d 2c 20 | 79 6f 75 20 75 73 65 20 |rogram, |you use |
|00000660| 74 68 65 20 72 75 6e 2d | 74 69 6d 65 20 6d 6f 64 |the run-|time mod|
|00000670| 75 6c 65 20 74 6f 0d 0a | 65 78 65 63 75 74 65 20 |ule to..|execute |
|00000680| 74 68 65 20 67 61 6d 65 | 2e 20 20 54 68 65 20 72 |the game|. The r|
|00000690| 75 6e 2d 74 69 6d 65 20 | 73 79 73 74 65 6d 20 63 |un-time |system c|
|000006a0| 6f 6e 74 61 69 6e 73 20 | 74 68 65 20 5e 7b 70 6c |ontains |the ^{pl|
|000006b0| 61 79 65 72 20 63 6f 6d | 6d 61 6e 64 0d 0a 70 61 |ayer com|mand..pa|
|000006c0| 72 73 65 72 7d 20 61 6e | 64 20 6f 74 68 65 72 20 |rser} an|d other |
|000006d0| 63 6f 64 65 20 66 6f 72 | 20 75 73 65 72 20 69 6e |code for| user in|
|000006e0| 74 65 72 61 63 74 69 6f | 6e 2e 0d 0a 0d 0a 5c 6d |teractio|n.....\m|
|000006f0| 61 6a 6f 72 73 65 63 74 | 69 6f 6e 7b 49 6e 70 75 |ajorsect|ion{Inpu|
|00000700| 74 20 46 69 6c 65 20 46 | 6f 72 6d 61 74 7d 0d 0a |t File F|ormat}..|
|00000710| 0d 0a 54 68 65 20 54 41 | 44 53 20 5e 7b 63 6f 6d |..The TA|DS ^{com|
|00000720| 70 69 6c 65 72 7d 20 61 | 63 63 65 70 74 73 20 73 |piler} a|ccepts s|
|00000730| 74 61 6e 64 61 72 64 20 | 5e 7b 41 53 43 49 49 7d |tandard |^{ASCII}|
|00000740| 20 74 65 78 74 20 66 69 | 6c 65 73 20 61 73 20 69 | text fi|les as i|
|00000750| 6e 70 75 74 2e 0d 0a 54 | 68 65 20 63 6f 6d 70 69 |nput...T|he compi|
|00000760| 6c 65 72 0d 0a 63 6f 6e | 73 69 64 65 72 73 20 61 |ler..con|siders a|
|00000770| 6e 79 20 61 6d 6f 75 6e | 74 20 6f 66 20 5e 7b 77 |ny amoun|t of ^{w|
|00000780| 68 69 74 65 73 70 61 63 | 65 7d 20 74 6f 20 62 65 |hitespac|e} to be|
|00000790| 20 74 68 65 20 73 61 6d | 65 20 61 73 20 61 20 73 | the sam|e as a s|
|000007a0| 69 6e 67 6c 65 20 73 70 | 61 63 65 3b 20 73 70 61 |ingle sp|ace; spa|
|000007b0| 63 65 73 2c 0d 0a 74 61 | 62 73 2c 20 61 6e 64 20 |ces,..ta|bs, and |
|000007c0| 6e 65 77 6c 69 6e 65 73 | 20 61 6c 6c 20 63 6f 75 |newlines| all cou|
|000007d0| 6e 74 20 61 73 20 77 68 | 69 74 65 73 70 61 63 65 |nt as wh|itespace|
|000007e0| 2e 20 20 57 68 69 74 65 | 73 70 61 63 65 20 63 61 |. White|space ca|
|000007f0| 6e 20 6f 63 63 75 72 20 | 62 65 74 77 65 65 6e 0d |n occur |between.|
|00000800| 0a 61 6e 79 20 74 77 6f | 20 73 79 6e 74 61 63 74 |.any two| syntact|
|00000810| 69 63 20 65 6c 65 6d 65 | 6e 74 73 2c 20 62 75 74 |ic eleme|nts, but|
|00000820| 20 6e 65 65 64 20 6f 6e | 6c 79 20 61 70 70 65 61 | need on|ly appea|
|00000830| 72 20 62 65 74 77 65 65 | 6e 20 74 77 6f 20 69 64 |r betwee|n two id|
|00000840| 65 6e 74 69 66 69 65 72 | 73 0d 0a 6f 72 20 6b 65 |entifier|s..or ke|
|00000850| 79 77 6f 72 64 73 20 74 | 68 61 74 20 68 61 76 65 |ywords t|hat have|
|00000860| 20 6e 6f 20 6f 74 68 65 | 72 20 69 6e 74 65 72 76 | no othe|r interv|
|00000870| 65 6e 69 6e 67 20 70 75 | 6e 63 74 75 61 74 69 6f |ening pu|nctuatio|
|00000880| 6e 2e 20 20 54 68 65 20 | 63 6f 6d 70 69 6c 65 72 |n. The |compiler|
|00000890| 20 6b 6e 6f 77 73 0d 0a | 74 68 61 74 20 70 75 6e | knows..|that pun|
|000008a0| 63 74 75 61 74 69 6f 6e | 20 69 73 20 6e 65 76 65 |ctuation| is neve|
|000008b0| 72 20 70 61 72 74 20 6f | 66 20 61 20 6b 65 79 77 |r part o|f a keyw|
|000008c0| 6f 72 64 20 6f 72 20 69 | 64 65 6e 74 69 66 69 65 |ord or i|dentifie|
|000008d0| 72 2c 20 61 6e 64 20 63 | 61 6e 20 6d 61 6e 61 67 |r, and c|an manag|
|000008e0| 65 20 74 6f 0d 0a 62 72 | 65 61 6b 20 61 70 61 72 |e to..br|eak apar|
|000008f0| 74 20 70 75 6e 63 74 75 | 61 74 69 6f 6e 20 77 68 |t punctu|ation wh|
|00000900| 65 6e 20 69 74 27 73 20 | 61 6c 6c 20 72 75 6e 20 |en it's |all run |
|00000910| 74 6f 67 65 74 68 65 72 | 20 77 69 74 68 6f 75 74 |together| without|
|00000920| 20 73 70 61 63 65 73 2e | 20 20 46 6f 72 0d 0a 72 | spaces.| For..r|
|00000930| 65 61 64 61 62 69 6c 69 | 74 79 2c 20 6c 69 62 65 |eadabili|ty, libe|
|00000940| 72 61 6c 20 75 73 65 20 | 6f 66 20 77 68 69 74 65 |ral use |of white|
|00000950| 73 70 61 63 65 20 69 73 | 20 72 65 63 6f 6d 6d 65 |space is| recomme|
|00000960| 6e 64 65 64 2e 0d 0a 0d | 0a 5c 6d 69 6e 6f 72 73 |nded....|.\minors|
|00000970| 65 63 74 69 6f 6e 7b 49 | 6e 63 6c 75 64 69 6e 67 |ection{I|ncluding|
|00000980| 20 4f 74 68 65 72 20 46 | 69 6c 65 73 7d 0d 0a 0d | Other F|iles}...|
|00000990| 0a 54 68 65 20 7b 5c 74 | 74 20 5e 7b 5c 23 69 6e |.The {\t|t ^{\#in|
|000009a0| 63 6c 75 64 65 7d 7d 0d | 0a 64 69 72 65 63 74 69 |clude}}.|.directi|
|000009b0| 76 65 20 61 6c 6c 6f 77 | 73 20 6f 6e 65 20 66 69 |ve allow|s one fi|
|000009c0| 6c 65 20 74 6f 20 69 6e | 73 65 72 74 20 74 68 65 |le to in|sert the|
|000009d0| 20 63 6f 6e 74 65 6e 74 | 73 20 6f 66 20 61 6e 6f | content|s of ano|
|000009e0| 74 68 65 72 3a 0d 0a 0d | 0a 7b 5c 65 78 61 6d 70 |ther:...|.{\examp|
|000009f0| 6c 65 0d 0a 20 20 20 20 | 5c 23 69 6e 63 6c 75 64 |le.. |\#includ|
|00000a00| 65 20 22 66 69 6c 65 2e | 74 22 0d 0a 20 20 20 20 |e "file.|t".. |
|00000a10| 5c 23 69 6e 63 6c 75 64 | 65 20 3c 66 69 6c 65 2e |\#includ|e <file.|
|00000a20| 74 3e 0d 0a 5c 6d 65 64 | 73 6b 69 70 7d 0d 0a 0d |t>..\med|skip}...|
|00000a30| 0a 48 65 72 65 2c 20 7b | 5c 74 74 20 66 69 6c 65 |.Here, {|\tt file|
|00000a40| 2e 74 7d 0d 0a 69 73 20 | 74 68 65 20 6e 61 6d 65 |.t}..is |the name|
|00000a50| 20 6f 66 20 61 6e 20 6f | 70 65 72 61 74 69 6e 67 | of an o|perating|
|00000a60| 20 73 79 73 74 65 6d 20 | 66 69 6c 65 20 74 6f 20 | system |file to |
|00000a70| 62 65 20 69 6e 63 6c 75 | 64 65 64 2e 20 20 41 6e |be inclu|ded. An|
|00000a80| 0d 0a 69 6e 63 6c 75 64 | 65 64 20 66 69 6c 65 20 |..includ|ed file |
|00000a90| 63 61 6e 20 69 6e 63 6c | 75 64 65 20 61 6e 6f 74 |can incl|ude anot|
|00000aa0| 68 65 72 2c 20 61 6e 64 | 20 73 6f 20 66 6f 72 74 |her, and| so fort|
|00000ab0| 68 2c 20 64 6f 77 6e 20 | 74 6f 20 74 65 6e 20 6c |h, down |to ten l|
|00000ac0| 65 76 65 6c 73 20 6f 66 | 20 6e 65 73 74 65 64 0d |evels of| nested.|
|00000ad0| 0a 66 69 6c 65 73 2e 20 | 20 4e 6f 74 65 20 74 68 |.files. | Note th|
|00000ae0| 61 74 20 74 68 65 20 70 | 6f 75 6e 64 20 73 69 67 |at the p|ound sig|
|00000af0| 6e 2c 20 7b 5c 74 74 20 | 5c 23 7d 2c 0d 0a 6d 75 |n, {\tt |\#},..mu|
|00000b00| 73 74 20 62 65 20 69 6e | 20 74 68 65 20 66 69 72 |st be in| the fir|
|00000b10| 73 74 20 63 6f 6c 75 6d | 6e 20 6f 66 20 74 68 65 |st colum|n of the|
|00000b20| 20 6c 69 6e 65 3b 0d 0a | 6e 6f 20 6c 65 61 64 69 | line;..|no leadi|
|00000b30| 6e 67 20 73 70 61 63 65 | 73 20 61 72 65 20 61 6c |ng space|s are al|
|00000b40| 6c 6f 77 65 64 2e 20 20 | 54 68 65 20 69 6e 63 6c |lowed. |The incl|
|00000b50| 75 64 65 20 66 69 6c 65 | 20 7b 5c 74 74 20 61 64 |ude file| {\tt ad|
|00000b60| 76 2e 74 7d 5c 0d 0a 69 | 73 20 6e 6f 72 6d 61 6c |v.t}\..i|s normal|
|00000b70| 6c 79 20 69 6e 63 6c 75 | 64 65 64 0d 0a 61 74 20 |ly inclu|ded..at |
|00000b80| 74 68 65 20 73 74 61 72 | 74 20 6f 66 20 61 20 67 |the star|t of a g|
|00000b90| 61 6d 65 20 66 69 6c 65 | 20 74 6f 20 64 65 66 69 |ame file| to defi|
|00000ba0| 6e 65 20 74 68 65 20 6d | 61 6e 79 20 69 74 65 6d |ne the m|any item|
|00000bb0| 73 20 74 68 61 74 20 61 | 72 65 20 6e 65 65 64 65 |s that a|re neede|
|00000bc0| 64 20 69 6e 20 61 0d 0a | 6e 6f 72 6d 61 6c 20 61 |d in a..|normal a|
|00000bd0| 64 76 65 6e 74 75 72 65 | 2e 20 20 54 68 65 73 65 |dventure|. These|
|00000be0| 20 64 65 66 69 6e 69 74 | 69 6f 6e 73 20 61 72 65 | definit|ions are|
|00000bf0| 20 71 75 69 74 65 20 67 | 65 6e 65 72 61 6c 2c 20 | quite g|eneral, |
|00000c00| 62 75 74 20 73 70 65 63 | 69 66 69 63 20 67 61 6d |but spec|ific gam|
|00000c10| 65 73 0d 0a 6d 69 67 68 | 74 20 6d 6f 64 69 66 79 |es..migh|t modify|
|00000c20| 20 74 68 65 6d 20 74 6f | 20 63 75 73 74 6f 6d 69 | them to| customi|
|00000c30| 7a 65 20 74 68 65 20 67 | 61 6d 65 2e 0d 0a 0d 0a |ze the g|ame.....|
|00000c40| 4e 6f 74 65 20 74 68 61 | 74 20 77 68 65 6e 20 74 |Note tha|t when t|
|00000c50| 68 65 20 66 69 6c 65 6e | 61 6d 65 20 69 73 20 65 |he filen|ame is e|
|00000c60| 6e 63 6c 6f 73 65 64 20 | 69 6e 20 64 6f 75 62 6c |nclosed |in doubl|
|00000c70| 65 20 71 75 6f 74 65 73 | 2c 20 74 68 65 20 63 6f |e quotes|, the co|
|00000c80| 6d 70 69 6c 65 72 0d 0a | 73 65 61 72 63 68 65 73 |mpiler..|searches|
|00000c90| 20 66 6f 72 20 74 68 65 | 20 66 69 6c 65 20 66 69 | for the| file fi|
|00000ca0| 72 73 74 20 69 6e 20 74 | 68 65 20 63 75 72 72 65 |rst in t|he curre|
|00000cb0| 6e 74 20 64 69 72 65 63 | 74 6f 72 79 2c 20 74 68 |nt direc|tory, th|
|00000cc0| 65 6e 20 69 6e 20 74 68 | 65 0d 0a 64 69 72 65 63 |en in th|e..direc|
|00000cd0| 74 6f 72 69 65 73 20 69 | 6e 20 74 68 65 20 5e 7b |tories i|n the ^{|
|00000ce0| 69 6e 63 6c 75 64 65 20 | 70 61 74 68 7d 20 28 61 |include |path} (a|
|00000cf0| 73 20 73 65 74 20 77 69 | 74 68 20 74 68 65 20 7b |s set wi|th the {|
|00000d00| 5c 74 74 20 2d 69 7d 20 | 63 6f 6d 70 69 6c 65 72 |\tt -i} |compiler|
|00000d10| 0d 0a 73 77 69 74 63 68 | 20 6f 6e 20 6d 6f 73 74 |..switch| on most|
|00000d20| 20 6f 70 65 72 61 74 69 | 6e 67 20 73 79 73 74 65 | operati|ng syste|
|00000d30| 6d 73 29 2e 20 20 57 68 | 65 6e 20 74 68 65 20 66 |ms). Wh|en the f|
|00000d40| 69 6c 65 6e 61 6d 65 20 | 69 73 20 65 6e 63 6c 6f |ilename |is enclo|
|00000d50| 73 65 64 20 69 6e 0d 0a | 61 6e 67 6c 65 20 62 72 |sed in..|angle br|
|00000d60| 61 63 6b 65 74 73 2c 20 | 74 68 65 20 63 6f 6d 70 |ackets, |the comp|
|00000d70| 69 6c 65 72 20 73 65 61 | 72 63 68 65 73 20 6f 6e |iler sea|rches on|
|00000d80| 6c 79 20 69 6e 20 74 68 | 65 20 64 69 72 65 63 74 |ly in th|e direct|
|00000d90| 6f 72 69 65 73 20 69 6e | 20 74 68 65 0d 0a 69 6e |ories in| the..in|
|00000da0| 63 6c 75 64 65 20 70 61 | 74 68 2d 2d 2d 74 68 65 |clude pa|th---the|
|00000db0| 20 63 75 72 72 65 6e 74 | 20 64 69 72 65 63 74 6f | current| directo|
|00000dc0| 72 79 20 69 73 20 7b 5c | 69 74 20 6e 6f 74 7d 20 |ry is {\|it not} |
|00000dd0| 73 65 61 72 63 68 65 64 | 2e 0d 0a 47 65 6e 65 72 |searched|...Gener|
|00000de0| 61 6c 6c 79 2c 20 61 20 | 73 79 73 74 65 6d 20 69 |ally, a |system i|
|00000df0| 6e 63 6c 75 64 65 0d 0a | 66 69 6c 65 20 28 73 75 |nclude..|file (su|
|00000e00| 63 68 20 61 73 20 7b 5c | 74 74 20 5e 7b 61 64 76 |ch as {\|tt ^{adv|
|00000e10| 2e 74 7d 7d 29 0d 0a 73 | 68 6f 75 6c 64 20 62 65 |.t}})..s|hould be|
|00000e20| 20 65 6e 63 6c 6f 73 65 | 64 20 69 6e 20 5e 7b 61 | enclose|d in ^{a|
|00000e30| 6e 67 6c 65 20 62 72 61 | 63 6b 65 74 73 7d 2c 20 |ngle bra|ckets}, |
|00000e40| 77 68 69 6c 65 20 79 6f | 75 72 20 66 69 6c 65 73 |while yo|ur files|
|00000e50| 0d 0a 73 68 6f 75 6c 64 | 20 62 65 20 69 6e 20 74 |..should| be in t|
|00000e60| 68 65 20 63 75 72 72 65 | 6e 74 20 64 69 72 65 63 |he curre|nt direc|
|00000e70| 74 6f 72 79 20 61 6e 64 | 20 65 6e 63 6c 6f 73 65 |tory and| enclose|
|00000e80| 64 20 69 6e 20 5e 7b 64 | 6f 75 62 6c 65 20 71 75 |d in ^{d|ouble qu|
|00000e90| 6f 74 65 73 7d 2e 0d 0a | 0d 0a 5c 6d 69 6e 6f 72 |otes}...|..\minor|
|00000ea0| 73 65 63 74 69 6f 6e 7b | 4d 75 6c 74 69 70 6c 65 |section{|Multiple|
|00000eb0| 20 49 6e 63 6c 75 73 69 | 6f 6e 73 20 6f 66 20 74 | Inclusi|ons of t|
|00000ec0| 68 65 20 53 61 6d 65 20 | 46 69 6c 65 7d 0d 0a 0d |he Same |File}...|
|00000ed0| 0a 5e 5e 7b 4d 75 6c 74 | 69 70 6c 65 20 69 6e 63 |.^^{Mult|iple inc|
|00000ee0| 6c 75 73 69 6f 6e 73 20 | 6f 66 20 74 68 65 20 73 |lusions |of the s|
|00000ef0| 61 6d 65 20 66 69 6c 65 | 7d 0d 0a 54 68 65 20 54 |ame file|}..The T|
|00000f00| 41 44 53 20 63 6f 6d 70 | 69 6c 65 72 20 61 75 74 |ADS comp|iler aut|
|00000f10| 6f 6d 61 74 69 63 61 6c | 6c 79 20 6b 65 65 70 73 |omatical|ly keeps|
|00000f20| 20 74 72 61 63 6b 20 6f | 66 20 65 61 63 68 20 66 | track o|f each f|
|00000f30| 69 6c 65 20 79 6f 75 20 | 68 61 76 65 20 69 6e 63 |ile you |have inc|
|00000f40| 6c 75 64 65 64 2c 0d 0a | 61 6e 64 20 69 67 6e 6f |luded,..|and igno|
|00000f50| 72 65 73 20 72 65 64 75 | 6e 64 61 6e 74 20 7b 5c |res redu|ndant {\|
|00000f60| 74 74 20 5c 23 69 6e 63 | 6c 75 64 65 7d 20 64 69 |tt \#inc|lude} di|
|00000f70| 72 65 63 74 69 76 65 73 | 2e 20 20 4e 6f 74 65 20 |rectives|. Note |
|00000f80| 74 68 61 74 20 74 68 69 | 73 20 66 65 61 74 75 72 |that thi|s featur|
|00000f90| 65 20 69 73 0d 0a 62 61 | 73 65 64 20 6f 6e 20 74 |e is..ba|sed on t|
|00000fa0| 68 65 20 66 69 6c 65 6e | 61 6d 65 20 61 73 20 73 |he filen|ame as s|
|00000fb0| 70 65 63 69 66 69 65 64 | 20 69 6e 20 79 6f 75 72 |pecified| in your|
|00000fc0| 20 70 72 6f 67 72 61 6d | 3b 20 69 66 20 79 6f 75 | program|; if you|
|00000fd0| 20 72 65 66 65 72 20 74 | 6f 20 74 68 65 20 73 61 | refer t|o the sa|
|00000fe0| 6d 65 0d 0a 66 69 6c 65 | 20 62 79 20 64 69 66 66 |me..file| by diff|
|00000ff0| 65 72 65 6e 74 20 6e 61 | 6d 65 73 20 28 66 6f 72 |erent na|mes (for|
|00001000| 20 65 78 61 6d 70 6c 65 | 2c 20 62 79 20 73 70 65 | example|, by spe|
|00001010| 63 69 66 79 69 6e 67 20 | 61 20 70 61 74 68 20 6f |cifying |a path o|
|00001020| 6e 20 6f 6e 65 20 69 6e | 63 6c 75 73 69 6f 6e 2c |n one in|clusion,|
|00001030| 0d 0a 62 75 74 20 75 73 | 69 6e 67 20 61 6e 67 6c |..but us|ing angl|
|00001040| 65 20 62 72 61 63 6b 65 | 74 73 20 74 6f 20 6c 65 |e bracke|ts to le|
|00001050| 74 20 54 41 44 53 20 66 | 69 6e 64 20 74 68 65 20 |t TADS f|ind the |
|00001060| 66 69 6c 65 20 6f 6e 20 | 74 68 65 20 73 65 63 6f |file on |the seco|
|00001070| 6e 64 29 2c 20 74 68 65 | 0d 0a 63 6f 6d 70 69 6c |nd), the|..compil|
|00001080| 65 72 20 77 69 6c 6c 20 | 6e 6f 74 20 62 65 20 61 |er will |not be a|
|00001090| 62 6c 65 20 74 6f 20 69 | 64 65 6e 74 69 66 79 20 |ble to i|dentify |
|000010a0| 74 68 65 20 64 75 70 6c | 69 63 61 74 65 20 66 69 |the dupl|icate fi|
|000010b0| 6c 65 2c 20 61 6e 64 20 | 77 69 6c 6c 20 69 6e 63 |le, and |will inc|
|000010c0| 6c 75 64 65 0d 0a 69 74 | 20 74 77 69 63 65 2c 20 |lude..it| twice, |
|000010d0| 72 65 73 75 6c 74 69 6e | 67 20 69 6e 20 63 6f 75 |resultin|g in cou|
|000010e0| 6e 74 6c 65 73 73 20 75 | 6e 6e 65 63 65 73 73 61 |ntless u|nnecessa|
|000010f0| 72 79 20 65 72 72 6f 72 | 73 2e 20 20 46 6f 72 20 |ry error|s. For |
|00001100| 74 68 69 73 20 72 65 61 | 73 6f 6e 2c 0d 0a 79 6f |this rea|son,..yo|
|00001110| 75 20 61 72 65 20 65 6e | 63 6f 75 72 61 67 65 64 |u are en|couraged|
|00001120| 20 74 6f 20 75 73 65 20 | 61 6e 67 6c 65 20 62 72 | to use |angle br|
|00001130| 61 63 6b 65 74 73 20 74 | 6f 20 73 70 65 63 69 66 |ackets t|o specif|
|00001140| 79 20 69 6e 63 6c 75 64 | 65 20 66 69 6c 65 73 2c |y includ|e files,|
|00001150| 20 72 61 74 68 65 72 0d | 0a 74 68 61 6e 20 75 73 | rather.|.than us|
|00001160| 69 6e 67 20 73 70 65 63 | 69 66 69 63 20 70 61 74 |ing spec|ific pat|
|00001170| 68 73 20 69 6e 20 79 6f | 75 72 20 73 6f 75 72 63 |hs in yo|ur sourc|
|00001180| 65 20 66 69 6c 65 2e 20 | 20 44 6f 69 6e 67 20 73 |e file. | Doing s|
|00001190| 6f 20 77 69 6c 6c 20 68 | 65 6c 70 20 65 6e 73 75 |o will h|elp ensu|
|000011a0| 72 65 20 74 68 61 74 0d | 0a 79 6f 75 72 20 73 6f |re that.|.your so|
|000011b0| 75 72 63 65 20 66 69 6c | 65 73 20 61 72 65 20 70 |urce fil|es are p|
|000011c0| 6f 72 74 61 62 6c 65 20 | 74 6f 20 64 69 66 66 65 |ortable |to diffe|
|000011d0| 72 65 6e 74 20 63 6f 6d | 70 75 74 65 72 73 2c 20 |rent com|puters, |
|000011e0| 61 73 20 77 65 6c 6c 2c | 20 73 69 6e 63 65 0d 0a |as well,| since..|
|000011f0| 65 61 63 68 20 6f 70 65 | 72 61 74 69 6e 67 20 73 |each ope|rating s|
|00001200| 79 73 74 65 6d 20 75 73 | 65 73 20 69 74 73 20 6f |ystem us|es its o|
|00001210| 77 6e 20 63 6f 6e 76 65 | 6e 74 69 6f 6e 73 20 66 |wn conve|ntions f|
|00001220| 6f 72 20 73 70 65 63 69 | 66 79 69 6e 67 20 66 69 |or speci|fying fi|
|00001230| 6c 65 20 70 61 74 68 73 | 2e 0d 0a 0d 0a 4e 6f 74 |le paths|.....Not|
|00001240| 65 20 74 68 61 74 20 74 | 68 65 20 69 6e 63 6c 75 |e that t|he inclu|
|00001250| 64 65 20 66 69 6c 65 73 | 20 74 68 61 74 20 6d 61 |de files| that ma|
|00001260| 6b 65 20 75 70 20 61 20 | 5e 7b 70 72 65 2d 63 6f |ke up a |^{pre-co|
|00001270| 6d 70 69 6c 65 64 7d 20 | 62 69 6e 61 72 79 20 66 |mpiled} |binary f|
|00001280| 69 6c 65 2c 20 6c 6f 61 | 64 65 64 0d 0a 77 69 74 |ile, loa|ded..wit|
|00001290| 68 20 74 68 65 20 63 6f | 6d 70 69 6c 65 72 27 73 |h the co|mpiler's|
|000012a0| 20 7b 5c 74 74 20 2d 6c | 7d 20 6f 70 74 69 6f 6e | {\tt -l|} option|
|000012b0| 2c 20 61 72 65 20 72 65 | 63 6f 72 64 65 64 20 69 |, are re|corded i|
|000012c0| 6e 20 74 68 65 20 62 69 | 6e 61 72 79 20 66 69 6c |n the bi|nary fil|
|000012d0| 65 2e 20 20 54 68 75 73 | 2c 0d 0a 74 68 65 72 65 |e. Thus|,..there|
|000012e0| 20 69 73 20 6e 6f 20 6e | 65 65 64 20 66 6f 72 20 | is no n|eed for |
|000012f0| 79 6f 75 20 74 6f 20 72 | 65 6d 6f 76 65 20 74 68 |you to r|emove th|
|00001300| 65 20 7b 5c 74 74 20 5c | 23 69 6e 63 6c 75 64 65 |e {\tt \|#include|
|00001310| 7d 20 64 69 72 65 63 74 | 69 76 65 20 69 6e 20 79 |} direct|ive in y|
|00001320| 6f 75 72 0d 0a 73 6f 75 | 72 63 65 20 66 69 6c 65 |our..sou|rce file|
|00001330| 20 6a 75 73 74 20 62 65 | 63 61 75 73 65 20 79 6f | just be|cause yo|
|00001340| 75 20 61 72 65 20 75 73 | 69 6e 67 20 74 68 65 20 |u are us|ing the |
|00001350| 70 72 65 2d 63 6f 6d 70 | 69 6c 65 64 20 76 65 72 |pre-comp|iled ver|
|00001360| 73 69 6f 6e 20 6f 66 20 | 74 68 61 74 0d 0a 69 6e |sion of |that..in|
|00001370| 63 6c 75 64 65 20 66 69 | 6c 65 2e 20 20 46 6f 72 |clude fi|le. For|
|00001380| 20 6d 6f 72 65 20 69 6e | 66 6f 72 6d 61 74 69 6f | more in|formatio|
|00001390| 6e 20 6f 6e 20 75 73 69 | 6e 67 20 70 72 65 2d 63 |n on usi|ng pre-c|
|000013a0| 6f 6d 70 69 6c 65 64 20 | 69 6e 63 6c 75 64 65 20 |ompiled |include |
|000013b0| 66 69 6c 65 73 2c 0d 0a | 73 65 65 20 74 68 65 20 |files,..|see the |
|000013c0| 73 65 63 74 69 6f 6e 20 | 6f 6e 20 75 73 69 6e 67 |section |on using|
|000013d0| 20 74 68 65 20 63 6f 6d | 70 69 6c 65 72 2e 0d 0a | the com|piler...|
|000013e0| 0d 0a 5c 6d 69 6e 6f 72 | 73 65 63 74 69 6f 6e 7b |..\minor|section{|
|000013f0| 43 6f 6d 6d 65 6e 74 73 | 7d 0d 0a 0d 0a 4f 75 74 |Comments|}....Out|
|00001400| 73 69 64 65 20 6f 66 20 | 61 20 71 75 6f 74 65 64 |side of |a quoted|
|00001410| 20 73 74 72 69 6e 67 2c | 20 74 77 6f 20 63 6f 6e | string,| two con|
|00001420| 73 65 63 75 74 69 76 65 | 20 73 6c 61 73 68 65 73 |secutive| slashes|
|00001430| 2c 20 7b 5c 74 74 20 5e | 7b 2f 2f 7d 7d 2c 0d 0a |, {\tt ^|{//}},..|
|00001440| 69 6e 64 69 63 61 74 65 | 20 74 68 61 74 20 74 68 |indicate| that th|
|00001450| 65 0d 0a 72 65 73 74 20 | 6f 66 20 74 68 65 20 6c |e..rest |of the l|
|00001460| 69 6e 65 20 69 73 20 61 | 20 63 6f 6d 6d 65 6e 74 |ine is a| comment|
|00001470| 2e 20 20 45 76 65 72 79 | 74 68 69 6e 67 20 75 70 |. Every|thing up|
|00001480| 20 74 6f 20 74 68 65 20 | 6e 65 78 74 20 6e 65 77 | to the |next new|
|00001490| 6c 69 6e 65 20 69 73 20 | 69 67 6e 6f 72 65 64 2e |line is |ignored.|
|000014a0| 0d 0a 0d 0a 41 6c 74 65 | 72 6e 61 74 69 76 65 6c |....Alte|rnativel|
|000014b0| 79 2c 20 43 2d 73 74 79 | 6c 65 20 5e 7b 63 6f 6d |y, C-sty|le ^{com|
|000014c0| 6d 65 6e 74 73 7d 20 63 | 61 6e 20 62 65 20 75 73 |ments} c|an be us|
|000014d0| 65 64 3b 20 74 68 65 73 | 65 0d 0a 73 74 61 72 74 |ed; thes|e..start|
|000014e0| 20 77 69 74 68 20 7b 5c | 74 74 20 5e 7b 2f 2a 7d | with {\|tt ^{/*}|
|000014f0| 7d 20 61 6e 64 20 65 6e | 64 20 77 69 74 68 20 7b |} and en|d with {|
|00001500| 5c 74 74 20 5e 7b 2a 2f | 7d 7d 3b 20 74 68 69 73 |\tt ^{*/|}}; this|
|00001510| 0d 0a 74 79 70 65 20 6f | 66 20 63 6f 6d 6d 65 6e |..type o|f commen|
|00001520| 74 20 63 61 6e 20 73 70 | 61 6e 20 6d 75 6c 74 69 |t can sp|an multi|
|00001530| 70 6c 65 20 6c 69 6e 65 | 73 2e 0d 0a 0d 0a 45 78 |ple line|s.....Ex|
|00001540| 61 6d 70 6c 65 73 3a 0d | 0a 0d 0a 7b 5c 65 78 61 |amples:.|...{\exa|
|00001550| 6d 70 6c 65 0d 0a 20 20 | 20 20 2f 2f 20 54 68 69 |mple.. | // Thi|
|00001560| 73 20 6c 69 6e 65 20 69 | 73 20 61 20 63 6f 6d 6d |s line i|s a comm|
|00001570| 65 6e 74 2e 0d 0a 0d 0a | 20 20 20 20 2f 2a 0d 0a |ent.....| /*..|
|00001580| 20 20 20 20 20 54 68 69 | 73 20 69 73 20 61 20 63 | Thi|s is a c|
|00001590| 6f 6d 6d 65 6e 74 0d 0a | 20 20 20 20 20 77 68 69 |omment..| whi|
|000015a0| 63 68 20 67 6f 65 73 20 | 61 63 72 6f 73 73 0d 0a |ch goes |across..|
|000015b0| 20 20 20 20 20 73 65 76 | 65 72 61 6c 20 6c 69 6e | sev|eral lin|
|000015c0| 65 73 2e 0d 0a 20 20 20 | 20 2a 2f 0d 0a 7d 0d 0a |es... | */..}..|
|000015d0| 0d 0a 5c 6d 61 6a 6f 72 | 73 65 63 74 69 6f 6e 7b |..\major|section{|
|000015e0| 49 64 65 6e 74 69 66 69 | 65 72 73 7d 0d 0a 0d 0a |Identifi|ers}....|
|000015f0| 0d 0a 5e 7b 49 64 65 6e | 74 69 66 69 65 72 73 7d |..^{Iden|tifiers}|
|00001600| 20 6d 75 73 74 20 73 74 | 61 72 74 20 77 69 74 68 | must st|art with|
|00001610| 20 61 20 6c 65 74 74 65 | 72 20 28 75 70 70 65 72 | a lette|r (upper|
|00001620| 20 6f 72 20 6c 6f 77 65 | 72 20 63 61 73 65 29 2c | or lowe|r case),|
|00001630| 20 61 6e 64 20 6d 61 79 | 20 63 6f 6e 74 61 69 6e | and may| contain|
|00001640| 0d 0a 6c 65 74 74 65 72 | 73 2c 20 6e 75 6d 62 65 |..letter|s, numbe|
|00001650| 72 73 2c 20 64 6f 6c 6c | 61 72 20 73 69 67 6e 73 |rs, doll|ar signs|
|00001660| 2c 20 61 6e 64 20 75 6e | 64 65 72 73 63 6f 72 65 |, and un|derscore|
|00001670| 73 2e 20 20 49 64 65 6e | 74 69 66 69 65 72 73 20 |s. Iden|tifiers |
|00001680| 63 61 6e 20 62 65 20 75 | 70 20 74 6f 20 33 39 0d |can be u|p to 39.|
|00001690| 0a 63 68 61 72 61 63 74 | 65 72 73 20 6c 6f 6e 67 |.charact|ers long|
|000016a0| 2e 20 20 55 70 70 65 72 | 20 61 6e 64 20 6c 6f 77 |. Upper| and low|
|000016b0| 65 72 20 63 61 73 65 20 | 6c 65 74 74 65 72 73 20 |er case |letters |
|000016c0| 61 72 65 20 64 69 73 74 | 69 6e 63 74 2e 0d 0a 0d |are dist|inct....|
|000016d0| 0a 5c 6d 69 6e 6f 72 73 | 65 63 74 69 6f 6e 7b 53 |.\minors|ection{S|
|000016e0| 63 6f 70 65 20 6f 66 20 | 49 64 65 6e 74 69 66 69 |cope of |Identifi|
|000016f0| 65 72 73 7d 0d 0a 0d 0a | 0d 0a 41 6c 6c 20 6f 62 |ers}....|..All ob|
|00001700| 6a 65 63 74 73 20 61 6e | 64 20 66 75 6e 63 74 69 |jects an|d functi|
|00001710| 6f 6e 73 20 61 72 65 20 | 6e 61 6d 65 64 20 62 79 |ons are |named by|
|00001720| 20 67 6c 6f 62 61 6c 20 | 69 64 65 6e 74 69 66 69 | global |identifi|
|00001730| 65 72 73 2e 20 20 4e 6f | 20 69 64 65 6e 74 69 66 |ers. No| identif|
|00001740| 69 65 72 0d 0a 6d 61 79 | 20 62 65 20 75 73 65 64 |ier..may| be used|
|00001750| 20 74 6f 20 69 64 65 6e | 74 69 66 79 20 64 69 66 | to iden|tify dif|
|00001760| 66 65 72 65 6e 74 20 74 | 68 69 6e 67 73 3b 20 74 |ferent t|hings; t|
|00001770| 68 61 74 20 69 73 2c 20 | 6e 6f 20 74 77 6f 20 6f |hat is, |no two o|
|00001780| 62 6a 65 63 74 73 20 63 | 61 6e 20 68 61 76 65 20 |bjects c|an have |
|00001790| 74 68 65 0d 0a 73 61 6d | 65 20 6e 61 6d 65 2c 20 |the..sam|e name, |
|000017a0| 61 6e 20 69 64 65 6e 74 | 69 66 69 65 72 20 6e 61 |an ident|ifier na|
|000017b0| 6d 69 6e 67 20 61 20 66 | 75 6e 63 74 69 6f 6e 20 |ming a f|unction |
|000017c0| 63 61 6e 27 74 20 61 6c | 73 6f 20 62 65 20 75 73 |can't al|so be us|
|000017d0| 65 64 20 66 6f 72 20 61 | 6e 20 6f 62 6a 65 63 74 |ed for a|n object|
|000017e0| 2c 0d 0a 61 6e 64 20 73 | 6f 20 66 6f 72 74 68 2e |,..and s|o forth.|
|000017f0| 0d 0a 0d 0a 50 72 6f 70 | 65 72 74 79 20 6e 61 6d |....Prop|erty nam|
|00001800| 65 73 20 61 72 65 20 61 | 6c 73 6f 20 67 6c 6f 62 |es are a|lso glob|
|00001810| 61 6c 20 69 64 65 6e 74 | 69 66 69 65 72 73 2e 20 |al ident|ifiers. |
|00001820| 20 41 20 6e 61 6d 65 20 | 75 73 65 64 20 66 6f 72 | A name |used for|
|00001830| 20 61 20 70 72 6f 70 65 | 72 74 79 0d 0a 63 61 6e | a prope|rty..can|
|00001840| 27 74 20 62 65 20 75 73 | 65 64 20 66 6f 72 20 61 |'t be us|ed for a|
|00001850| 20 66 75 6e 63 74 69 6f | 6e 20 6f 72 20 6f 62 6a | functio|n or obj|
|00001860| 65 63 74 2c 20 6f 72 20 | 76 69 63 65 20 76 65 72 |ect, or |vice ver|
|00001870| 73 61 2e 20 20 48 6f 77 | 65 76 65 72 2c 20 75 6e |sa. How|ever, un|
|00001880| 6c 69 6b 65 0d 0a 66 75 | 6e 63 74 69 6f 6e 73 20 |like..fu|nctions |
|00001890| 61 6e 64 20 6f 62 6a 65 | 63 74 73 2c 20 74 68 65 |and obje|cts, the|
|000018a0| 20 73 61 6d 65 20 70 72 | 6f 70 65 72 74 79 20 6e | same pr|operty n|
|000018b0| 61 6d 65 20 63 61 6e 20 | 62 65 20 75 73 65 64 20 |ame can |be used |
|000018c0| 69 6e 20 6d 61 6e 79 20 | 64 69 66 66 65 72 65 6e |in many |differen|
|000018d0| 74 0d 0a 6f 62 6a 65 63 | 74 73 2e 20 20 53 69 6e |t..objec|ts. Sin|
|000018e0| 63 65 20 61 20 70 72 6f | 70 65 72 74 79 20 6e 61 |ce a pro|perty na|
|000018f0| 6d 65 20 69 73 20 6e 65 | 76 65 72 20 75 73 65 64 |me is ne|ver used|
|00001900| 20 61 6c 6f 6e 65 2c 20 | 62 75 74 20 61 6c 77 61 | alone, |but alwa|
|00001910| 79 73 20 69 6e 0d 0a 63 | 6f 6e 6a 75 6e 63 74 69 |ys in..c|onjuncti|
|00001920| 6f 6e 20 77 69 74 68 20 | 61 6e 20 6f 62 6a 65 63 |on with |an objec|
|00001930| 74 2c 20 74 68 65 20 54 | 41 44 53 20 63 6f 6d 70 |t, the T|ADS comp|
|00001940| 69 6c 65 72 20 69 73 20 | 61 62 6c 65 20 74 6f 20 |iler is |able to |
|00001950| 64 65 74 65 72 6d 69 6e | 65 20 77 68 69 63 68 0d |determin|e which.|
|00001960| 0a 6f 62 6a 65 63 74 27 | 73 20 70 72 6f 70 65 72 |.object'|s proper|
|00001970| 74 79 20 69 73 20 62 65 | 69 6e 67 20 72 65 66 65 |ty is be|ing refe|
|00001980| 72 65 6e 63 65 64 20 65 | 76 65 6e 20 69 66 20 74 |renced e|ven if t|
|00001990| 68 65 20 73 61 6d 65 20 | 6e 61 6d 65 20 69 73 20 |he same |name is |
|000019a0| 75 73 65 64 20 69 6e 0d | 0a 6d 61 6e 79 20 6f 62 |used in.|.many ob|
|000019b0| 6a 65 63 74 73 2e 0d 0a | 0d 0a 46 75 6e 63 74 69 |jects...|..Functi|
|000019c0| 6f 6e 20 5e 7b 61 72 67 | 75 6d 65 6e 74 73 7d 20 |on ^{arg|uments} |
|000019d0| 61 6e 64 20 5e 7b 6c 6f | 63 61 6c 7d 0d 0a 76 61 |and ^{lo|cal}..va|
|000019e0| 72 69 61 62 6c 65 73 20 | 61 72 65 20 76 69 73 69 |riables |are visi|
|000019f0| 62 6c 65 20 6f 6e 6c 79 | 20 69 6e 20 74 68 65 20 |ble only| in the |
|00001a00| 66 75 6e 63 74 69 6f 6e | 20 69 6e 0d 0a 77 68 69 |function| in..whi|
|00001a10| 63 68 20 74 68 65 79 20 | 61 70 70 65 61 72 2e 20 |ch they |appear. |
|00001a20| 20 49 74 20 69 73 20 70 | 65 72 6d 69 73 73 69 62 | It is p|ermissib|
|00001a30| 6c 65 20 74 6f 20 72 65 | 2d 75 73 65 20 61 20 67 |le to re|-use a g|
|00001a40| 6c 6f 62 61 6c 20 69 64 | 65 6e 74 69 66 69 65 72 |lobal id|entifier|
|00001a50| 20 61 73 20 61 0d 0a 66 | 75 6e 63 74 69 6f 6e 20 | as a..f|unction |
|00001a60| 61 72 67 75 6d 65 6e 74 | 20 6f 72 20 6c 6f 63 61 |argument| or loca|
|00001a70| 6c 20 76 61 72 69 61 62 | 6c 65 2c 20 69 6e 20 77 |l variab|le, in w|
|00001a80| 68 69 63 68 20 63 61 73 | 65 20 74 68 65 20 76 61 |hich cas|e the va|
|00001a90| 72 69 61 62 6c 65 20 73 | 75 70 65 72 73 65 64 65 |riable s|upersede|
|00001aa0| 73 0d 0a 74 68 65 20 67 | 6c 6f 62 61 6c 20 6d 65 |s..the g|lobal me|
|00001ab0| 61 6e 69 6e 67 20 77 69 | 74 68 69 6e 20 74 68 65 |aning wi|thin the|
|00001ac0| 20 66 75 6e 63 74 69 6f | 6e 2e 20 20 48 6f 77 65 | functio|n. Howe|
|00001ad0| 76 65 72 2c 20 74 68 69 | 73 20 69 73 20 64 69 73 |ver, thi|s is dis|
|00001ae0| 63 6f 75 72 61 67 65 64 | 2c 20 61 73 20 69 74 0d |couraged|, as it.|
|00001af0| 0a 63 61 6e 20 62 65 20 | 61 20 62 69 74 20 63 6f |.can be |a bit co|
|00001b00| 6e 66 75 73 69 6e 67 2e | 0d 0a 0d 0a 5c 6d 61 6a |nfusing.|....\maj|
|00001b10| 6f 72 73 65 63 74 69 6f | 6e 7b 4f 62 6a 65 63 74 |orsectio|n{Object|
|00001b20| 20 44 65 66 69 6e 69 74 | 69 6f 6e 73 7d 0d 0a 0d | Definit|ions}...|
|00001b30| 0a 0d 0a 41 20 62 61 73 | 69 63 20 5e 7b 6f 62 6a |...A bas|ic ^{obj|
|00001b40| 65 63 74 7d 20 64 65 66 | 69 6e 69 74 69 6f 6e 20 |ect} def|inition |
|00001b50| 68 61 73 20 74 68 65 20 | 66 6f 72 6d 3a 0d 0a 0d |has the |form:...|
|00001b60| 0a 7b 5c 65 78 61 6d 70 | 6c 65 0d 0a 20 20 20 20 |.{\examp|le.. |
|00001b70| 7b 5c 69 74 20 69 64 65 | 6e 74 69 66 65 72 7d 3a |{\it ide|ntifer}:|
|00001b80| 20 20 6f 62 6a 65 63 74 | 20 7b 5c 69 74 20 5b 70 | object| {\it [p|
|00001b90| 72 6f 70 65 72 74 79 2d | 6c 69 73 74 5d 7d 20 3b |roperty-|list]} ;|
|00001ba0| 0d 0a 7d 0d 0a 0d 0a 54 | 68 69 73 20 64 65 66 69 |..}....T|his defi|
|00001bb0| 6e 65 73 20 61 6e 20 6f | 62 6a 65 63 74 20 77 68 |nes an o|bject wh|
|00001bc0| 69 63 68 20 68 61 73 20 | 6e 6f 20 73 75 70 65 72 |ich has |no super|
|00001bd0| 63 6c 61 73 73 2e 20 20 | 41 6e 20 6f 62 6a 65 63 |class. |An objec|
|00001be0| 74 20 63 61 6e 20 62 65 | 20 64 65 66 69 6e 65 64 |t can be| defined|
|00001bf0| 0d 0a 61 73 20 68 61 76 | 69 6e 67 20 61 20 73 75 |..as hav|ing a su|
|00001c00| 70 65 72 63 6c 61 73 73 | 20 77 69 74 68 20 74 68 |perclass| with th|
|00001c10| 65 20 61 6c 74 65 72 6e | 61 74 69 76 65 20 66 6f |e altern|ative fo|
|00001c20| 72 6d 20 6f 66 20 6f 62 | 6a 65 63 74 20 64 65 66 |rm of ob|ject def|
|00001c30| 69 6e 69 74 69 6f 6e 3a | 0d 0a 0d 0a 7b 5c 65 78 |inition:|....{\ex|
|00001c40| 61 6d 70 6c 65 0d 0a 20 | 20 20 20 7b 5c 69 74 20 |ample.. | {\it |
|00001c50| 69 64 65 6e 74 69 66 69 | 65 72 7d 3a 20 20 7b 5c |identifi|er}: {\|
|00001c60| 69 74 20 63 6c 61 73 73 | 2d 6e 61 6d 65 20 5b 7d |it class|-name [}|
|00001c70| 2c 20 7b 5c 69 74 20 63 | 6c 61 73 73 2d 6e 61 6d |, {\it c|lass-nam|
|00001c80| 65 20 5b 24 5c 6c 64 6f | 74 73 24 5d 5d 7d 20 20 |e [$\ldo|ts$]]} |
|00001c90| 25 0d 0a 20 20 20 20 20 | 20 7b 5c 69 74 20 5b 70 |%.. | {\it [p|
|00001ca0| 72 6f 70 65 72 74 79 2d | 6c 69 73 74 5d 7d 20 3b |roperty-|list]} ;|
|00001cb0| 0d 0a 7d 0d 0a 0d 0a 48 | 65 72 65 2c 20 74 68 65 |..}....H|ere, the|
|00001cc0| 20 7b 5c 69 74 20 63 6c | 61 73 73 2d 6e 61 6d 65 | {\it cl|ass-name|
|00001cd0| 7d 0d 0a 69 73 20 61 6e | 20 69 64 65 6e 74 69 66 |}..is an| identif|
|00001ce0| 69 65 72 20 77 68 69 63 | 68 20 69 73 20 64 65 66 |ier whic|h is def|
|00001cf0| 69 6e 65 64 20 65 6c 73 | 65 77 68 65 72 65 20 69 |ined els|ewhere i|
|00001d00| 6e 20 74 68 65 20 70 72 | 6f 67 72 61 6d 0d 0a 61 |n the pr|ogram..a|
|00001d10| 73 20 61 6e 20 6f 62 6a | 65 63 74 20 6f 72 20 5e |s an obj|ect or ^|
|00001d20| 7b 63 6c 61 73 73 7d 20 | 28 65 69 74 68 65 72 20 |{class} |(either |
|00001d30| 77 69 74 68 20 6f 72 20 | 77 69 74 68 6f 75 74 20 |with or |without |
|00001d40| 61 20 5e 7b 73 75 70 65 | 72 63 6c 61 73 73 7d 29 |a ^{supe|rclass})|
|00001d50| 2c 0d 0a 61 6e 64 20 69 | 73 20 74 68 65 20 6e 65 |,..and i|s the ne|
|00001d60| 77 20 6f 62 6a 65 63 74 | 27 73 0d 0a 73 75 70 65 |w object|'s..supe|
|00001d70| 72 63 6c 61 73 73 3b 20 | 69 66 20 6d 6f 72 65 20 |rclass; |if more |
|00001d80| 74 68 61 6e 20 6f 6e 65 | 20 73 75 70 65 72 63 6c |than one| supercl|
|00001d90| 61 73 73 20 69 73 20 70 | 72 65 73 65 6e 74 2c 20 |ass is p|resent, |
|00001da0| 61 20 63 6f 6d 6d 61 20 | 73 65 70 61 72 61 74 65 |a comma |separate|
|00001db0| 73 0d 0a 65 61 63 68 20 | 73 75 70 65 72 63 6c 61 |s..each |supercla|
|00001dc0| 73 73 20 69 6e 20 74 68 | 65 20 6c 69 73 74 2e 20 |ss in th|e list. |
|00001dd0| 20 54 68 65 20 6e 65 77 | 20 6f 62 6a 65 63 74 20 | The new| object |
|00001de0| 6e 61 6d 65 64 20 62 79 | 20 7b 5c 69 74 20 69 64 |named by| {\it id|
|00001df0| 65 6e 74 69 66 69 65 72 | 7d 0d 0a 69 6e 68 65 72 |entifier|}..inher|
|00001e00| 69 74 73 20 61 6c 6c 20 | 74 68 65 20 5e 7b 70 72 |its all |the ^{pr|
|00001e10| 6f 70 65 72 74 69 65 73 | 7d 0d 0a 6f 66 20 74 68 |operties|}..of th|
|00001e20| 65 20 73 75 70 65 72 63 | 6c 61 73 73 20 6f 72 20 |e superc|lass or |
|00001e30| 73 75 70 65 72 63 6c 61 | 73 73 65 73 2e 20 0d 0a |supercla|sses. ..|
|00001e40| 49 66 20 61 20 70 72 6f | 70 65 72 74 79 20 69 6e |If a pro|perty in|
|00001e50| 20 74 68 65 20 6f 70 74 | 69 6f 6e 61 6c 20 7b 5c | the opt|ional {\|
|00001e60| 69 74 20 70 72 6f 70 65 | 72 74 79 2d 6c 69 73 74 |it prope|rty-list|
|00001e70| 7d 0d 0a 69 73 20 61 6c | 73 6f 20 69 6e 20 74 68 |}..is al|so in th|
|00001e80| 65 0d 0a 70 72 6f 70 65 | 72 74 79 20 6c 69 73 74 |e..prope|rty list|
|00001e90| 20 6f 66 20 74 68 65 20 | 73 75 70 65 72 63 6c 61 | of the |supercla|
|00001ea0| 73 73 20 28 6f 72 20 69 | 74 73 20 73 75 70 65 72 |ss (or i|ts super|
|00001eb0| 63 6c 61 73 73 2c 20 61 | 6e 64 20 73 6f 20 66 6f |class, a|nd so fo|
|00001ec0| 72 74 68 29 2c 20 74 68 | 65 0d 0a 6e 65 77 20 70 |rth), th|e..new p|
|00001ed0| 72 6f 70 65 72 74 79 20 | 6f 76 65 72 72 69 64 65 |roperty |override|
|00001ee0| 73 20 74 68 65 20 69 6e | 68 65 72 69 74 65 64 20 |s the in|herited |
|00001ef0| 6f 6e 65 2e 0d 0a 0d 0a | 49 66 20 61 20 70 72 6f |one.....|If a pro|
|00001f00| 70 65 72 74 79 20 69 73 | 20 5e 7b 69 6e 68 65 72 |perty is| ^{inher|
|00001f10| 69 74 65 64 7d 20 66 72 | 6f 6d 20 6d 6f 72 65 20 |ited} fr|om more |
|00001f20| 74 68 61 6e 20 6f 6e 65 | 20 6f 66 20 69 74 73 20 |than one| of its |
|00001f30| 73 75 70 65 72 63 6c 61 | 73 73 65 73 20 28 61 6e |supercla|sses (an|
|00001f40| 64 20 69 73 0d 0a 6e 6f | 74 20 5e 7b 6f 76 65 72 |d is..no|t ^{over|
|00001f50| 72 69 64 64 65 6e 7d 20 | 69 6e 20 74 68 65 20 6f |ridden} |in the o|
|00001f60| 62 6a 65 63 74 27 73 20 | 6f 77 6e 20 70 72 6f 70 |bject's |own prop|
|00001f70| 65 72 74 79 20 6c 69 73 | 74 29 2c 0d 0a 74 68 65 |erty lis|t),..the|
|00001f80| 20 70 72 6f 70 65 72 74 | 79 20 69 73 20 69 6e 68 | propert|y is inh|
|00001f90| 65 72 69 74 65 64 20 66 | 72 6f 6d 20 74 68 65 0d |erited f|rom the.|
|00001fa0| 0a 73 75 70 65 72 63 6c | 61 73 73 20 74 68 61 74 |.supercl|ass that|
|00001fb0| 20 61 70 70 65 61 72 73 | 20 65 61 72 6c 69 65 73 | appears| earlies|
|00001fc0| 74 20 69 6e 20 74 68 65 | 20 6c 69 73 74 2e 20 20 |t in the| list. |
|00001fd0| 46 6f 72 20 65 78 61 6d | 70 6c 65 2c 20 73 75 70 |For exam|ple, sup|
|00001fe0| 70 6f 73 65 20 79 6f 75 | 0d 0a 64 65 66 69 6e 65 |pose you|..define|
|00001ff0| 20 61 6e 20 6f 62 6a 65 | 63 74 20 6c 69 6b 65 20 | an obje|ct like |
|00002000| 74 68 69 73 3a 0d 0a 0d | 0a 7b 5c 65 78 61 6d 70 |this:...|.{\examp|
|00002010| 6c 65 0d 0a 20 20 20 20 | 5c 6f 62 6a 65 63 74 7b |le.. |\object{|
|00002020| 76 61 73 65 3a 20 63 6f | 6e 74 61 69 6e 65 72 2c |vase: co|ntainer,|
|00002030| 20 66 69 78 65 64 69 74 | 65 6d 7d 0d 0a 20 20 20 | fixedit|em}.. |
|00002040| 20 5c 65 6e 64 6f 62 6a | 20 20 20 20 0d 0a 7d 0d | \endobj| ..}.|
|00002050| 0a 0d 0a 49 66 20 62 6f | 74 68 20 7b 5c 74 74 20 |...If bo|th {\tt |
|00002060| 63 6f 6e 74 61 69 6e 65 | 72 7d 20 61 6e 64 20 7b |containe|r} and {|
|00002070| 5c 74 74 20 66 69 78 65 | 64 69 74 65 6d 7d 20 64 |\tt fixe|ditem} d|
|00002080| 65 66 69 6e 65 20 61 20 | 5e 7b 6d 65 74 68 6f 64 |efine a |^{method|
|00002090| 7d 20 6e 61 6d 65 64 20 | 7b 5c 74 74 0d 0a 6d 31 |} named |{\tt..m1|
|000020a0| 7d 2c 20 61 6e 64 20 7b | 5c 74 74 20 76 61 73 65 |}, and {|\tt vase|
|000020b0| 7d 20 69 74 73 65 6c 66 | 20 64 6f 65 73 6e 27 74 |} itself| doesn't|
|000020c0| 20 64 65 66 69 6e 65 20 | 61 6e 20 7b 5c 74 74 20 | define |an {\tt |
|000020d0| 6d 31 7d 20 6d 65 74 68 | 6f 64 2c 20 74 68 65 6e |m1} meth|od, then|
|000020e0| 20 7b 5c 74 74 20 6d 31 | 7d 0d 0a 69 73 20 69 6e | {\tt m1|}..is in|
|000020f0| 68 65 72 69 74 65 64 20 | 66 72 6f 6d 20 7b 5c 74 |herited |from {\t|
|00002100| 74 20 63 6f 6e 74 61 69 | 6e 65 72 7d 2c 20 62 65 |t contai|ner}, be|
|00002110| 63 61 75 73 65 20 69 74 | 20 61 70 70 65 61 72 73 |cause it| appears|
|00002120| 20 65 61 72 6c 69 65 72 | 20 69 6e 20 74 68 65 0d | earlier| in the.|
|00002130| 0a 73 75 70 65 72 63 6c | 61 73 73 20 6c 69 73 74 |.supercl|ass list|
|00002140| 20 74 68 61 6e 20 7b 5c | 74 74 20 66 69 78 65 64 | than {\|tt fixed|
|00002150| 69 74 65 6d 7d 2e 0d 0a | 0d 0a 54 68 65 72 65 20 |item}...|..There |
|00002160| 69 73 20 61 20 6d 6f 72 | 65 20 63 6f 6d 70 6c 69 |is a mor|e compli|
|00002170| 63 61 74 65 64 20 63 61 | 73 65 20 74 68 61 74 20 |cated ca|se that |
|00002180| 63 61 6e 20 6f 63 63 75 | 72 2c 20 62 75 74 20 69 |can occu|r, but i|
|00002190| 74 20 69 73 20 76 65 72 | 79 20 75 6e 75 73 75 61 |t is ver|y unusua|
|000021a0| 6c 2e 0d 0a 59 6f 75 20 | 77 69 6c 6c 20 70 72 6f |l...You |will pro|
|000021b0| 62 61 62 6c 79 20 6e 65 | 76 65 72 20 65 6e 63 6f |bably ne|ver enco|
|000021c0| 75 6e 74 65 72 20 74 68 | 69 73 2c 20 73 6f 20 73 |unter th|is, so s|
|000021d0| 6b 69 70 20 74 68 69 73 | 20 73 65 63 74 69 6f 6e |kip this| section|
|000021e0| 20 69 66 20 79 6f 75 0d | 0a 66 69 6e 64 20 69 74 | if you.|.find it|
|000021f0| 20 63 6f 6e 66 75 73 69 | 6e 67 2e 20 20 53 75 70 | confusi|ng. Sup|
|00002200| 70 6f 73 65 20 74 68 61 | 74 20 69 6e 20 74 68 65 |pose tha|t in the|
|00002210| 20 65 78 61 6d 70 6c 65 | 20 61 62 6f 76 65 2c 20 | example| above, |
|00002220| 62 6f 74 68 20 7b 5c 74 | 74 20 63 6f 6e 74 61 69 |both {\t|t contai|
|00002230| 6e 65 72 7d 0d 0a 61 6e | 64 20 7b 5c 74 74 20 66 |ner}..an|d {\tt f|
|00002240| 69 78 65 64 69 74 65 6d | 7d 20 68 61 76 65 20 74 |ixeditem|} have t|
|00002250| 68 65 20 73 75 70 65 72 | 63 6c 61 73 73 20 7b 5c |he super|class {\|
|00002260| 74 74 20 69 74 65 6d 7d | 2c 20 61 6e 64 20 74 68 |tt item}|, and th|
|00002270| 61 74 20 7b 5c 74 74 20 | 69 74 65 6d 7d 0d 0a 61 |at {\tt |item}..a|
|00002280| 6e 64 20 7b 5c 74 74 20 | 66 69 78 65 64 69 74 65 |nd {\tt |fixedite|
|00002290| 6d 7d 20 64 65 66 69 6e | 65 20 6d 65 74 68 6f 64 |m} defin|e method|
|000022a0| 20 7b 5c 74 74 20 6d 32 | 7d 2c 20 61 6e 64 20 74 | {\tt m2|}, and t|
|000022b0| 68 61 74 20 6e 65 69 74 | 68 65 72 20 7b 5c 74 74 |hat neit|her {\tt|
|000022c0| 20 63 6f 6e 74 61 69 6e | 65 72 7d 0d 0a 6e 6f 72 | contain|er}..nor|
|000022d0| 20 7b 5c 74 74 20 76 61 | 73 65 7d 20 64 65 66 69 | {\tt va|se} defi|
|000022e0| 6e 65 20 7b 5c 74 74 20 | 6d 32 7d 2e 20 20 4e 6f |ne {\tt |m2}. No|
|000022f0| 77 2c 20 73 69 6e 63 65 | 20 7b 5c 74 74 20 63 6f |w, since| {\tt co|
|00002300| 6e 74 61 69 6e 65 72 7d | 20 69 6e 68 65 72 69 74 |ntainer}| inherit|
|00002310| 73 20 7b 5c 74 74 20 6d | 32 7d 0d 0a 66 72 6f 6d |s {\tt m|2}..from|
|00002320| 20 7b 5c 74 74 20 69 74 | 65 6d 7d 2c 20 69 74 20 | {\tt it|em}, it |
|00002330| 6d 69 67 68 74 20 73 65 | 65 6d 20 74 68 61 74 20 |might se|em that |
|00002340| 7b 5c 74 74 20 76 61 73 | 65 7d 20 73 68 6f 75 6c |{\tt vas|e} shoul|
|00002350| 64 20 69 6e 68 65 72 69 | 74 20 7b 5c 74 74 20 6d |d inheri|t {\tt m|
|00002360| 32 7d 20 66 72 6f 6d 0d | 0a 7b 5c 74 74 20 63 6f |2} from.|.{\tt co|
|00002370| 6e 74 61 69 6e 65 72 7d | 20 61 6e 64 20 74 68 75 |ntainer}| and thu|
|00002380| 73 20 66 72 6f 6d 20 7b | 5c 74 74 20 69 74 65 6d |s from {|\tt item|
|00002390| 7d 2e 20 20 48 6f 77 65 | 76 65 72 2c 20 74 68 69 |}. Howe|ver, thi|
|000023a0| 73 20 69 73 20 6e 6f 74 | 20 74 68 65 20 63 61 73 |s is not| the cas|
|000023b0| 65 3b 0d 0a 73 69 6e 63 | 65 20 74 68 65 20 7b 5c |e;..sinc|e the {\|
|000023c0| 74 74 20 6d 32 7d 20 64 | 65 66 69 6e 65 64 20 69 |tt m2} d|efined i|
|000023d0| 6e 20 7b 5c 74 74 20 66 | 69 78 65 64 69 74 65 6d |n {\tt f|ixeditem|
|000023e0| 7d 20 6f 76 65 72 72 69 | 64 65 73 20 74 68 65 20 |} overri|des the |
|000023f0| 6f 6e 65 20 64 65 66 69 | 6e 65 64 20 69 6e 0d 0a |one defi|ned in..|
|00002400| 7b 5c 74 74 20 69 74 65 | 6d 7d 2c 20 7b 5c 74 74 |{\tt ite|m}, {\tt|
|00002410| 20 76 61 73 65 7d 20 69 | 6e 68 65 72 69 74 73 20 | vase} i|nherits |
|00002420| 74 68 65 20 7b 5c 74 74 | 20 6d 32 7d 20 66 72 6f |the {\tt| m2} fro|
|00002430| 6d 20 7b 5c 74 74 20 66 | 69 78 65 64 69 74 65 6d |m {\tt f|ixeditem|
|00002440| 7d 20 72 61 74 68 65 72 | 20 74 68 61 6e 0d 0a 74 |} rather| than..t|
|00002450| 68 65 20 6f 6e 65 20 66 | 72 6f 6d 20 7b 5c 74 74 |he one f|rom {\tt|
|00002460| 20 69 74 65 6d 7d 2e 20 | 20 48 65 6e 63 65 2c 20 | item}. | Hence, |
|00002470| 74 68 65 20 72 75 6c 65 | 2c 20 66 75 6c 6c 79 20 |the rule|, fully |
|00002480| 73 74 61 74 65 64 2c 20 | 69 73 3a 20 20 74 68 65 |stated, |is: the|
|00002490| 20 69 6e 68 65 72 69 74 | 65 64 0d 0a 70 72 6f 70 | inherit|ed..prop|
|000024a0| 65 72 74 79 20 69 6e 20 | 74 68 65 20 63 61 73 65 |erty in |the case|
|000024b0| 20 6f 66 20 6d 75 6c 74 | 69 70 6c 65 20 69 6e 68 | of mult|iple inh|
|000024c0| 65 72 69 74 61 6e 63 65 | 20 69 73 20 74 68 61 74 |eritance| is that|
|000024d0| 20 70 72 6f 70 65 72 74 | 79 20 6f 66 20 74 68 65 | propert|y of the|
|000024e0| 20 65 61 72 6c 69 65 73 | 74 0d 0a 28 6c 65 66 74 | earlies|t..(left|
|000024f0| 6d 6f 73 74 29 20 73 75 | 70 65 72 63 6c 61 73 73 |most) su|perclass|
|00002500| 20 69 6e 20 74 68 65 20 | 6f 62 6a 65 63 74 27 73 | in the |object's|
|00002510| 20 73 75 70 65 72 63 6c | 61 73 73 20 6c 69 73 74 | supercl|ass list|
|00002520| 20 74 68 61 74 20 69 73 | 20 6e 6f 74 20 6f 76 65 | that is| not ove|
|00002530| 72 72 69 64 64 65 6e 0d | 0a 62 79 20 61 20 73 75 |rridden.|.by a su|
|00002540| 62 73 65 71 75 65 6e 74 | 20 73 75 70 65 72 63 6c |bsequent| supercl|
|00002550| 61 73 73 2e 0d 0a 0d 0a | 5c 6d 69 6e 6f 72 73 65 |ass.....|\minorse|
|00002560| 63 74 69 6f 6e 7b 50 72 | 6f 70 65 72 74 79 20 4c |ction{Pr|operty L|
|00002570| 69 73 74 73 7d 0d 0a 0d | 0a 0d 0a 41 20 70 72 6f |ists}...|...A pro|
|00002580| 70 65 72 74 79 20 6c 69 | 73 74 20 74 61 6b 65 73 |perty li|st takes|
|00002590| 20 6f 6e 20 74 68 69 73 | 20 66 6f 72 6d 3a 0d 0a | on this| form:..|
|000025a0| 0d 0a 7b 5c 65 78 61 6d | 70 6c 65 0d 0a 20 20 20 |..{\exam|ple.. |
|000025b0| 20 7b 5c 69 74 20 70 72 | 6f 70 65 72 74 79 2d 64 | {\it pr|operty-d|
|000025c0| 65 66 69 6e 69 74 69 6f | 6e 7d 20 7b 5c 69 74 20 |efinitio|n} {\it |
|000025d0| 5b 70 72 6f 70 65 72 74 | 79 2d 6c 69 73 74 5d 7d |[propert|y-list]}|
|000025e0| 0d 0a 7d 0d 0a 0d 0a 28 | 54 68 69 73 20 69 73 20 |..}....(|This is |
|000025f0| 61 20 66 6f 72 6d 61 6c | 20 77 61 79 20 6f 66 20 |a formal| way of |
|00002600| 73 61 79 69 6e 67 20 74 | 68 61 74 20 79 6f 75 20 |saying t|hat you |
|00002610| 63 61 6e 20 73 74 72 69 | 6e 67 20 74 6f 67 65 74 |can stri|ng toget|
|00002620| 68 65 72 20 61 6e 79 20 | 6e 75 6d 62 65 72 20 6f |her any |number o|
|00002630| 66 0d 0a 70 72 6f 70 65 | 72 74 79 20 64 65 66 69 |f..prope|rty defi|
|00002640| 6e 69 74 69 6f 6e 73 20 | 69 6e 20 61 20 70 72 6f |nitions |in a pro|
|00002650| 70 65 72 74 79 20 6c 69 | 73 74 2c 20 6f 6e 65 20 |perty li|st, one |
|00002660| 61 66 74 65 72 20 74 68 | 65 20 6f 74 68 65 72 2e |after th|e other.|
|00002670| 29 20 20 41 20 70 72 6f | 70 65 72 74 79 0d 0a 64 |) A pro|perty..d|
|00002680| 65 66 69 6e 69 74 69 6f | 6e 20 6c 6f 6f 6b 73 20 |efinitio|n looks |
|00002690| 6c 69 6b 65 20 74 68 69 | 73 3a 0d 0a 0d 0a 7b 5c |like thi|s:....{\|
|000026a0| 65 78 61 6d 70 6c 65 0d | 0a 20 20 20 20 7b 5c 69 |example.|. {\i|
|000026b0| 74 20 69 64 65 6e 74 69 | 66 69 65 72 7d 20 3d 20 |t identi|fier} = |
|000026c0| 7b 5c 69 74 20 64 61 74 | 61 2d 69 74 65 6d 7d 0d |{\it dat|a-item}.|
|000026d0| 0a 7d 0d 0a 0d 0a 4e 6f | 74 65 20 74 68 61 74 20 |.}....No|te that |
|000026e0| 6e 6f 20 5e 7b 73 65 6d | 69 63 6f 6c 6f 6e 7d 20 |no ^{sem|icolon} |
|000026f0| 63 6f 6d 65 73 20 61 66 | 74 65 72 20 74 68 65 20 |comes af|ter the |
|00002700| 70 72 6f 70 65 72 74 79 | 20 64 65 66 69 6e 69 74 |property| definit|
|00002710| 69 6f 6e 2e 20 41 20 73 | 65 6d 69 63 6f 6c 6f 6e |ion. A s|emicolon|
|00002720| 0d 0a 74 65 72 6d 69 6e | 61 74 65 73 20 74 68 65 |..termin|ates the|
|00002730| 20 65 6e 74 69 72 65 20 | 6f 62 6a 65 63 74 20 64 | entire |object d|
|00002740| 65 66 69 6e 69 74 69 6f | 6e 2c 20 6e 6f 74 20 69 |efinitio|n, not i|
|00002750| 6e 64 69 76 69 64 75 61 | 6c 20 70 72 6f 70 65 72 |ndividua|l proper|
|00002760| 74 79 20 64 65 66 69 6e | 69 74 69 6f 6e 73 2e 0d |ty defin|itions..|
|00002770| 0a 0d 0a 5c 6d 69 6e 6f | 72 73 65 63 74 69 6f 6e |...\mino|rsection|
|00002780| 7b 50 72 6f 70 65 72 74 | 79 20 44 61 74 61 20 49 |{Propert|y Data I|
|00002790| 74 65 6d 73 7d 0d 0a 0d | 0a 0d 0a 0d 0a 41 20 64 |tems}...|.....A d|
|000027a0| 61 74 61 20 69 74 65 6d | 20 63 61 6e 20 62 65 20 |ata item| can be |
|000027b0| 61 20 6e 75 6d 62 65 72 | 2c 20 61 20 64 6f 75 62 |a number|, a doub|
|000027c0| 6c 65 2d 71 75 6f 74 65 | 64 20 73 74 72 69 6e 67 |le-quote|d string|
|000027d0| 2c 20 61 20 73 69 6e 67 | 6c 65 2d 71 75 6f 74 65 |, a sing|le-quote|
|000027e0| 64 20 73 74 72 69 6e 67 | 2c 0d 0a 61 20 6c 69 73 |d string|,..a lis|
|000027f0| 74 2c 20 61 6e 20 6f 62 | 6a 65 63 74 2c 20 7b 5c |t, an ob|ject, {\|
|00002800| 74 74 20 6e 69 6c 7d 2c | 20 6f 72 20 7b 5c 74 74 |tt nil},| or {\tt|
|00002810| 20 74 72 75 65 7d 2e 0d | 0a 0d 0a 5c 6d 69 6e 6f | true}..|...\mino|
|00002820| 72 73 65 63 74 69 6f 6e | 7b 4e 75 6d 62 65 72 73 |rsection|{Numbers|
|00002830| 7d 0d 0a 0d 0a 0d 0a 41 | 20 5e 7b 6e 75 6d 62 65 |}......A| ^{numbe|
|00002840| 72 7d 20 69 73 20 6a 75 | 73 74 20 61 20 73 74 72 |r} is ju|st a str|
|00002850| 69 6e 67 20 6f 66 20 64 | 69 67 69 74 73 2e 20 20 |ing of d|igits. |
|00002860| 54 68 65 20 64 65 66 61 | 75 6c 74 20 62 61 73 65 |The defa|ult base|
|00002870| 20 69 73 20 64 65 63 69 | 6d 61 6c 3b 20 79 6f 75 | is deci|mal; you|
|00002880| 20 63 61 6e 0d 0a 61 6c | 73 6f 20 65 6e 74 65 72 | can..al|so enter|
|00002890| 20 5e 7b 6f 63 74 61 6c | 7d 20 61 6e 64 20 5e 7b | ^{octal|} and ^{|
|000028a0| 68 65 78 61 64 65 63 69 | 6d 61 6c 7d 0d 0a 6e 75 |hexadeci|mal}..nu|
|000028b0| 6d 62 65 72 73 2e 20 20 | 41 6e 20 6f 63 74 61 6c |mbers. |An octal|
|000028c0| 20 6e 75 6d 62 65 72 20 | 73 69 6d 70 6c 79 20 73 | number |simply s|
|000028d0| 74 61 72 74 73 20 77 69 | 74 68 0d 0a 61 20 6c 65 |tarts wi|th..a le|
|000028e0| 61 64 69 6e 67 20 7a 65 | 72 6f 2c 20 73 6f 20 7b |ading ze|ro, so {|
|000028f0| 5c 74 74 20 30 33 35 7d | 0d 0a 69 73 20 61 6e 20 |\tt 035}|..is an |
|00002900| 6f 63 74 61 6c 20 6e 75 | 6d 62 65 72 20 68 61 76 |octal nu|mber hav|
|00002910| 69 6e 67 20 74 68 65 20 | 64 65 63 69 6d 61 6c 20 |ing the |decimal |
|00002920| 76 61 6c 75 65 20 32 39 | 2e 20 20 41 0d 0a 68 65 |value 29|. A..he|
|00002930| 78 61 64 65 63 69 6d 61 | 6c 20 6e 75 6d 62 65 72 |xadecima|l number|
|00002940| 20 73 74 61 72 74 73 20 | 77 69 74 68 20 7b 5c 74 | starts |with {\t|
|00002950| 74 20 30 78 7d 2c 20 61 | 73 20 69 6e 20 7b 5c 74 |t 0x}, a|s in {\t|
|00002960| 74 20 30 78 33 61 39 7d | 2e 0d 0a 0d 0a 4e 75 6d |t 0x3a9}|.....Num|
|00002970| 62 65 72 73 20 63 61 6e | 20 76 61 72 79 20 66 72 |bers can| vary fr|
|00002980| 6f 6d 20 2d 32 31 34 37 | 34 38 33 36 34 37 20 74 |om -2147|483647 t|
|00002990| 6f 20 32 31 34 37 34 38 | 33 36 34 37 20 28 64 65 |o 214748|3647 (de|
|000029a0| 63 69 6d 61 6c 29 2c 20 | 69 6e 63 6c 75 73 69 76 |cimal), |inclusiv|
|000029b0| 65 2e 0d 0a 4f 6e 6c 79 | 20 69 6e 74 65 67 65 72 |e...Only| integer|
|000029c0| 73 20 61 72 65 20 61 6c | 6c 6f 77 65 64 3b 20 6e |s are al|lowed; n|
|000029d0| 75 6d 62 65 72 73 20 63 | 61 6e 6e 6f 74 20 68 61 |umbers c|annot ha|
|000029e0| 76 65 20 61 20 64 65 63 | 69 6d 61 6c 20 70 6f 69 |ve a dec|imal poi|
|000029f0| 6e 74 20 6f 72 20 61 0d | 0a 66 72 61 63 74 69 6f |nt or a.|.fractio|
|00002a00| 6e 61 6c 20 70 61 72 74 | 2e 0d 0a 0d 0a 5c 6d 69 |nal part|.....\mi|
|00002a10| 6e 6f 72 73 65 63 74 69 | 6f 6e 7b 44 6f 75 62 6c |norsecti|on{Doubl|
|00002a20| 65 2d 71 75 6f 74 65 64 | 20 53 74 72 69 6e 67 73 |e-quoted| Strings|
|00002a30| 7d 0d 0a 0d 0a 0d 0a 41 | 20 5e 7b 64 6f 75 62 6c |}......A| ^{doubl|
|00002a40| 65 2d 71 75 6f 74 65 64 | 20 73 74 72 69 6e 67 7d |e-quoted| string}|
|00002a50| 0d 0a 69 73 20 61 6e 20 | 61 72 62 69 74 72 61 72 |..is an |arbitrar|
|00002a60| 79 20 73 74 72 69 6e 67 | 20 6f 66 20 63 68 61 72 |y string| of char|
|00002a70| 61 63 74 65 72 73 20 65 | 6e 63 6c 6f 73 65 64 20 |acters e|nclosed |
|00002a80| 69 6e 20 64 6f 75 62 6c | 65 0d 0a 71 75 6f 74 61 |in doubl|e..quota|
|00002a90| 74 69 6f 6e 20 6d 61 72 | 6b 73 2c 20 73 75 63 68 |tion mar|ks, such|
|00002aa0| 20 61 73 2c 0d 0a 0d 0a | 7b 5c 65 78 61 6d 70 6c | as,....|{\exampl|
|00002ab0| 65 0d 0a 20 20 20 20 22 | 54 68 69 73 20 69 73 20 |e.. "|This is |
|00002ac0| 61 20 64 6f 75 62 6c 65 | 2d 71 75 6f 74 65 64 20 |a double|-quoted |
|00002ad0| 73 74 72 69 6e 67 2e 22 | 0d 0a 5c 73 6d 61 6c 6c |string."|..\small|
|00002ae0| 73 6b 69 70 7d 0d 0a 0d | 0a 53 74 72 65 74 63 68 |skip}...|.Stretch|
|00002af0| 65 73 20 6f 66 20 5e 7b | 77 68 69 74 65 73 70 61 |es of ^{|whitespa|
|00002b00| 63 65 7d 0d 0a 69 6e 20 | 73 75 63 68 20 73 74 72 |ce}..in |such str|
|00002b10| 69 6e 67 73 20 61 72 65 | 20 63 6f 6d 70 72 65 73 |ings are| compres|
|00002b20| 73 65 64 20 74 6f 20 73 | 69 6e 67 6c 65 20 73 70 |sed to s|ingle sp|
|00002b30| 61 63 65 73 2e 20 20 54 | 68 69 73 20 69 6e 63 6c |aces. T|his incl|
|00002b40| 75 64 65 73 20 6e 65 77 | 6c 69 6e 65 73 3b 0d 0a |udes new|lines;..|
|00002b50| 64 6f 75 62 6c 65 2d 71 | 75 6f 74 65 64 20 73 74 |double-q|uoted st|
|00002b60| 72 69 6e 67 73 20 63 61 | 6e 20 67 6f 20 6f 6e 20 |rings ca|n go on |
|00002b70| 70 61 73 74 20 74 68 65 | 20 65 6e 64 20 6f 66 20 |past the| end of |
|00002b80| 61 20 6c 69 6e 65 2c 20 | 61 6e 64 20 6b 65 65 70 |a line, |and keep|
|00002b90| 20 67 6f 69 6e 67 20 66 | 6f 72 0d 0a 73 65 76 65 | going f|or..seve|
|00002ba0| 72 61 6c 20 6c 69 6e 65 | 73 2e 20 20 46 6f 72 20 |ral line|s. For |
|00002bb0| 65 78 61 6d 70 6c 65 2c | 20 74 68 69 73 20 69 73 |example,| this is|
|00002bc0| 20 70 65 72 66 65 63 74 | 6c 79 20 6c 65 67 61 6c | perfect|ly legal|
|00002bd0| 3a 0d 0a 0d 0a 7b 5c 65 | 78 61 6d 70 6c 65 0d 0a |:....{\e|xample..|
|00002be0| 20 20 20 20 22 54 68 69 | 73 20 69 73 20 61 20 73 | "Thi|s is a s|
|00002bf0| 74 72 69 6e 67 0d 0a 20 | 20 20 20 74 68 61 74 20 |tring.. | that |
|00002c00| 67 6f 65 73 20 6f 6e 20 | 66 6f 72 0d 0a 5c 62 69 |goes on |for..\bi|
|00002c10| 67 73 6b 69 70 0d 0a 20 | 20 20 20 73 65 76 65 72 |gskip.. | sever|
|00002c20| 61 6c 20 6c 69 6e 65 73 | 2e 22 0d 0a 5c 73 6d 61 |al lines|."..\sma|
|00002c30| 6c 6c 73 6b 69 70 7d 0d | 0a 0d 0a 4e 6f 74 65 20 |llskip}.|...Note |
|00002c40| 74 68 61 74 20 54 41 44 | 53 20 63 6f 6e 76 65 72 |that TAD|S conver|
|00002c50| 74 73 20 61 6c 6c 20 6f | 66 20 74 68 61 74 20 62 |ts all o|f that b|
|00002c60| 6c 61 6e 6b 20 73 70 61 | 63 65 2c 20 69 6e 63 6c |lank spa|ce, incl|
|00002c70| 75 64 69 6e 67 20 74 68 | 65 20 62 6c 61 6e 6b 20 |uding th|e blank |
|00002c80| 6c 69 6e 65 73 2c 0d 0a | 64 6f 77 6e 20 74 6f 20 |lines,..|down to |
|00002c90| 61 20 73 69 6e 67 6c 65 | 20 73 70 61 63 65 20 62 |a single| space b|
|00002ca0| 65 74 77 65 65 6e 20 65 | 61 63 68 20 77 6f 72 64 |etween e|ach word|
|00002cb0| 2e 20 54 68 75 73 2c 20 | 79 6f 75 20 63 61 6e 20 |. Thus, |you can |
|00002cc0| 65 6e 74 65 72 20 79 6f | 75 72 20 74 65 78 74 0d |enter yo|ur text.|
|00002cd0| 0a 77 69 74 68 6f 75 74 | 20 68 61 76 69 6e 67 20 |.without| having |
|00002ce0| 74 6f 20 77 6f 72 72 79 | 20 61 62 6f 75 74 20 66 |to worry| about f|
|00002cf0| 6f 72 6d 61 74 74 69 6e | 67 20 69 74 3b 20 54 41 |ormattin|g it; TA|
|00002d00| 44 53 20 77 69 6c 6c 20 | 64 6f 20 61 6c 6c 20 74 |DS will |do all t|
|00002d10| 68 65 20 77 6f 72 6b 0d | 0a 6f 66 20 66 69 6c 6c |he work.|.of fill|
|00002d20| 69 6e 67 20 75 70 20 65 | 61 63 68 20 6f 75 74 70 |ing up e|ach outp|
|00002d30| 75 74 20 6c 69 6e 65 20 | 77 68 65 6e 20 79 6f 75 |ut line |when you|
|00002d40| 72 20 70 72 6f 67 72 61 | 6d 20 72 75 6e 73 2e 0d |r progra|m runs..|
|00002d50| 0a 0d 0a 53 6f 6d 65 74 | 69 6d 65 73 2c 20 79 6f |...Somet|imes, yo|
|00002d60| 75 20 77 69 6c 6c 20 77 | 61 6e 74 20 74 6f 20 66 |u will w|ant to f|
|00002d70| 6f 72 6d 61 74 20 79 6f | 75 72 20 6f 75 74 70 75 |ormat yo|ur outpu|
|00002d80| 74 20 69 6e 20 61 20 73 | 70 65 63 69 66 69 63 20 |t in a s|pecific |
|00002d90| 77 61 79 2c 20 6f 76 65 | 72 72 69 64 69 6e 67 0d |way, ove|rriding.|
|00002da0| 0a 74 68 65 20 73 74 61 | 6e 64 61 72 64 20 6f 75 |.the sta|ndard ou|
|00002db0| 74 70 75 74 20 66 6f 72 | 6d 61 74 74 69 6e 67 2e |tput for|matting.|
|00002dc0| 20 53 69 6e 63 65 20 54 | 41 44 53 20 63 6f 6e 76 | Since T|ADS conv|
|00002dd0| 65 72 74 73 20 61 6c 6c | 20 77 68 69 74 65 73 70 |erts all| whitesp|
|00002de0| 61 63 65 20 69 6e 20 79 | 6f 75 72 0d 0a 73 74 72 |ace in y|our..str|
|00002df0| 69 6e 67 73 20 28 69 6e | 63 6c 75 64 69 6e 67 20 |ings (in|cluding |
|00002e00| 6e 65 77 6c 69 6e 65 73 | 29 20 74 6f 20 73 70 61 |newlines|) to spa|
|00002e10| 63 65 73 2c 20 79 6f 75 | 20 68 61 76 65 20 74 6f |ces, you| have to|
|00002e20| 20 73 70 65 63 69 66 79 | 20 61 6e 79 0d 0a 73 70 | specify| any..sp|
|00002e30| 65 63 69 61 6c 20 66 6f | 72 6d 61 74 74 69 6e 67 |ecial fo|rmatting|
|00002e40| 20 79 6f 75 20 77 61 6e | 74 20 65 78 70 6c 69 63 | you wan|t explic|
|00002e50| 69 74 6c 79 2e 20 20 54 | 41 44 53 20 70 72 6f 76 |itly. T|ADS prov|
|00002e60| 69 64 65 73 20 73 65 76 | 65 72 61 6c 20 73 70 65 |ides sev|eral spe|
|00002e70| 63 69 61 6c 0d 0a 63 68 | 61 72 61 63 74 65 72 20 |cial..ch|aracter |
|00002e80| 73 65 71 75 65 6e 63 65 | 73 20 79 6f 75 20 63 61 |sequence|s you ca|
|00002e90| 6e 20 75 73 65 20 74 6f | 20 6f 62 74 61 69 6e 20 |n use to| obtain |
|00002ea0| 74 68 65 73 65 20 65 66 | 66 65 63 74 73 2e 0d 0a |these ef|fects...|
|00002eb0| 0d 0a 7b 5c 61 64 76 61 | 6e 63 65 5c 6c 65 66 74 |..{\adva|nce\left|
|00002ec0| 73 6b 69 70 32 69 6e 0d | 0a 5c 64 65 66 5c 63 68 |skip2in.|.\def\ch|
|00002ed0| 61 72 69 74 65 6d 23 31 | 7b 5c 6d 65 64 73 6b 69 |aritem#1|{\medski|
|00002ee0| 70 5c 69 6e 64 65 6e 74 | 5c 6c 6c 61 70 7b 5c 68 |p\indent|\llap{\h|
|00002ef0| 62 6f 78 20 74 6f 20 31 | 69 6e 7b 7b 5c 74 74 20 |box to 1|in{{\tt |
|00002f00| 23 31 7d 5c 68 66 69 6c | 6c 7d 7d 7d 0d 0a 0d 0a |#1}\hfil|l}}}....|
|00002f10| 5c 63 68 61 72 69 74 65 | 6d 7b 5c 63 68 61 72 60 |\charite|m{\char`|
|00002f20| 5c 5c 74 7d 5e 7b 54 61 | 62 7d 20 74 6f 20 74 68 |\\t}^{Ta|b} to th|
|00002f30| 65 20 6e 65 78 74 20 73 | 74 6f 70 2e 20 20 54 61 |e next s|top. Ta|
|00002f40| 62 20 73 74 6f 70 73 20 | 61 72 65 20 65 76 65 72 |b stops |are ever|
|00002f50| 79 20 66 6f 75 72 20 73 | 70 61 63 65 73 2e 0d 0a |y four s|paces...|
|00002f60| 54 68 69 73 20 69 73 20 | 75 73 65 66 75 6c 20 69 |This is |useful i|
|00002f70| 66 20 79 6f 75 20 77 61 | 6e 74 20 73 74 72 65 74 |f you wa|nt stret|
|00002f80| 63 68 65 73 20 6f 66 20 | 62 6c 61 6e 6b 20 73 70 |ches of |blank sp|
|00002f90| 61 63 65 20 77 69 74 68 | 69 6e 20 61 20 6c 69 6e |ace with|in a lin|
|00002fa0| 65 2e 0d 0a 0d 0a 5c 63 | 68 61 72 69 74 65 6d 7b |e.....\c|haritem{|
|00002fb0| 5c 63 68 61 72 60 5c 5c | 6e 7d 41 20 5e 7b 6e 65 |\char`\\|n}A ^{ne|
|00002fc0| 77 6c 69 6e 65 7d 2e 20 | 20 45 6e 64 73 20 74 68 |wline}. | Ends th|
|00002fd0| 65 20 63 75 72 72 65 6e | 74 20 6c 69 6e 65 2c 20 |e curren|t line, |
|00002fe0| 61 6e 64 20 73 6b 69 70 | 73 20 74 6f 20 61 0d 0a |and skip|s to a..|
|00002ff0| 6e 65 77 20 6f 6e 65 2e | 20 20 4e 6f 74 65 20 74 |new one.| Note t|
|00003000| 68 61 74 20 72 65 70 65 | 61 74 69 6e 67 20 74 68 |hat repe|ating th|
|00003010| 69 73 20 73 65 71 75 65 | 6e 63 65 20 68 61 73 20 |is seque|nce has |
|00003020| 6e 6f 20 65 66 66 65 63 | 74 2c 20 73 69 6e 63 65 |no effec|t, since|
|00003030| 20 74 68 65 0d 0a 6f 75 | 74 70 75 74 20 66 6f 72 | the..ou|tput for|
|00003040| 6d 61 74 74 65 72 20 69 | 67 6e 6f 72 65 73 20 72 |matter i|gnores r|
|00003050| 65 64 75 6e 64 61 6e 74 | 20 7b 5c 74 74 20 5c 63 |edundant| {\tt \c|
|00003060| 68 61 72 60 5c 5c 6e 7d | 20 73 65 71 75 65 6e 63 |har`\\n}| sequenc|
|00003070| 65 73 3b 20 74 68 69 73 | 20 69 73 0d 0a 6e 6f 72 |es; this| is..nor|
|00003080| 6d 61 6c 6c 79 20 63 6f | 6e 76 65 6e 69 65 6e 74 |mally co|nvenient|
|00003090| 2c 20 62 65 63 61 75 73 | 65 20 69 74 20 6d 65 61 |, becaus|e it mea|
|000030a0| 6e 73 20 79 6f 75 20 64 | 6f 6e 27 74 20 68 61 76 |ns you d|on't hav|
|000030b0| 65 20 74 6f 20 77 6f 72 | 72 79 20 61 62 6f 75 74 |e to wor|ry about|
|000030c0| 20 73 65 76 65 72 61 6c | 0d 0a 6e 65 77 6c 69 6e | several|..newlin|
|000030d0| 65 20 73 65 71 75 65 6e | 63 65 73 20 62 65 69 6e |e sequen|ces bein|
|000030e0| 67 20 64 69 73 70 6c 61 | 79 65 64 20 62 79 20 64 |g displa|yed by d|
|000030f0| 69 66 66 65 72 65 6e 74 | 20 6f 62 6a 65 63 74 73 |ifferent| objects|
|00003100| 20 66 69 6c 6c 69 6e 67 | 20 74 68 65 0d 0a 64 69 | filling| the..di|
|00003110| 73 70 6c 61 79 20 77 69 | 74 68 20 75 6e 77 61 6e |splay wi|th unwan|
|00003120| 74 65 64 20 62 6c 61 6e | 6b 20 6c 69 6e 65 73 2e |ted blan|k lines.|
|00003130| 0d 0a 49 66 20 79 6f 75 | 20 77 61 6e 74 20 74 6f |..If you| want to|
|00003140| 20 66 6f 72 63 65 20 6f | 6e 65 0d 0a 6f 72 20 6d | force o|ne..or m|
|00003150| 6f 72 65 20 62 6c 61 6e | 6b 20 6c 69 6e 65 73 2c |ore blan|k lines,|
|00003160| 20 75 73 65 20 7b 5c 74 | 74 20 5c 63 68 61 72 60 | use {\t|t \char`|
|00003170| 5c 5c 62 7d 2e 0d 0a 0d | 0a 5c 63 68 61 72 69 74 |\\b}....|.\charit|
|00003180| 65 6d 7b 5c 63 68 61 72 | 60 5c 5c 62 7d 45 6e 64 |em{\char|`\\b}End|
|00003190| 73 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 6c 69 |s the cu|rrent li|
|000031a0| 6e 65 2c 20 61 6e 64 20 | 74 68 65 6e 20 6f 75 74 |ne, and |then out|
|000031b0| 70 75 74 73 20 61 20 62 | 6c 61 6e 6b 20 6c 69 6e |puts a b|lank lin|
|000031c0| 65 2e 0d 0a 0d 0a 5c 63 | 68 61 72 69 74 65 6d 7b |e.....\c|haritem{|
|000031d0| 5c 63 68 61 72 60 5c 5c | 22 7d 41 20 64 6f 75 62 |\char`\\|"}A doub|
|000031e0| 6c 65 20 71 75 6f 74 65 | 2e 0d 0a 0d 0a 5c 63 68 |le quote|.....\ch|
|000031f0| 61 72 69 74 65 6d 7b 5c | 63 68 61 72 60 5c 5c 5c |aritem{\|char`\\\|
|00003200| 63 68 61 72 60 5c 5c 7d | 41 20 62 61 63 6b 73 6c |char`\\}|A backsl|
|00003210| 61 73 68 2e 0d 0a 0d 0a | 5c 63 68 61 72 69 74 65 |ash.....|\charite|
|00003220| 6d 7b 5c 63 68 61 72 60 | 5c 5c 3c 7d 41 20 6c 65 |m{\char`|\\<}A le|
|00003230| 66 74 20 61 6e 67 6c 65 | 20 62 72 61 63 6b 65 74 |ft angle| bracket|
|00003240| 2e 20 20 54 68 69 73 20 | 69 73 20 6e 6f 74 20 72 |. This |is not r|
|00003250| 65 71 75 69 72 65 64 20 | 74 6f 20 70 72 6f 64 75 |equired |to produ|
|00003260| 63 65 0d 0a 61 20 73 69 | 6e 67 6c 65 20 61 6e 67 |ce..a si|ngle ang|
|00003270| 6c 65 20 62 72 61 63 6b | 65 74 20 28 61 6c 74 68 |le brack|et (alth|
|00003280| 6f 75 67 68 20 69 74 20 | 77 69 6c 6c 20 64 6f 20 |ough it |will do |
|00003290| 73 6f 29 2c 20 62 75 74 | 20 79 6f 75 20 77 69 6c |so), but| you wil|
|000032a0| 6c 20 6e 65 65 64 20 74 | 6f 20 75 73 65 0d 0a 74 |l need t|o use..t|
|000032b0| 68 69 73 20 6f 6e 20 73 | 65 63 6f 6e 64 20 61 6e |his on s|econd an|
|000032c0| 64 20 73 75 62 73 65 71 | 75 65 6e 74 20 61 6e 67 |d subseq|uent ang|
|000032d0| 6c 65 20 62 72 61 63 6b | 65 74 73 20 69 6e 20 61 |le brack|ets in a|
|000032e0| 20 73 74 72 65 61 6d 20 | 6f 66 20 63 6f 6e 74 69 | stream |of conti|
|000032f0| 67 75 6f 75 73 0d 0a 61 | 6e 67 6c 65 20 62 72 61 |guous..a|ngle bra|
|00003300| 63 6b 65 74 73 2c 20 74 | 6f 20 70 72 65 76 65 6e |ckets, t|o preven|
|00003310| 74 20 54 41 44 53 20 66 | 72 6f 6d 20 74 68 69 6e |t TADS f|rom thin|
|00003320| 6b 69 6e 67 20 79 6f 75 | 20 77 61 6e 74 20 74 6f |king you| want to|
|00003330| 20 65 6d 62 65 64 20 61 | 6e 20 65 78 70 72 65 73 | embed a|n expres|
|00003340| 73 69 6f 6e 0d 0a 69 6e | 20 79 6f 75 72 20 73 74 |sion..in| your st|
|00003350| 72 69 6e 67 20 28 73 65 | 65 20 62 65 6c 6f 77 29 |ring (se|e below)|
|00003360| 2e 20 20 48 65 6e 63 65 | 2c 20 69 66 20 79 6f 75 |. Hence|, if you|
|00003370| 20 77 61 6e 74 20 74 6f | 20 64 69 73 70 6c 61 79 | want to| display|
|00003380| 20 7b 5c 74 74 20 3c 3c | 3c 3c 3c 7d 2c 0d 0a 79 | {\tt <<|<<<},..y|
|00003390| 6f 75 20 77 69 6c 6c 20 | 68 61 76 65 20 74 6f 20 |ou will |have to |
|000033a0| 74 79 70 65 20 74 68 69 | 73 20 69 6e 20 79 6f 75 |type thi|s in you|
|000033b0| 72 20 70 72 6f 67 72 61 | 6d 3a 0d 0a 7b 5c 74 74 |r progra|m:..{\tt|
|000033c0| 20 22 3c 5c 63 68 61 72 | 60 5c 5c 3c 5c 63 68 61 | "<\char|`\\<\cha|
|000033d0| 72 60 5c 5c 3c 5c 63 68 | 61 72 60 5c 5c 3c 5c 63 |r`\\<\ch|ar`\\<\c|
|000033e0| 68 61 72 60 5c 5c 3c 22 | 7d 2e 0d 0a 0d 0a 5c 63 |har`\\<"|}.....\c|
|000033f0| 68 61 72 69 74 65 6d 7b | 5c 63 68 61 72 60 5c 5c |haritem{|\char`\\|
|00003400| 20 5c 63 68 61 72 60 5c | 5e 7d 28 54 68 61 74 20 | \char`\|^}(That |
|00003410| 69 73 2c 20 61 20 62 61 | 63 6b 73 6c 61 73 68 20 |is, a ba|ckslash |
|00003420| 66 6f 6c 6c 6f 77 65 64 | 20 62 79 20 61 20 63 69 |followed| by a ci|
|00003430| 72 63 75 6d 66 6c 65 78 | 0d 0a 6f 72 20 60 60 75 |rcumflex|..or ``u|
|00003440| 70 20 61 72 72 6f 77 22 | 20 6f 72 20 60 60 68 61 |p arrow"| or ``ha|
|00003450| 74 2c 22 20 65 6e 74 65 | 72 65 64 20 77 69 74 68 |t," ente|red with|
|00003460| 20 74 68 65 20 73 68 69 | 66 74 65 64 20 60 60 36 | the shi|fted ``6|
|00003470| 22 20 6b 65 79 20 6f 6e | 20 6d 6f 73 74 20 6b 65 |" key on| most ke|
|00003480| 79 62 6f 61 72 64 73 2e | 29 0d 0a 54 68 69 73 20 |yboards.|)..This |
|00003490| 73 65 71 75 65 6e 63 65 | 20 63 61 75 73 65 73 20 |sequence| causes |
|000034a0| 74 68 65 20 6e 65 78 74 | 20 63 68 61 72 61 63 74 |the next| charact|
|000034b0| 65 72 20 69 6e 20 74 68 | 65 20 6f 75 74 70 75 74 |er in th|e output|
|000034c0| 20 74 6f 20 62 65 20 63 | 61 70 69 74 61 6c 69 7a | to be c|apitaliz|
|000034d0| 65 64 2e 0d 0a 54 68 69 | 73 20 73 65 71 75 65 6e |ed...Thi|s sequen|
|000034e0| 63 65 20 69 73 20 67 65 | 6e 65 72 61 6c 6c 79 20 |ce is ge|nerally |
|000034f0| 75 73 65 64 20 6a 75 73 | 74 20 62 65 66 6f 72 65 |used jus|t before|
|00003500| 20 69 6e 76 6f 6b 69 6e | 67 20 61 20 66 75 6e 63 | invokin|g a func|
|00003510| 74 69 6f 6e 20 6f 72 20 | 6d 65 74 68 6f 64 0d 0a |tion or |method..|
|00003520| 74 68 61 74 20 77 69 6c | 6c 20 64 69 73 70 6c 61 |that wil|l displa|
|00003530| 79 20 74 65 78 74 20 74 | 68 61 74 20 77 69 6c 6c |y text t|hat will|
|00003540| 20 62 65 20 61 74 20 74 | 68 65 20 73 74 61 72 74 | be at t|he start|
|00003550| 20 6f 66 20 61 20 73 65 | 6e 74 65 6e 63 65 2e 20 | of a se|ntence. |
|00003560| 20 42 79 20 75 73 69 6e | 67 0d 0a 74 68 69 73 20 | By usin|g..this |
|00003570| 73 65 71 75 65 6e 63 65 | 20 70 72 69 6f 72 20 74 |sequence| prior t|
|00003580| 6f 20 74 68 65 20 74 65 | 78 74 2c 20 79 6f 75 20 |o the te|xt, you |
|00003590| 65 6e 73 75 72 65 20 74 | 68 61 74 20 74 68 65 20 |ensure t|hat the |
|000035a0| 66 69 72 73 74 20 6c 65 | 74 74 65 72 20 6f 66 20 |first le|tter of |
|000035b0| 74 68 65 0d 0a 73 65 6e | 74 65 6e 63 65 20 69 73 |the..sen|tence is|
|000035c0| 20 63 61 70 69 74 61 6c | 69 7a 65 64 2c 20 65 76 | capital|ized, ev|
|000035d0| 65 6e 20 69 66 20 74 68 | 65 20 66 75 6e 63 74 69 |en if th|e functi|
|000035e0| 6f 6e 20 6f 72 20 6d 65 | 74 68 6f 64 20 64 69 73 |on or me|thod dis|
|000035f0| 70 6c 61 79 69 6e 67 20 | 74 68 65 20 74 65 78 74 |playing |the text|
|00003600| 0d 0a 64 6f 65 73 6e 27 | 74 20 6b 6e 6f 77 20 69 |..doesn'|t know i|
|00003610| 74 20 73 68 6f 75 6c 64 | 20 62 65 20 63 61 70 69 |t should| be capi|
|00003620| 74 61 6c 69 7a 65 64 2e | 20 20 46 6f 72 20 65 78 |talized.| For ex|
|00003630| 61 6d 70 6c 65 3a 20 20 | 7b 5c 74 74 20 22 5c 63 |ample: |{\tt "\c|
|00003640| 68 61 72 60 5c 5c 0d 0a | 5c 63 68 61 72 60 5c 5e |har`\\..|\char`\^|
|00003650| 20 3c 3c 20 6f 62 6a 2e | 61 64 65 73 63 20 3e 3e | << obj.|adesc >>|
|00003660| 20 69 73 20 73 69 74 74 | 69 6e 67 20 6f 6e 20 74 | is sitt|ing on t|
|00003670| 68 65 20 74 61 62 6c 65 | 2e 22 7d 20 20 4e 6f 74 |he table|."} Not|
|00003680| 65 20 74 68 61 74 20 74 | 68 65 20 7b 5c 74 74 20 |e that t|he {\tt |
|00003690| 63 61 70 73 28 29 7d 0d | 0a 62 75 69 6c 74 2d 69 |caps()}.|.built-i|
|000036a0| 6e 20 66 75 6e 63 74 69 | 6f 6e 20 68 61 73 20 74 |n functi|on has t|
|000036b0| 68 65 20 73 61 6d 65 20 | 65 66 66 65 63 74 2e 0d |he same |effect..|
|000036c0| 0a 0d 0a 5c 63 68 61 72 | 69 74 65 6d 7b 5c 63 68 |...\char|item{\ch|
|000036d0| 61 72 60 5c 5c 7b 5c 69 | 74 20 73 70 61 63 65 7d |ar`\\{\i|t space}|
|000036e0| 7d 28 54 68 61 74 20 69 | 73 2c 20 61 20 62 61 63 |}(That i|s, a bac|
|000036f0| 6b 73 6c 61 73 68 20 66 | 6f 6c 6c 6f 77 65 64 20 |kslash f|ollowed |
|00003700| 62 79 20 61 20 73 70 61 | 63 65 2e 29 0d 0a 41 20 |by a spa|ce.)..A |
|00003710| 71 75 6f 74 65 64 20 73 | 70 61 63 65 2e 20 54 68 |quoted s|pace. Th|
|00003720| 69 73 20 69 73 20 75 73 | 65 66 75 6c 20 69 6e 20 |is is us|eful in |
|00003730| 63 65 72 74 61 69 6e 20 | 63 61 73 65 73 20 74 6f |certain |cases to|
|00003740| 20 61 63 68 69 65 76 65 | 20 73 70 65 63 69 61 6c | achieve| special|
|00003750| 0d 0a 66 6f 72 6d 61 74 | 74 69 6e 67 20 65 66 66 |..format|ting eff|
|00003760| 65 63 74 73 2c 20 62 65 | 63 61 75 73 65 20 69 74 |ects, be|cause it|
|00003770| 20 6f 76 65 72 72 69 64 | 65 73 20 74 68 65 20 6f | overrid|es the o|
|00003780| 75 74 70 75 74 20 66 6f | 72 6d 61 74 74 65 72 27 |utput fo|rmatter'|
|00003790| 73 20 73 75 70 70 72 65 | 73 73 69 6f 6e 0d 0a 6f |s suppre|ssion..o|
|000037a0| 66 20 6d 75 6c 74 69 70 | 6c 65 20 73 70 61 63 65 |f multip|le space|
|000037b0| 73 2c 20 61 6e 64 20 69 | 74 20 61 6c 73 6f 20 73 |s, and i|t also s|
|000037c0| 75 70 70 72 65 73 73 65 | 73 20 74 68 65 20 64 6f |uppresse|s the do|
|000037d0| 75 62 6c 65 2d 73 70 61 | 63 65 20 74 68 61 74 20 |uble-spa|ce that |
|000037e0| 66 6f 6c 6c 6f 77 73 0d | 0a 70 75 6e 63 74 75 61 |follows.|.punctua|
|000037f0| 74 69 6f 6e 20 6d 61 72 | 6b 73 20 73 75 63 68 20 |tion mar|ks such |
|00003800| 61 73 20 70 65 72 69 6f | 64 73 2e 20 20 46 6f 72 |as perio|ds. For|
|00003810| 20 65 78 61 6d 70 6c 65 | 2c 20 69 66 20 79 6f 75 | example|, if you|
|00003820| 20 77 61 6e 74 20 74 6f | 20 70 72 69 6e 74 0d 0a | want to| print..|
|00003830| 73 6f 6d 65 6f 6e 65 27 | 73 20 6e 61 6d 65 20 77 |someone'|s name w|
|00003840| 69 74 68 20 61 20 6d 69 | 64 64 6c 65 20 69 6e 69 |ith a mi|ddle ini|
|00003850| 74 69 61 6c 2c 20 79 6f | 75 20 64 6f 6e 27 74 20 |tial, yo|u don't |
|00003860| 77 61 6e 74 20 74 77 6f | 20 73 70 61 63 65 73 20 |want two| spaces |
|00003870| 61 66 74 65 72 20 74 68 | 65 0d 0a 69 6e 69 74 69 |after th|e..initi|
|00003880| 61 6c 3b 20 79 6f 75 20 | 77 6f 75 6c 64 20 74 68 |al; you |would th|
|00003890| 75 73 20 65 6e 74 65 72 | 3a 20 7b 5c 74 74 20 22 |us enter|: {\tt "|
|000038a0| 4d 69 63 68 61 65 6c 20 | 4a 2e 5c 63 68 61 72 60 |Michael |J.\char`|
|000038b0| 5c 5c 7b 7d 20 52 6f 62 | 65 72 74 73 22 7d 2e 0d |\\{} Rob|erts"}..|
|000038c0| 0a 0d 0a 5c 63 68 61 72 | 69 74 65 6d 7b 5c 63 68 |...\char|item{\ch|
|000038d0| 61 72 60 5c 5c 28 7d 42 | 65 67 69 6e 20 68 69 67 |ar`\\(}B|egin hig|
|000038e0| 68 6c 69 67 68 74 69 6e | 67 2e 20 20 54 65 78 74 |hlightin|g. Text|
|000038f0| 20 61 66 74 65 72 20 74 | 68 65 20 7b 5c 74 74 20 | after t|he {\tt |
|00003900| 5c 63 68 61 72 60 5c 5c | 28 7d 0d 0a 69 73 20 64 |\char`\\|(}..is d|
|00003910| 69 73 70 6c 61 79 65 64 | 20 77 69 74 68 20 61 20 |isplayed| with a |
|00003920| 73 70 65 63 69 61 6c 20 | 61 74 74 72 69 62 75 74 |special |attribut|
|00003930| 65 2c 20 77 68 69 63 68 | 20 76 61 72 69 65 73 20 |e, which| varies |
|00003940| 62 79 20 73 79 73 74 65 | 6d 3b 20 6f 6e 20 73 6f |by syste|m; on so|
|00003950| 6d 65 0d 0a 6d 61 63 68 | 69 6e 65 73 20 69 74 20 |me..mach|ines it |
|00003960| 77 69 6c 6c 20 61 70 70 | 65 61 72 20 69 6e 20 61 |will app|ear in a|
|00003970| 20 64 69 66 66 65 72 65 | 6e 74 20 63 6f 6c 6f 72 | differe|nt color|
|00003980| 20 74 68 61 6e 20 6f 72 | 64 69 6e 61 72 79 20 74 | than or|dinary t|
|00003990| 65 78 74 2c 20 77 68 69 | 6c 65 0d 0a 6f 6e 20 6f |ext, whi|le..on o|
|000039a0| 74 68 65 72 73 20 69 74 | 20 6d 61 79 20 61 70 70 |thers it| may app|
|000039b0| 65 61 72 20 77 69 74 68 | 20 61 20 64 69 66 66 65 |ear with| a diffe|
|000039c0| 72 65 6e 74 20 74 79 70 | 65 66 61 63 65 2e 20 20 |rent typ|eface. |
|000039d0| 4f 6e 20 73 6f 6d 65 20 | 73 79 73 74 65 6d 73 20 |On some |systems |
|000039e0| 69 74 0d 0a 6d 61 79 20 | 68 61 76 65 20 6e 6f 20 |it..may |have no |
|000039f0| 65 66 66 65 63 74 2e 20 | 20 54 68 69 73 20 69 73 |effect. | This is|
|00003a00| 20 69 6e 74 65 6e 64 65 | 64 20 74 6f 20 62 65 20 | intende|d to be |
|00003a10| 75 73 65 64 20 66 6f 72 | 20 65 6d 70 68 61 73 69 |used for| emphasi|
|00003a20| 7a 69 6e 67 20 74 65 78 | 74 0d 0a 74 68 65 20 73 |zing tex|t..the s|
|00003a30| 61 6d 65 20 77 61 79 20 | 74 68 61 74 20 62 6f 6c |ame way |that bol|
|00003a40| 64 66 61 63 65 20 6f 72 | 20 69 74 61 6c 69 63 73 |dface or| italics|
|00003a50| 20 77 6f 75 6c 64 20 65 | 6d 70 68 61 73 69 7a 65 | would e|mphasize|
|00003a60| 20 74 65 78 74 20 69 6e | 20 61 20 62 6f 6f 6b 2e | text in| a book.|
|00003a70| 0d 0a 4e 6f 74 65 20 74 | 68 61 74 20 68 69 67 68 |..Note t|hat high|
|00003a80| 6c 69 67 68 74 69 6e 67 | 20 64 6f 65 73 20 6e 6f |lighting| does no|
|00003a90| 74 20 60 60 6e 65 73 74 | 27 27 3b 20 74 68 61 74 |t ``nest|''; that|
|00003aa0| 20 69 73 2c 20 69 66 20 | 61 20 7b 5c 74 74 20 5c | is, if |a {\tt \|
|00003ab0| 63 68 61 72 60 5c 5c 28 | 7d 0d 0a 73 65 71 75 65 |char`\\(|}..seque|
|00003ac0| 6e 63 65 20 6f 63 63 75 | 72 73 20 77 68 69 6c 65 |nce occu|rs while|
|00003ad0| 20 68 69 67 68 6c 69 67 | 68 74 69 6e 67 20 69 73 | highlig|hting is|
|00003ae0| 20 61 6c 72 65 61 64 79 | 20 61 63 74 69 76 65 2c | already| active,|
|00003af0| 20 74 68 65 20 73 65 63 | 6f 6e 64 20 73 65 71 75 | the sec|ond sequ|
|00003b00| 65 6e 63 65 0d 0a 68 61 | 73 20 6e 6f 20 61 64 64 |ence..ha|s no add|
|00003b10| 69 74 69 6f 6e 61 6c 20 | 65 66 66 65 63 74 2e 0d |itional |effect..|
|00003b20| 0a 0d 0a 5c 63 68 61 72 | 69 74 65 6d 7b 5c 63 68 |...\char|item{\ch|
|00003b30| 61 72 60 5c 5c 29 7d 45 | 6e 64 20 68 69 67 68 6c |ar`\\)}E|nd highl|
|00003b40| 69 67 68 74 69 6e 67 2e | 20 20 54 65 78 74 20 61 |ighting.| Text a|
|00003b50| 66 74 65 72 20 74 68 65 | 20 7b 5c 74 74 20 5c 63 |fter the| {\tt \c|
|00003b60| 68 61 72 60 5c 5c 29 7d | 0d 0a 77 69 74 68 6f 75 |har`\\)}|..withou|
|00003b70| 74 20 74 68 65 20 73 70 | 65 63 69 61 6c 20 68 69 |t the sp|ecial hi|
|00003b80| 67 68 6c 69 67 68 74 69 | 6e 67 20 61 74 74 72 69 |ghlighti|ng attri|
|00003b90| 62 75 74 65 2e 20 20 4e | 6f 74 65 20 74 68 61 74 |bute. N|ote that|
|00003ba0| 20 61 20 73 69 6e 67 6c | 65 0d 0a 7b 5c 74 74 20 | a singl|e..{\tt |
|00003bb0| 5c 63 68 61 72 60 5c 5c | 29 7d 20 73 65 71 75 65 |\char`\\|)} seque|
|00003bc0| 6e 63 65 20 74 75 72 6e | 73 20 6f 66 66 20 68 69 |nce turn|s off hi|
|00003bd0| 67 68 6c 69 67 68 74 69 | 6e 67 2c 20 6e 6f 20 6d |ghlighti|ng, no m|
|00003be0| 61 74 74 65 72 20 68 6f | 77 20 6d 61 6e 79 0d 0a |atter ho|w many..|
|00003bf0| 7b 5c 74 74 20 5c 63 68 | 61 72 60 5c 5c 28 7d 20 |{\tt \ch|ar`\\(} |
|00003c00| 73 65 71 75 65 6e 63 65 | 73 20 70 72 65 63 65 64 |sequence|s preced|
|00003c10| 65 64 20 69 74 2e 0d 0a | 0d 0a 5c 6d 65 64 73 6b |ed it...|..\medsk|
|00003c20| 69 70 7d 0d 0a 0d 0a 54 | 68 65 72 65 20 69 73 20 |ip}....T|here is |
|00003c30| 6e 6f 20 73 70 65 63 69 | 66 69 63 20 6c 69 6d 69 |no speci|fic limi|
|00003c40| 74 20 6f 6e 20 74 68 65 | 20 6c 65 6e 67 74 68 20 |t on the| length |
|00003c50| 6f 66 20 61 20 64 6f 75 | 62 6c 65 2d 71 75 6f 74 |of a dou|ble-quot|
|00003c60| 65 20 73 74 72 69 6e 67 | 2c 0d 0a 61 6c 74 68 6f |e string|,..altho|
|00003c70| 75 67 68 20 74 68 65 20 | 63 6f 6d 70 69 6c 65 72 |ugh the |compiler|
|00003c80| 20 6d 61 79 20 69 6d 70 | 6f 73 65 20 73 6f 6d 65 | may imp|ose some|
|00003c90| 20 6c 69 6d 69 74 73 20 | 64 65 70 65 6e 64 69 6e | limits |dependin|
|00003ca0| 67 20 6f 6e 20 74 68 65 | 20 63 6f 6e 74 65 78 74 |g on the| context|
|00003cb0| 0d 0a 69 6e 20 77 68 69 | 63 68 20 74 68 65 20 73 |..in whi|ch the s|
|00003cc0| 74 72 69 6e 67 20 61 70 | 70 65 61 72 73 2e 0d 0a |tring ap|pears...|
|00003cd0| 0d 0a 41 20 64 6f 75 62 | 6c 65 2d 71 75 6f 74 65 |..A doub|le-quote|
|00003ce0| 64 20 73 74 72 69 6e 67 | 20 69 73 20 61 6c 77 61 |d string| is alwa|
|00003cf0| 79 73 20 64 69 73 70 6c | 61 79 65 64 20 77 68 65 |ys displ|ayed whe|
|00003d00| 6e 65 76 65 72 20 65 76 | 61 6c 75 61 74 65 64 2e |never ev|aluated.|
|00003d10| 20 20 57 68 65 6e 20 61 | 0d 0a 64 6f 75 62 6c 65 | When a|..double|
|00003d20| 2d 71 75 6f 74 65 64 0d | 0a 73 74 72 69 6e 67 20 |-quoted.|.string |
|00003d30| 61 70 70 65 61 72 73 20 | 69 6e 20 63 6f 64 65 2c |appears |in code,|
|00003d40| 20 65 78 65 63 75 74 69 | 6e 67 20 74 68 61 74 20 | executi|ng that |
|00003d50| 63 6f 64 65 20 72 65 73 | 75 6c 74 73 20 69 6e 20 |code res|ults in |
|00003d60| 64 69 73 70 6c 61 79 69 | 6e 67 20 74 68 65 0d 0a |displayi|ng the..|
|00003d70| 73 74 72 69 6e 67 2e 20 | 20 4c 69 6b 65 77 69 73 |string. | Likewis|
|00003d80| 65 2c 20 77 68 65 6e 20 | 61 20 70 72 6f 70 65 72 |e, when |a proper|
|00003d90| 74 79 20 68 61 73 20 61 | 20 64 6f 75 62 6c 65 2d |ty has a| double-|
|00003da0| 71 75 6f 74 65 64 20 73 | 74 72 69 6e 67 20 61 73 |quoted s|tring as|
|00003db0| 20 69 74 73 20 76 61 6c | 75 65 2c 0d 0a 74 68 65 | its val|ue,..the|
|00003dc0| 20 73 74 72 69 6e 67 20 | 69 73 20 64 69 73 70 6c | string |is displ|
|00003dd0| 61 79 65 64 20 77 68 65 | 6e 65 76 65 72 20 74 68 |ayed whe|never th|
|00003de0| 65 20 70 72 6f 70 65 72 | 74 79 20 69 73 20 65 76 |e proper|ty is ev|
|00003df0| 61 6c 75 61 74 65 64 2e | 0d 0a 0d 0a 5c 6d 69 6e |aluated.|....\min|
|00003e00| 6f 72 73 65 63 74 69 6f | 6e 7b 45 6d 62 65 64 64 |orsectio|n{Embedd|
|00003e10| 69 6e 67 20 45 78 70 72 | 65 73 73 69 6f 6e 73 20 |ing Expr|essions |
|00003e20| 69 6e 20 53 74 72 69 6e | 67 73 7d 0d 0a 0d 0a 54 |in Strin|gs}....T|
|00003e30| 41 44 53 20 68 61 73 20 | 61 20 63 6f 6e 76 65 6e |ADS has |a conven|
|00003e40| 69 65 6e 74 20 66 65 61 | 74 75 72 65 20 77 68 69 |ient fea|ture whi|
|00003e50| 63 68 20 61 6c 6c 6f 77 | 73 20 79 6f 75 20 74 6f |ch allow|s you to|
|00003e60| 20 5e 7b 65 6d 62 65 64 | 20 65 78 70 72 65 73 73 | ^{embed| express|
|00003e70| 69 6f 6e 73 7d 20 69 6e | 0d 0a 73 74 72 69 6e 67 |ions} in|..string|
|00003e80| 73 2c 20 77 69 74 68 6f | 75 74 20 61 63 74 75 61 |s, witho|ut actua|
|00003e90| 6c 6c 79 20 73 74 6f 70 | 70 69 6e 67 20 74 68 65 |lly stop|ping the|
|00003ea0| 20 73 74 72 69 6e 67 2e | 20 20 41 6e 79 20 74 69 | string.| Any ti|
|00003eb0| 6d 65 20 54 41 44 53 20 | 65 6e 63 6f 75 6e 74 65 |me TADS |encounte|
|00003ec0| 72 73 0d 0a 74 77 6f 20 | 63 6f 6e 73 65 63 75 74 |rs..two |consecut|
|00003ed0| 69 76 65 20 6c 65 66 74 | 20 5e 7b 61 6e 67 6c 65 |ive left| ^{angle|
|00003ee0| 20 62 72 61 63 6b 65 74 | 73 7d 20 69 6e 20 61 20 | bracket|s} in a |
|00003ef0| 73 74 72 69 6e 67 2c 20 | 69 74 20 77 69 6c 6c 20 |string, |it will |
|00003f00| 6d 6f 6d 65 6e 74 61 72 | 69 6c 79 20 73 74 6f 70 |momentar|ily stop|
|00003f10| 0d 0a 74 68 65 20 73 74 | 72 69 6e 67 2c 20 61 6e |..the st|ring, an|
|00003f20| 64 20 65 76 61 6c 75 61 | 74 65 20 77 68 61 74 20 |d evalua|te what |
|00003f30| 63 6f 6d 65 73 20 61 66 | 74 65 72 20 74 68 65 20 |comes af|ter the |
|00003f40| 61 6e 67 6c 65 20 62 72 | 61 63 6b 65 74 73 20 61 |angle br|ackets a|
|00003f50| 73 20 61 6e 20 65 78 70 | 72 65 73 73 69 6f 6e 0d |s an exp|ression.|
|00003f60| 0a 77 68 6f 73 65 20 76 | 61 6c 75 65 20 69 73 20 |.whose v|alue is |
|00003f70| 74 6f 20 62 65 20 64 69 | 73 70 6c 61 79 65 64 2e |to be di|splayed.|
|00003f80| 0d 0a 54 68 65 20 65 78 | 70 72 65 73 73 69 6f 6e |..The ex|pression|
|00003f90| 20 65 6e 64 73 2c 20 61 | 6e 64 20 74 68 65 20 73 | ends, a|nd the s|
|00003fa0| 74 72 69 6e 67 20 72 65 | 73 75 6d 65 73 2c 20 77 |tring re|sumes, w|
|00003fb0| 68 65 6e 20 74 77 6f 20 | 72 69 67 68 74 20 61 6e |hen two |right an|
|00003fc0| 67 6c 65 20 62 72 61 63 | 6b 65 74 73 20 61 72 65 |gle brac|kets are|
|00003fd0| 0d 0a 65 6e 63 6f 75 6e | 74 65 72 65 64 2e 20 20 |..encoun|tered. |
|00003fe0| 54 68 69 73 20 6d 61 6b | 65 73 20 70 72 6f 70 65 |This mak|es prope|
|00003ff0| 72 74 79 20 64 65 66 69 | 6e 69 74 69 6f 6e 73 20 |rty defi|nitions |
|00004000| 74 68 61 74 20 6e 65 65 | 64 20 74 6f 20 6c 6f 6f |that nee|d to loo|
|00004010| 6b 20 75 70 20 61 6e 6f | 74 68 65 72 0d 0a 70 72 |k up ano|ther..pr|
|00004020| 6f 70 65 72 74 79 20 76 | 65 72 79 20 63 6f 6e 76 |operty v|ery conv|
|00004030| 65 6e 69 65 6e 74 20 74 | 6f 20 64 65 66 69 6e 65 |enient t|o define|
|00004040| 3b 20 66 6f 72 20 65 78 | 61 6d 70 6c 65 2c 0d 0a |; for ex|ample,..|
|00004050| 0d 0a 7b 5c 65 78 61 6d | 70 6c 65 0d 0a 20 20 20 |..{\exam|ple.. |
|00004060| 20 69 74 73 48 65 72 65 | 20 3d 20 22 3c 3c 20 73 | itsHere| = "<< s|
|00004070| 65 6c 66 2e 74 68 65 64 | 65 73 63 20 3e 3e 20 69 |elf.thed|esc >> i|
|00004080| 73 20 68 65 72 65 2e 22 | 0d 0a 5c 73 6d 61 6c 6c |s here."|..\small|
|00004090| 73 6b 69 70 7d 0d 0a 0d | 0a 54 68 65 20 73 74 61 |skip}...|.The sta|
|000040a0| 74 65 6d 65 6e 74 20 61 | 62 6f 76 65 20 69 73 20 |tement a|bove is |
|000040b0| 65 71 75 69 76 61 6c 65 | 6e 74 20 74 6f 20 74 68 |equivale|nt to th|
|000040c0| 69 73 20 6d 6f 72 65 20 | 76 65 72 62 6f 73 65 20 |is more |verbose |
|000040d0| 76 65 72 73 69 6f 6e 3a | 0d 0a 0d 0a 7b 5c 65 78 |version:|....{\ex|
|000040e0| 61 6d 70 6c 65 0d 0a 20 | 20 20 20 69 74 73 48 65 |ample.. | itsHe|
|000040f0| 72 65 20 3d 0d 0a 20 20 | 20 20 5c 6c 62 0d 0a 20 |re =.. | \lb.. |
|00004100| 20 20 20 20 20 20 20 20 | 73 65 6c 66 2e 74 68 65 | |self.the|
|00004110| 64 65 73 63 3b 20 22 20 | 69 73 20 68 65 72 65 2e |desc; " |is here.|
|00004120| 22 3b 0d 0a 20 20 20 20 | 5c 72 62 0d 0a 5c 73 6d |";.. |\rb..\sm|
|00004130| 61 6c 6c 73 6b 69 70 7d | 0d 0a 0d 0a 41 6e 20 65 |allskip}|....An e|
|00004140| 6d 62 65 64 64 65 64 20 | 65 78 70 72 65 73 73 69 |mbedded |expressi|
|00004150| 6f 6e 20 63 61 6e 20 65 | 76 61 6c 75 61 74 65 20 |on can e|valuate |
|00004160| 74 6f 20 61 20 6e 75 6d | 62 65 72 2c 20 61 20 73 |to a num|ber, a s|
|00004170| 69 6e 67 6c 65 2d 71 75 | 6f 74 65 64 20 73 74 72 |ingle-qu|oted str|
|00004180| 69 6e 67 2c 20 6f 72 0d | 0a 61 20 64 6f 75 62 6c |ing, or.|.a doubl|
|00004190| 65 2d 71 75 6f 74 65 64 | 20 73 74 72 69 6e 67 2e |e-quoted| string.|
|000041a0| 20 20 4f 74 68 65 72 20 | 64 61 74 61 74 79 70 65 | Other |datatype|
|000041b0| 73 20 61 72 65 20 6e 6f | 74 20 61 6c 6c 6f 77 65 |s are no|t allowe|
|000041c0| 64 2e 20 20 41 20 73 74 | 72 69 6e 67 20 6d 61 79 |d. A st|ring may|
|000041d0| 20 68 61 76 65 0d 0a 61 | 6e 79 20 6e 75 6d 62 65 | have..a|ny numbe|
|000041e0| 72 20 6f 66 20 65 6d 62 | 65 64 64 65 64 20 65 78 |r of emb|edded ex|
|000041f0| 70 72 65 73 73 69 6f 6e | 73 20 77 69 74 68 69 6e |pression|s within|
|00004200| 20 69 74 2e 20 20 41 6e | 20 65 6d 62 65 64 64 65 | it. An| embedde|
|00004210| 64 20 65 78 70 72 65 73 | 73 69 6f 6e 20 6d 61 79 |d expres|sion may|
|00004220| 0d 0a 6f 6e 6c 79 20 63 | 6f 6e 74 61 69 6e 20 61 |..only c|ontain a|
|00004230| 6e 20 65 78 70 72 65 73 | 73 69 6f 6e 3b 20 73 74 |n expres|sion; st|
|00004240| 61 74 65 6d 65 6e 74 73 | 20 28 73 75 63 68 20 61 |atements| (such a|
|00004250| 73 20 7b 5c 74 74 20 69 | 66 7d 29 20 61 72 65 20 |s {\tt i|f}) are |
|00004260| 6e 6f 74 20 61 6c 6c 6f | 77 65 64 2c 0d 0a 61 6e |not allo|wed,..an|
|00004270| 64 20 73 65 6d 69 63 6f | 6c 6f 6e 73 20 6d 61 79 |d semico|lons may|
|00004280| 20 7b 5c 69 74 20 6e 6f | 74 7d 20 62 65 20 75 73 | {\it no|t} be us|
|00004290| 65 64 20 74 6f 20 73 65 | 70 61 72 61 74 65 20 6d |ed to se|parate m|
|000042a0| 75 6c 74 69 70 6c 65 20 | 65 78 70 72 65 73 73 69 |ultiple |expressi|
|000042b0| 6f 6e 73 2d 2d 2d 75 73 | 65 0d 0a 63 6f 6d 6d 61 |ons---us|e..comma|
|000042c0| 73 20 69 6e 73 74 65 61 | 64 2e 0d 0a 0d 0a 54 68 |s instea|d.....Th|
|000042d0| 69 73 20 66 65 61 74 75 | 72 65 20 68 61 73 20 63 |is featu|re has c|
|000042e0| 65 72 74 61 69 6e 20 6c | 69 6d 69 74 61 74 69 6f |ertain l|imitatio|
|000042f0| 6e 73 2e 20 20 49 74 20 | 69 73 20 69 6c 6c 65 67 |ns. It |is illeg|
|00004300| 61 6c 20 74 6f 20 75 73 | 65 20 61 20 73 74 72 69 |al to us|e a stri|
|00004310| 6e 67 0d 0a 69 6e 20 61 | 6e 20 65 6d 62 65 64 64 |ng..in a|n embedd|
|00004320| 65 64 20 65 78 70 72 65 | 73 73 69 6f 6e 20 77 68 |ed expre|ssion wh|
|00004330| 69 63 68 20 69 74 73 65 | 6c 66 20 68 61 73 20 61 |ich itse|lf has a|
|00004340| 6e 20 65 6d 62 65 64 64 | 65 64 20 65 78 70 72 65 |n embedd|ed expre|
|00004350| 73 73 69 6f 6e 2e 0d 0a | 54 68 69 73 20 66 65 61 |ssion...|This fea|
|00004360| 74 75 72 65 20 63 61 6e | 20 62 65 20 75 73 65 64 |ture can| be used|
|00004370| 20 6f 6e 6c 79 20 69 6e | 20 64 6f 75 62 6c 65 2d | only in| double-|
|00004380| 71 75 6f 74 65 64 20 73 | 74 72 69 6e 67 73 3b 0d |quoted s|trings;.|
|00004390| 0a 73 69 6e 67 6c 65 2d | 71 75 6f 74 65 64 20 73 |.single-|quoted s|
|000043a0| 74 72 69 6e 67 73 20 63 | 61 6e 6e 6f 74 20 63 6f |trings c|annot co|
|000043b0| 6e 74 61 69 6e 20 65 6d | 62 65 64 64 65 64 20 65 |ntain em|bedded e|
|000043c0| 78 70 72 65 73 73 69 6f | 6e 73 2e 0d 0a 0d 0a 42 |xpressio|ns.....B|
|000043d0| 65 63 61 75 73 65 20 73 | 6f 6d 65 20 67 61 6d 65 |ecause s|ome game|
|000043e0| 20 61 75 74 68 6f 72 73 | 20 6d 61 79 20 77 69 73 | authors| may wis|
|000043f0| 68 20 74 6f 20 75 73 65 | 20 74 77 6f 20 6f 72 20 |h to use| two or |
|00004400| 6d 6f 72 65 20 63 6f 6e | 73 65 63 75 74 69 76 65 |more con|secutive|
|00004410| 0d 0a 6c 65 66 74 20 61 | 6e 67 6c 65 20 62 72 61 |..left a|ngle bra|
|00004420| 63 6b 65 74 73 20 69 6e | 20 74 68 65 69 72 20 73 |ckets in| their s|
|00004430| 74 72 69 6e 67 73 2c 20 | 74 68 65 20 73 70 65 63 |trings, |the spec|
|00004440| 69 61 6c 20 73 65 71 75 | 65 6e 63 65 20 60 7b 5c |ial sequ|ence `{\|
|00004450| 74 74 20 5c 63 68 61 72 | 60 5c 5c 3c 7d 27 0d 0a |tt \char|`\\<}'..|
|00004460| 69 73 20 70 72 6f 76 69 | 64 65 64 2e 20 20 53 65 |is provi|ded. Se|
|00004470| 65 20 74 68 65 20 73 65 | 63 74 69 6f 6e 20 6f 6e |e the se|ction on|
|00004480| 20 73 70 65 63 69 61 6c | 20 63 68 61 72 61 63 74 | special| charact|
|00004490| 65 72 20 73 65 71 75 65 | 6e 63 65 73 2c 20 61 62 |er seque|nces, ab|
|000044a0| 6f 76 65 2c 20 66 6f 72 | 0d 0a 6d 6f 72 65 20 69 |ove, for|..more i|
|000044b0| 6e 66 6f 72 6d 61 74 69 | 6f 6e 2e 0d 0a 0d 0a 5c |nformati|on.....\|
|000044c0| 6d 69 6e 6f 72 73 65 63 | 74 69 6f 6e 7b 53 69 6e |minorsec|tion{Sin|
|000044d0| 67 6c 65 2d 71 75 6f 74 | 65 64 20 53 74 72 69 6e |gle-quot|ed Strin|
|000044e0| 67 73 7d 0d 0a 0d 0a 5e | 7b 53 69 6e 67 6c 65 2d |gs}....^|{Single-|
|000044f0| 71 75 6f 74 65 64 20 73 | 74 72 69 6e 67 73 7d 20 |quoted s|trings} |
|00004500| 61 72 65 20 65 73 73 65 | 6e 74 69 61 6c 6c 79 20 |are esse|ntially |
|00004510| 74 68 65 20 73 61 6d 65 | 20 61 73 20 64 6f 75 62 |the same| as doub|
|00004520| 6c 65 2d 71 75 6f 74 65 | 64 20 73 74 72 69 6e 67 |le-quote|d string|
|00004530| 73 20 69 6e 0d 0a 61 70 | 70 65 61 72 61 6e 63 65 |s in..ap|pearance|
|00004540| 2c 20 65 78 63 65 70 74 | 2c 20 6f 66 20 63 6f 75 |, except|, of cou|
|00004550| 72 73 65 2c 20 74 68 61 | 74 20 74 68 65 79 20 61 |rse, tha|t they a|
|00004560| 72 65 20 65 6e 63 6c 6f | 73 65 64 20 69 6e 20 73 |re enclo|sed in s|
|00004570| 69 6e 67 6c 65 20 71 75 | 6f 74 65 20 6d 61 72 6b |ingle qu|ote mark|
|00004580| 73 2e 0d 0a 54 68 65 20 | 73 65 71 75 65 6e 63 65 |s...The |sequence|
|00004590| 20 7b 5c 74 74 20 5c 63 | 68 61 72 60 5c 5c 27 7d | {\tt \c|har`\\'}|
|000045a0| 0d 0a 69 73 20 61 76 61 | 69 6c 61 62 6c 65 20 74 |..is ava|ilable t|
|000045b0| 6f 20 70 72 6f 64 75 63 | 65 20 61 20 73 69 6e 67 |o produc|e a sing|
|000045c0| 6c 65 20 71 75 6f 74 65 | 20 69 6e 20 74 68 65 20 |le quote| in the |
|000045d0| 73 74 72 69 6e 67 20 69 | 74 73 65 6c 66 2e 0d 0a |string i|tself...|
|000045e0| 0d 0a 53 69 6e 67 6c 65 | 2d 71 75 6f 74 65 64 20 |..Single|-quoted |
|000045f0| 73 74 72 69 6e 67 73 20 | 64 6f 20 6e 6f 74 20 64 |strings |do not d|
|00004600| 69 73 70 6c 61 79 20 77 | 68 65 6e 20 65 76 61 6c |isplay w|hen eval|
|00004610| 75 61 74 65 64 3b 20 69 | 6e 73 74 65 61 64 2c 20 |uated; i|nstead, |
|00004620| 74 68 65 79 20 61 72 65 | 20 74 72 65 61 74 65 64 |they are| treated|
|00004630| 0d 0a 61 73 20 76 61 6c | 75 65 73 2e 20 20 43 65 |..as val|ues. Ce|
|00004640| 72 74 61 69 6e 20 62 75 | 69 6c 74 2d 69 6e 20 66 |rtain bu|ilt-in f|
|00004650| 75 6e 63 74 69 6f 6e 73 | 20 61 72 65 20 61 76 61 |unctions| are ava|
|00004660| 69 6c 61 62 6c 65 20 74 | 6f 20 6d 61 6e 69 70 75 |ilable t|o manipu|
|00004670| 6c 61 74 65 20 74 68 65 | 73 65 0d 0a 73 74 72 69 |late the|se..stri|
|00004680| 6e 67 73 2c 20 73 75 63 | 68 20 61 73 20 7b 5c 74 |ngs, suc|h as {\t|
|00004690| 74 20 73 61 79 7d 2c 20 | 77 68 69 63 68 20 64 69 |t say}, |which di|
|000046a0| 73 70 6c 61 79 73 20 73 | 75 63 68 20 61 20 73 74 |splays s|uch a st|
|000046b0| 72 69 6e 67 20 76 61 6c | 75 65 2e 0d 0a 0d 0a 4e |ring val|ue.....N|
|000046c0| 6f 74 65 20 61 6c 73 6f | 20 74 68 61 74 20 61 6c |ote also| that al|
|000046d0| 6c 20 5e 7b 76 6f 63 61 | 62 75 6c 61 72 79 7d 0d |l ^{voca|bulary}.|
|000046e0| 0a 77 6f 72 64 73 20 61 | 70 70 65 61 72 20 61 73 |.words a|ppear as|
|000046f0| 20 73 69 6e 67 6c 65 2d | 71 75 6f 74 65 64 20 73 | single-|quoted s|
|00004700| 74 72 69 6e 67 73 20 28 | 6f 72 20 6c 69 73 74 73 |trings (|or lists|
|00004710| 0d 0a 6f 66 20 73 69 6e | 67 6c 65 2d 71 75 6f 74 |..of sin|gle-quot|
|00004720| 65 64 20 73 74 72 69 6e | 67 73 29 2e 0d 0a 0d 0a |ed strin|gs).....|
|00004730| 5c 6d 69 6e 6f 72 73 65 | 63 74 69 6f 6e 7b 4c 69 |\minorse|ction{Li|
|00004740| 73 74 73 7d 0d 0a 0d 0a | 0d 0a 41 20 5e 7b 6c 69 |sts}....|..A ^{li|
|00004750| 73 74 7d 20 69 73 20 61 | 6e 20 61 67 67 72 65 67 |st} is a|n aggreg|
|00004760| 61 74 65 20 6f 66 20 6f | 74 68 65 72 20 64 61 74 |ate of o|ther dat|
|00004770| 61 20 69 74 65 6d 73 2e | 20 20 49 74 20 69 73 20 |a items.| It is |
|00004780| 65 6e 74 65 72 65 64 20 | 61 73 20 61 20 73 65 74 |entered |as a set|
|00004790| 20 6f 66 20 64 61 74 61 | 0d 0a 69 74 65 6d 73 20 | of data|..items |
|000047a0| 65 6e 63 6c 6f 73 65 64 | 20 69 6e 20 5e 7b 73 71 |enclosed| in ^{sq|
|000047b0| 75 61 72 65 20 62 72 61 | 63 6b 65 74 73 7d 20 28 |uare bra|ckets} (|
|000047c0| 6e 6f 74 65 20 74 68 61 | 74 20 74 68 65 73 65 20 |note tha|t these |
|000047d0| 73 71 75 61 72 65 20 62 | 72 61 63 6b 65 74 73 20 |square b|rackets |
|000047e0| 61 72 65 20 74 68 65 0d | 0a 61 63 74 75 61 6c 20 |are the.|.actual |
|000047f0| 70 75 6e 63 74 75 74 61 | 74 69 6f 6e 2c 20 6e 6f |punctuta|tion, no|
|00004800| 74 20 69 6e 64 69 63 61 | 74 6f 72 73 20 6f 66 20 |t indica|tors of |
|00004810| 6f 70 74 69 6f 6e 61 6c | 69 74 79 29 3a 0d 0a 0d |optional|ity):...|
|00004820| 0a 7b 5c 65 78 61 6d 70 | 6c 65 0d 0a 20 20 20 20 |.{\examp|le.. |
|00004830| 5b 20 7b 5c 69 74 20 64 | 61 74 61 2d 6c 69 73 74 |[ {\it d|ata-list|
|00004840| 7d 20 5d 0d 0a 7d 0d 0a | 0d 0a 41 20 7b 5c 69 74 |} ]..}..|..A {\it|
|00004850| 20 64 61 74 61 2d 6c 69 | 73 74 7d 20 63 61 6e 20 | data-li|st} can |
|00004860| 62 65 20 6e 6f 74 68 69 | 6e 67 20 61 74 20 61 6c |be nothi|ng at al|
|00004870| 6c 2c 20 69 6e 20 77 68 | 69 63 68 20 63 61 73 65 |l, in wh|ich case|
|00004880| 20 74 68 65 20 6c 69 73 | 74 0d 0a 69 73 20 65 6d | the lis|t..is em|
|00004890| 70 74 79 2c 20 61 73 20 | 69 6e 0d 0a 0d 0a 7b 5c |pty, as |in....{\|
|000048a0| 65 78 61 6d 70 6c 65 0d | 0a 20 20 20 20 5b 5d 0d |example.|. [].|
|000048b0| 0a 7d 0d 0a 0d 0a 4f 72 | 2c 20 69 74 20 63 61 6e |.}....Or|, it can|
|000048c0| 20 62 65 20 6f 6e 65 20 | 6f 72 20 6d 6f 72 65 20 | be one |or more |
|000048d0| 64 61 74 61 20 69 74 65 | 6d 73 20 28 6e 75 6d 62 |data ite|ms (numb|
|000048e0| 65 72 73 2c 20 73 74 72 | 69 6e 67 73 2c 20 6f 62 |ers, str|ings, ob|
|000048f0| 6a 65 63 74 73 2c 20 6c | 69 73 74 73 29 2e 0d 0a |jects, l|ists)...|
|00004900| 47 65 6e 65 72 61 6c 6c | 79 2c 20 69 74 20 69 73 |Generall|y, it is|
|00004910| 20 6f 6e 6c 79 20 75 73 | 65 66 75 6c 20 74 6f 0d | only us|eful to.|
|00004920| 0a 63 6f 6e 73 74 72 75 | 63 74 20 6c 69 73 74 73 |.constru|ct lists|
|00004930| 20 77 69 74 68 20 74 68 | 65 20 73 61 6d 65 20 64 | with th|e same d|
|00004940| 61 74 61 74 79 70 65 20 | 66 6f 72 20 61 6c 6c 20 |atatype |for all |
|00004950| 6d 65 6d 62 65 72 73 2c | 20 62 75 74 20 74 68 69 |members,| but thi|
|00004960| 73 20 69 73 20 6e 6f 74 | 0d 0a 72 65 71 75 69 72 |s is not|..requir|
|00004970| 65 64 20 62 79 20 74 68 | 65 20 6c 61 6e 67 75 61 |ed by th|e langua|
|00004980| 67 65 2e 0d 0a 0d 0a 45 | 78 61 6d 70 6c 65 73 20 |ge.....E|xamples |
|00004990| 6f 66 20 6c 69 73 74 73 | 3a 0d 0a 0d 0a 7b 5c 65 |of lists|:....{\e|
|000049a0| 78 61 6d 70 6c 65 0d 0a | 20 20 20 20 5b 20 31 20 |xample..| [ 1 |
|000049b0| 32 20 33 20 5d 0d 0a 20 | 20 20 20 5b 20 27 68 65 |2 3 ].. | [ 'he|
|000049c0| 6c 6c 6f 27 20 27 67 6f | 6f 64 62 79 65 27 20 5d |llo' 'go|odbye' ]|
|000049d0| 0d 0a 20 20 20 20 5b 20 | 5b 31 20 32 20 33 5d 20 |.. [ |[1 2 3] |
|000049e0| 5b 34 20 35 20 36 5d 20 | 5b 37 20 38 20 39 5d 20 |[4 5 6] |[7 8 9] |
|000049f0| 5d 0d 0a 20 20 20 20 5b | 20 76 61 73 65 20 67 6f |].. [| vase go|
|00004a00| 6c 64 53 6b 75 6c 6c 20 | 70 65 64 65 73 74 61 6c |ldSkull |pedestal|
|00004a10| 20 5d 0d 0a 7d 0d 0a 0d | 0a 4c 69 73 74 20 65 6c | ]..}...|.List el|
|00004a20| 65 6d 65 6e 74 73 20 6e | 65 65 64 20 6e 6f 74 20 |ements n|eed not |
|00004a30| 62 65 20 63 6f 6e 73 74 | 61 6e 74 73 2c 20 75 6e |be const|ants, un|
|00004a40| 6c 65 73 73 20 74 68 65 | 20 65 6e 74 69 72 65 20 |less the| entire |
|00004a50| 6c 69 73 74 20 6e 65 65 | 64 73 20 74 6f 0d 0a 62 |list nee|ds to..b|
|00004a60| 65 20 61 20 63 6f 6e 73 | 74 61 6e 74 2e 20 20 46 |e a cons|tant. F|
|00004a70| 6f 72 20 65 78 61 6d 70 | 6c 65 2c 20 61 20 6c 69 |or examp|le, a li|
|00004a80| 73 74 20 75 73 65 64 20 | 61 73 20 61 20 70 72 6f |st used |as a pro|
|00004a90| 70 65 72 74 79 20 76 61 | 6c 75 65 20 6d 75 73 74 |perty va|lue must|
|00004aa0| 20 62 65 0d 0a 61 20 63 | 6f 6e 73 74 61 6e 74 2c | be..a c|onstant,|
|00004ab0| 20 73 6f 20 61 6c 6c 20 | 6f 66 20 74 68 65 20 65 | so all |of the e|
|00004ac0| 6c 65 6d 65 6e 74 73 20 | 6d 75 73 74 20 62 65 20 |lements |must be |
|00004ad0| 63 6f 6e 73 74 61 6e 74 | 73 20 28 68 65 6e 63 65 |constant|s (hence|
|00004ae0| 2c 20 6c 6f 63 61 6c 0d | 0a 76 61 72 69 61 62 6c |, local.|.variabl|
|00004af0| 65 73 20 61 6e 64 20 6e | 6f 6e 2d 63 6f 6e 73 74 |es and n|on-const|
|00004b00| 61 6e 74 20 65 78 70 72 | 65 73 73 69 6f 6e 73 20 |ant expr|essions |
|00004b10| 63 61 6e 6e 6f 74 20 62 | 65 20 75 73 65 64 29 2e |cannot b|e used).|
|00004b20| 20 20 48 6f 77 65 76 65 | 72 2c 20 61 0d 0a 6c 69 | Howeve|r, a..li|
|00004b30| 73 74 20 75 73 65 64 20 | 69 6e 20 63 6f 64 65 2c |st used |in code,|
|00004b40| 20 73 75 63 68 20 61 73 | 20 61 20 6c 69 73 74 20 | such as| a list |
|00004b50| 61 73 73 69 67 6e 65 64 | 20 74 6f 20 61 20 6c 6f |assigned| to a lo|
|00004b60| 63 61 6c 20 76 61 72 69 | 61 62 6c 65 2c 20 63 61 |cal vari|able, ca|
|00004b70| 6e 0d 0a 63 6f 6e 74 61 | 69 6e 20 6e 6f 6e 2d 63 |n..conta|in non-c|
|00004b80| 6f 6e 73 74 61 6e 74 20 | 65 78 70 72 65 73 73 69 |onstant |expressi|
|00004b90| 6f 6e 73 20 77 69 74 68 | 69 6e 20 74 68 65 20 6c |ons with|in the l|
|00004ba0| 69 73 74 20 65 6c 65 6d | 65 6e 74 73 2e 20 20 46 |ist elem|ents. F|
|00004bb0| 6f 72 20 65 78 61 6d 70 | 6c 65 2c 0d 0a 74 68 65 |or examp|le,..the|
|00004bc0| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 66 75 6e 63 74 | followi|ng funct|
|00004bd0| 69 6f 6e 20 64 79 6e 61 | 6d 69 63 61 6c 6c 79 20 |ion dyna|mically |
|00004be0| 63 6f 6e 73 74 72 75 63 | 74 73 20 61 20 6c 69 73 |construc|ts a lis|
|00004bf0| 74 20 66 72 6f 6d 20 74 | 68 72 65 65 0d 0a 65 78 |t from t|hree..ex|
|00004c00| 70 72 65 73 73 69 6f 6e | 73 3a 0d 0a 0d 0a 7b 5c |pression|s:....{\|
|00004c10| 65 78 61 6d 70 6c 65 0d | 0a 66 3a 20 66 75 6e 63 |example.|.f: func|
|00004c20| 74 69 6f 6e 28 78 2c 20 | 79 2c 20 7a 29 0d 0a 5c |tion(x, |y, z)..\|
|00004c30| 6c 62 0d 0a 20 20 20 20 | 72 65 74 75 72 6e 28 5b |lb.. |return([|
|00004c40| 78 2b 31 20 79 2b 31 20 | 7a 2b 31 5d 29 3b 0d 0a |x+1 y+1 |z+1]);..|
|00004c50| 5c 72 62 0d 0a 7d 0d 0a | 0d 0a 54 68 65 20 6e 6f |\rb..}..|..The no|
|00004c60| 6e 2d 63 6f 6e 73 74 61 | 6e 74 20 6c 69 73 74 20 |n-consta|nt list |
|00004c70| 65 6c 65 6d 65 6e 74 73 | 20 61 72 65 20 6c 65 67 |elements| are leg|
|00004c80| 61 6c 20 62 65 63 61 75 | 73 65 20 74 68 65 20 6c |al becau|se the l|
|00004c90| 69 73 74 20 63 6f 6e 73 | 74 72 75 63 74 69 6f 6e |ist cons|truction|
|00004ca0| 0d 0a 61 70 70 65 61 72 | 73 20 69 6e 20 63 6f 64 |..appear|s in cod|
|00004cb0| 65 2e 20 20 4e 6f 74 65 | 20 74 68 61 74 20 74 68 |e. Note| that th|
|00004cc0| 65 20 72 6f 75 74 69 6e | 65 20 61 62 6f 76 65 20 |e routin|e above |
|00004cd0| 68 61 73 20 74 68 65 20 | 73 61 6d 65 20 65 66 66 |has the |same eff|
|00004ce0| 65 63 74 20 61 73 0d 0a | 74 68 69 73 20 63 6f 64 |ect as..|this cod|
|00004cf0| 65 3a 0d 0a 0d 0a 7b 5c | 65 78 61 6d 70 6c 65 0d |e:....{\|example.|
|00004d00| 0a 66 3a 20 66 75 6e 63 | 74 69 6f 6e 28 78 2c 20 |.f: func|tion(x, |
|00004d10| 79 2c 20 7a 29 0d 0a 5c | 6c 62 0d 0a 20 20 20 20 |y, z)..\|lb.. |
|00004d20| 72 65 74 75 72 6e 28 28 | 28 5b 5d 20 2b 20 28 78 |return((|([] + (x|
|00004d30| 2b 31 29 29 20 2b 20 28 | 79 2b 31 29 29 20 2b 20 |+1)) + (|y+1)) + |
|00004d40| 28 7a 2b 31 29 29 3b 0d | 0a 5c 72 62 0d 0a 7d 0d |(z+1));.|.\rb..}.|
|00004d50| 0a 0d 0a 54 68 65 20 73 | 65 63 6f 6e 64 20 65 78 |...The s|econd ex|
|00004d60| 61 6d 70 6c 65 20 73 74 | 61 72 74 73 20 77 69 74 |ample st|arts wit|
|00004d70| 68 20 61 6e 20 65 6d 70 | 74 79 20 6c 69 73 74 2c |h an emp|ty list,|
|00004d80| 20 74 68 65 6e 20 61 64 | 64 73 20 61 6e 20 65 6c | then ad|ds an el|
|00004d90| 65 6d 65 6e 74 0d 0a 77 | 68 6f 73 65 20 76 61 6c |ement..w|hose val|
|00004da0| 75 65 20 69 73 20 7b 5c | 74 74 20 28 78 2b 31 29 |ue is {\|tt (x+1)|
|00004db0| 7d 2c 20 74 68 65 6e 20 | 61 64 64 73 20 61 20 73 |}, then |adds a s|
|00004dc0| 65 63 6f 6e 64 20 65 6c | 65 6d 65 6e 74 20 77 68 |econd el|ement wh|
|00004dd0| 6f 73 65 20 76 61 6c 75 | 65 20 69 73 0d 0a 7b 5c |ose valu|e is..{\|
|00004de0| 74 74 20 28 79 2b 31 29 | 7d 2c 20 61 6e 64 20 73 |tt (y+1)|}, and s|
|00004df0| 6f 20 6f 6e 2e 20 20 54 | 68 65 20 74 77 6f 20 65 |o on. T|he two e|
|00004e00| 78 61 6d 70 6c 65 73 20 | 63 6f 6e 73 74 72 75 63 |xamples |construc|
|00004e10| 74 20 65 78 61 63 74 6c | 79 20 74 68 65 20 73 61 |t exactl|y the sa|
|00004e20| 6d 65 0d 0a 6c 69 73 74 | 2e 20 20 48 6f 77 65 76 |me..list|. Howev|
|00004e30| 65 72 2c 20 79 6f 75 20 | 73 68 6f 75 6c 64 20 75 |er, you |should u|
|00004e40| 73 65 20 74 68 65 20 66 | 69 72 73 74 20 63 6f 6e |se the f|irst con|
|00004e50| 73 74 72 75 63 74 20 77 | 68 65 72 65 20 70 6f 73 |struct w|here pos|
|00004e60| 73 69 62 6c 65 2c 0d 0a | 62 65 63 61 75 73 65 20 |sible,..|because |
|00004e70| 69 74 20 69 73 20 6d 75 | 63 68 20 6d 6f 72 65 20 |it is mu|ch more |
|00004e80| 65 66 66 69 63 69 65 6e | 74 3a 20 20 74 68 65 20 |efficien|t: the |
|00004e90| 66 69 72 73 74 20 65 78 | 61 6d 70 6c 65 20 63 6f |first ex|ample co|
|00004ea0| 6e 73 74 72 75 63 74 73 | 0d 0a 6f 6e 6c 79 20 61 |nstructs|..only a|
|00004eb0| 20 73 69 6e 67 6c 65 20 | 6c 69 73 74 2c 20 77 68 | single |list, wh|
|00004ec0| 65 72 65 61 73 20 74 68 | 65 20 73 65 63 6f 6e 64 |ereas th|e second|
|00004ed0| 20 6d 75 73 74 20 63 6f | 6e 73 74 72 75 63 74 20 | must co|nstruct |
|00004ee0| 7b 5c 69 74 20 66 6f 75 | 72 7d 0d 0a 6c 69 73 74 |{\it fou|r}..list|
|00004ef0| 73 2c 20 6f 6e 65 20 61 | 74 20 61 20 74 69 6d 65 |s, one a|t a time|
|00004f00| 2e 20 20 54 68 65 20 66 | 69 72 73 74 20 65 78 61 |. The f|irst exa|
|00004f10| 6d 70 6c 65 20 69 73 20 | 66 61 73 74 65 72 20 61 |mple is |faster a|
|00004f20| 6e 64 20 63 6f 6e 73 75 | 6d 65 73 0d 0a 6c 65 73 |nd consu|mes..les|
|00004f30| 73 20 6d 65 6d 6f 72 79 | 20 61 74 20 65 78 65 63 |s memory| at exec|
|00004f40| 75 74 69 6f 6e 20 74 69 | 6d 65 2e 0d 0a 0d 0a 5c |ution ti|me.....\|
|00004f50| 6d 69 6e 6f 72 73 65 63 | 74 69 6f 6e 7b 6e 69 6c |minorsec|tion{nil|
|00004f60| 20 61 6e 64 20 74 72 75 | 65 7d 0d 0a 0d 0a 0d 0a | and tru|e}......|
|00004f70| 54 77 6f 20 73 70 65 63 | 69 61 6c 20 64 61 74 61 |Two spec|ial data|
|00004f80| 74 79 70 65 73 2c 20 7b | 5c 74 74 20 5e 7b 6e 69 |types, {|\tt ^{ni|
|00004f90| 6c 7d 7d 20 61 6e 64 20 | 7b 5c 74 74 20 5e 7b 74 |l}} and |{\tt ^{t|
|00004fa0| 72 75 65 7d 7d 2c 0d 0a | 61 72 65 20 70 72 65 2d |rue}},..|are pre-|
|00004fb0| 64 65 66 69 6e 65 64 2e | 20 20 54 68 65 73 65 20 |defined.| These |
|00004fc0| 61 72 65 20 67 65 6e 65 | 72 61 6c 6c 79 20 75 73 |are gene|rally us|
|00004fd0| 65 64 20 61 73 20 60 60 | 74 72 75 74 68 0d 0a 76 |ed as ``|truth..v|
|00004fe0| 61 6c 75 65 73 22 3b 20 | 7b 5c 74 74 20 6e 69 6c |alues"; |{\tt nil|
|00004ff0| 7d 20 6d 65 61 6e 73 20 | 66 61 6c 73 65 20 61 6e |} means |false an|
|00005000| 64 20 7b 5c 74 74 20 74 | 72 75 65 7d 20 6d 65 61 |d {\tt t|rue} mea|
|00005010| 6e 73 20 74 72 75 65 2e | 20 20 46 6f 72 20 65 78 |ns true.| For ex|
|00005020| 61 6d 70 6c 65 2c 0d 0a | 7b 5c 74 74 20 31 20 3e |ample,..|{\tt 1 >|
|00005030| 20 33 7d 20 65 76 61 6c | 75 61 74 65 73 20 74 6f | 3} eval|uates to|
|00005040| 20 7b 5c 74 74 20 6e 69 | 6c 7d 2c 20 77 68 65 72 | {\tt ni|l}, wher|
|00005050| 65 61 73 20 7b 5c 74 74 | 20 31 20 3c 20 33 7d 20 |eas {\tt| 1 < 3} |
|00005060| 69 73 20 7b 5c 74 74 20 | 74 72 75 65 7d 2e 0d 0a |is {\tt |true}...|
|00005070| 49 6e 20 61 64 64 69 74 | 69 6f 6e 2c 20 7b 5c 74 |In addit|ion, {\t|
|00005080| 74 20 6e 69 6c 7d 20 6d | 65 61 6e 73 20 74 68 65 |t nil} m|eans the|
|00005090| 20 61 62 73 65 6e 63 65 | 20 6f 66 0d 0a 61 20 76 | absence| of..a v|
|000050a0| 61 6c 75 65 3b 20 74 61 | 6b 69 6e 67 20 74 68 65 |alue; ta|king the|
|000050b0| 20 7b 5c 74 74 20 63 61 | 72 7d 20 6f 66 20 61 6e | {\tt ca|r} of an|
|000050c0| 20 65 6d 70 74 79 20 6c | 69 73 74 20 72 65 74 75 | empty l|ist retu|
|000050d0| 72 6e 73 20 7b 5c 74 74 | 20 6e 69 6c 7d 2c 20 61 |rns {\tt| nil}, a|
|000050e0| 73 20 64 6f 65 73 0d 0a | 65 76 61 6c 75 61 74 69 |s does..|evaluati|
|000050f0| 6e 67 20 61 20 70 72 6f | 70 65 72 74 79 20 6f 66 |ng a pro|perty of|
|00005100| 20 61 6e 20 6f 62 6a 65 | 63 74 20 77 68 65 6e 20 | an obje|ct when |
|00005110| 74 68 65 20 70 72 6f 70 | 65 72 74 79 20 69 73 20 |the prop|erty is |
|00005120| 6e 65 69 74 68 65 72 20 | 64 65 66 69 6e 65 64 0d |neither |defined.|
|00005130| 0a 6e 6f 72 20 69 6e 68 | 65 72 69 74 65 64 20 62 |.nor inh|erited b|
|00005140| 79 20 74 68 65 20 6f 62 | 6a 65 63 74 2e 0d 0a 0d |y the ob|ject....|
|00005150| 0a 46 6f 72 20 74 72 75 | 74 68 20 76 61 6c 75 65 |.For tru|th value|
|00005160| 73 2c 20 79 6f 75 20 73 | 68 6f 75 6c 64 20 75 73 |s, you s|hould us|
|00005170| 65 20 7b 5c 74 74 20 6e | 69 6c 7d 20 61 6e 64 20 |e {\tt n|il} and |
|00005180| 7b 5c 74 74 20 74 72 75 | 65 7d 20 72 61 74 68 65 |{\tt tru|e} rathe|
|00005190| 72 20 74 68 61 6e 0d 0a | 6e 75 6d 65 72 69 63 20 |r than..|numeric |
|000051a0| 65 71 75 69 76 61 6c 65 | 6e 74 73 2c 20 73 69 6e |equivale|nts, sin|
|000051b0| 63 65 20 7b 5c 74 74 20 | 6e 69 6c 7d 20 61 6e 64 |ce {\tt |nil} and|
|000051c0| 20 7b 5c 74 74 20 74 72 | 75 65 7d 20 70 72 6f 76 | {\tt tr|ue} prov|
|000051d0| 69 64 65 20 6d 75 63 68 | 20 6d 6f 72 65 20 65 78 |ide much| more ex|
|000051e0| 70 6c 69 63 69 74 0d 0a | 73 65 6c 66 2d 64 6f 63 |plicit..|self-doc|
|000051f0| 75 6d 65 6e 74 61 74 69 | 6f 6e 20 6f 66 20 79 6f |umentati|on of yo|
|00005200| 75 72 20 70 72 6f 67 72 | 61 6d 2e 0d 0a 0d 0a 5c |ur progr|am.....\|
|00005210| 6d 69 6e 6f 72 73 65 63 | 74 69 6f 6e 7b 45 78 70 |minorsec|tion{Exp|
|00005220| 72 65 73 73 69 6f 6e 73 | 7d 0d 0a 0d 0a 41 20 70 |ressions|}....A p|
|00005230| 72 6f 70 65 72 74 79 20 | 64 65 66 69 6e 69 74 69 |roperty |definiti|
|00005240| 6f 6e 20 63 61 6e 20 63 | 6f 6e 74 61 69 6e 20 61 |on can c|ontain a|
|00005250| 6e 20 5e 7b 65 78 70 72 | 65 73 73 69 6f 6e 7d 20 |n ^{expr|ession} |
|00005260| 72 61 74 68 65 72 20 74 | 68 61 6e 20 61 20 73 69 |rather t|han a si|
|00005270| 6d 70 6c 65 0d 0a 63 6f | 6e 73 74 61 6e 74 2e 20 |mple..co|nstant. |
|00005280| 20 57 68 65 6e 20 61 20 | 70 72 6f 70 65 72 74 79 | When a |property|
|00005290| 20 76 61 6c 75 65 20 69 | 73 20 61 6e 20 65 78 70 | value i|s an exp|
|000052a0| 72 65 73 73 69 6f 6e 2c | 20 74 68 65 20 65 78 70 |ression,| the exp|
|000052b0| 72 65 73 73 69 6f 6e 20 | 6d 75 73 74 20 62 65 0d |ression |must be.|
|000052c0| 0a 65 6e 63 6c 6f 73 65 | 64 20 69 6e 20 70 61 72 |.enclose|d in par|
|000052d0| 65 6e 74 68 65 73 65 73 | 2e 20 20 54 68 65 20 65 |entheses|. The e|
|000052e0| 78 70 72 65 73 73 69 6f | 6e 20 69 73 20 65 76 61 |xpressio|n is eva|
|000052f0| 6c 75 61 74 65 64 20 65 | 61 63 68 20 74 69 6d 65 |luated e|ach time|
|00005300| 20 74 68 65 20 70 72 6f | 70 65 72 74 79 0d 0a 69 | the pro|perty..i|
|00005310| 73 20 65 76 61 6c 75 61 | 74 65 64 2e 20 20 41 6e |s evalua|ted. An|
|00005320| 20 65 78 61 6d 70 6c 65 | 20 6f 66 20 75 73 69 6e | example| of usin|
|00005330| 67 20 61 6e 20 65 78 70 | 72 65 73 73 69 6f 6e 20 |g an exp|ression |
|00005340| 66 6f 72 20 61 20 70 72 | 6f 70 65 72 74 79 20 76 |for a pr|operty v|
|00005350| 61 6c 75 65 3a 0d 0a 0d | 0a 7b 5c 65 78 61 6d 70 |alue:...|.{\examp|
|00005360| 6c 65 0d 0a 20 20 20 20 | 5c 6f 62 6a 65 63 74 7b |le.. |\object{|
|00005370| 65 78 70 72 4f 62 6a 3a | 20 6f 62 6a 65 63 74 7d |exprObj:| object}|
|00005380| 0d 0a 20 20 20 20 20 20 | 20 20 78 20 3d 20 31 0d |.. | x = 1.|
|00005390| 0a 09 79 20 3d 20 32 0d | 0a 09 7a 20 3d 20 28 73 |..y = 2.|..z = (s|
|000053a0| 65 6c 66 2e 78 20 2b 20 | 73 65 6c 66 2e 79 29 0d |elf.x + |self.y).|
|000053b0| 0a 20 20 20 20 5c 65 6e | 64 6f 62 6a 0d 0a 7d 0d |. \en|dobj..}.|
|000053c0| 0a 0d 0a 57 68 65 6e 65 | 76 65 72 20 7b 5c 74 74 |...Whene|ver {\tt|
|000053d0| 20 65 78 70 72 4f 62 6a | 2e 7a 7d 20 69 73 20 65 | exprObj|.z} is e|
|000053e0| 76 61 6c 75 61 74 65 64 | 2c 20 74 68 65 20 73 75 |valuated|, the su|
|000053f0| 6d 20 6f 66 20 74 68 65 | 20 63 75 72 72 65 6e 74 |m of the| current|
|00005400| 0d 0a 76 61 6c 75 65 73 | 20 6f 66 20 7b 5c 74 74 |..values| of {\tt|
|00005410| 20 65 78 70 72 4f 62 6a | 2e 79 7d 20 61 6e 64 20 | exprObj|.y} and |
|00005420| 7b 5c 74 74 20 65 78 70 | 72 4f 62 6a 2e 7a 7d 20 |{\tt exp|rObj.z} |
|00005430| 69 73 20 72 65 74 75 72 | 6e 65 64 2e 0d 0a 0d 0a |is retur|ned.....|
|00005440| 4e 6f 74 65 20 74 68 61 | 74 20 61 20 70 72 6f 70 |Note tha|t a prop|
|00005450| 65 72 74 79 20 64 65 66 | 69 6e 65 64 20 69 6e 20 |erty def|ined in |
|00005460| 74 68 69 73 20 6d 61 6e | 6e 65 72 20 63 61 6e 20 |this man|ner can |
|00005470| 74 61 6b 65 20 70 61 72 | 61 6d 65 74 65 72 73 2c |take par|ameters,|
|00005480| 20 6a 75 73 74 20 6c 69 | 6b 65 0d 0a 6d 65 74 68 | just li|ke..meth|
|00005490| 6f 64 73 20 28 64 65 73 | 63 72 69 62 65 64 20 62 |ods (des|cribed b|
|000054a0| 65 6c 6f 77 29 2e 20 20 | 46 6f 72 20 65 78 61 6d |elow). |For exam|
|000054b0| 70 6c 65 3a 0d 0a 0d 0a | 7b 5c 65 78 61 6d 70 6c |ple:....|{\exampl|
|000054c0| 65 0d 0a 20 20 20 20 5c | 6f 62 6a 65 63 74 7b 65 |e.. \|object{e|
|000054d0| 78 70 72 4f 62 6a 32 3a | 20 6f 62 6a 65 63 74 7d |xprObj2:| object}|
|000054e0| 0d 0a 20 20 20 20 20 20 | 20 20 77 28 61 2c 20 62 |.. | w(a, b|
|000054f0| 29 20 3d 20 28 61 20 2a | 20 62 29 0d 0a 20 20 20 |) = (a *| b).. |
|00005500| 20 5c 65 6e 64 6f 62 6a | 0d 0a 7d 0d 0a 0d 0a 57 | \endobj|..}....W|
|00005510| 68 65 6e 20 7b 5c 74 74 | 20 65 78 70 72 4f 62 6a |hen {\tt| exprObj|
|00005520| 32 2e 77 7d 20 69 73 20 | 65 76 61 6c 75 61 74 65 |2.w} is |evaluate|
|00005530| 64 2c 20 69 74 20 72 65 | 71 75 69 72 65 73 20 74 |d, it re|quires t|
|00005540| 77 6f 20 70 61 72 61 6d | 65 74 65 72 73 2c 20 77 |wo param|eters, w|
|00005550| 68 69 63 68 20 61 72 65 | 0d 0a 6d 75 6c 74 69 70 |hich are|..multip|
|00005560| 6c 69 65 64 20 74 6f 67 | 65 74 68 65 72 20 74 6f |lied tog|ether to|
|00005570| 20 67 69 76 65 20 74 68 | 65 20 76 61 6c 75 65 20 | give th|e value |
|00005580| 6f 66 20 74 68 65 20 70 | 72 6f 70 65 72 74 79 2e |of the p|roperty.|
|00005590| 20 20 46 6f 72 20 65 78 | 61 6d 70 6c 65 2c 0d 0a | For ex|ample,..|
|000055a0| 65 76 61 6c 75 61 74 69 | 6e 67 20 7b 5c 74 74 20 |evaluati|ng {\tt |
|000055b0| 65 78 70 72 4f 62 6a 32 | 2e 77 28 33 2c 20 34 29 |exprObj2|.w(3, 4)|
|000055c0| 7d 20 70 72 6f 64 75 63 | 65 73 20 61 20 76 61 6c |} produc|es a val|
|000055d0| 75 65 20 6f 66 20 7b 5c | 74 74 20 31 32 7d 2e 0d |ue of {\|tt 12}..|
|000055e0| 0a 0d 0a 4e 6f 74 65 20 | 74 68 61 74 20 74 68 65 |...Note |that the|
|000055f0| 20 70 72 6f 70 65 72 74 | 79 20 7b 5c 74 74 20 7a | propert|y {\tt z|
|00005600| 7d 20 61 62 6f 76 65 20 | 63 6f 75 6c 64 20 68 61 |} above |could ha|
|00005610| 76 65 20 62 65 65 6e 20 | 77 72 69 74 74 65 6e 20 |ve been |written |
|00005620| 77 69 74 68 6f 75 74 0d | 0a 74 68 65 20 60 60 7b |without.|.the ``{|
|00005630| 5c 74 74 20 73 65 6c 66 | 2e 7d 27 27 20 70 72 65 |\tt self|.}'' pre|
|00005640| 66 69 78 20 6f 6e 20 7b | 5c 74 74 20 78 7d 20 61 |fix on {|\tt x} a|
|00005650| 6e 64 20 7b 5c 74 74 20 | 79 7d 3a 0d 0a 0d 0a 7b |nd {\tt |y}:....{|
|00005660| 5c 65 78 61 6d 70 6c 65 | 0d 0a 20 20 20 20 7a 20 |\example|.. z |
|00005670| 3d 20 28 78 20 2b 20 79 | 29 0d 0a 7d 0d 0a 0d 0a |= (x + y|)..}....|
|00005680| 54 68 69 73 20 69 73 20 | 62 65 63 61 75 73 65 20 |This is |because |
|00005690| 70 72 6f 70 65 72 74 69 | 65 73 2c 20 69 66 20 75 |properti|es, if u|
|000056a0| 73 65 64 20 77 69 74 68 | 6f 75 74 20 61 6e 20 6f |sed with|out an o|
|000056b0| 62 6a 65 63 74 20 6e 61 | 6d 65 2c 20 61 72 65 0d |bject na|me, are.|
|000056c0| 0a 61 73 73 75 6d 65 64 | 20 74 6f 20 62 65 6c 6f |.assumed| to belo|
|000056d0| 6e 67 20 74 6f 20 74 68 | 65 20 63 75 72 72 65 6e |ng to th|e curren|
|000056e0| 74 20 7b 5c 74 74 20 73 | 65 6c 66 7d 20 6f 62 6a |t {\tt s|elf} obj|
|000056f0| 65 63 74 2e 0d 0a 0d 0a | 5c 6d 69 6e 6f 72 73 65 |ect.....|\minorse|
|00005700| 63 74 69 6f 6e 7b 4d 65 | 74 68 6f 64 73 7d 0d 0a |ction{Me|thods}..|
|00005710| 0d 0a 43 6f 64 65 20 63 | 61 6e 20 62 65 20 75 73 |..Code c|an be us|
|00005720| 65 64 20 69 6e 20 61 20 | 70 72 6f 70 65 72 74 79 |ed in a |property|
|00005730| 20 64 65 66 69 6e 69 74 | 69 6f 6e 20 6a 75 73 74 | definit|ion just|
|00005740| 20 6c 69 6b 65 20 61 6e | 79 20 6f 74 68 65 72 20 | like an|y other |
|00005750| 64 61 74 61 74 79 70 65 | 3b 0d 0a 77 68 65 6e 20 |datatype|;..when |
|00005760| 79 6f 75 20 61 73 73 6f | 63 69 61 74 65 20 63 6f |you asso|ciate co|
|00005770| 64 65 20 77 69 74 68 20 | 61 6e 20 6f 62 6a 65 63 |de with |an objec|
|00005780| 74 2c 20 74 68 65 20 63 | 6f 64 65 20 69 73 20 63 |t, the c|ode is c|
|00005790| 61 6c 6c 65 64 20 61 20 | 7b 5c 73 6c 20 5e 7b 6d |alled a |{\sl ^{m|
|000057a0| 65 74 68 6f 64 7d 7d 2e | 20 20 0d 0a 57 68 65 6e |ethod}}.| ..When|
|000057b0| 0d 0a 74 68 65 20 6d 65 | 74 68 6f 64 20 69 73 20 |..the me|thod is |
|000057c0| 65 76 61 6c 75 61 74 65 | 64 2c 20 74 68 65 20 63 |evaluate|d, the c|
|000057d0| 6f 64 65 20 69 73 20 65 | 78 65 63 75 74 65 64 3b |ode is e|xecuted;|
|000057e0| 20 74 68 65 20 72 65 74 | 75 72 6e 20 76 61 6c 75 | the ret|urn valu|
|000057f0| 65 20 69 73 20 74 68 65 | 20 76 61 6c 75 65 0d 0a |e is the| value..|
|00005800| 6f 66 20 74 68 65 20 6d | 65 74 68 6f 64 2c 20 62 |of the m|ethod, b|
|00005810| 75 74 20 6f 66 74 65 6e | 20 69 74 20 69 73 20 75 |ut often| it is u|
|00005820| 73 65 66 75 6c 20 66 6f | 72 20 74 68 65 20 63 6f |seful fo|r the co|
|00005830| 64 65 20 74 6f 20 70 72 | 6f 64 75 63 65 20 73 69 |de to pr|oduce si|
|00005840| 64 65 0d 0a 65 66 66 65 | 63 74 73 20 61 73 20 77 |de..effe|cts as w|
|00005850| 65 6c 6c 2e 0d 0a 0d 0a | 4d 65 74 68 6f 64 20 63 |ell.....|Method c|
|00005860| 6f 64 65 20 69 73 20 65 | 6e 63 6c 6f 73 65 64 20 |ode is e|nclosed |
|00005870| 69 6e 20 5e 7b 62 72 61 | 63 65 73 7d 2c 20 7b 5c |in ^{bra|ces}, {\|
|00005880| 74 74 20 24 5c 7b 24 7d | 20 61 6e 64 20 7b 5c 74 |tt $\{$}| and {\t|
|00005890| 74 20 24 5c 7d 24 7d 2e | 0d 0a 41 6e 79 74 68 69 |t $\}$}.|..Anythi|
|000058a0| 6e 67 20 76 61 6c 69 64 | 20 69 6e 20 61 20 5e 7b |ng valid| in a ^{|
|000058b0| 66 75 6e 63 74 69 6f 6e | 7d 20 6d 61 79 20 61 70 |function|} may ap|
|000058c0| 70 65 61 72 0d 0a 69 6e | 20 63 6f 64 65 20 61 73 |pear..in| code as|
|000058d0| 73 6f 63 69 61 74 65 64 | 20 77 69 74 68 20 61 20 |sociated| with a |
|000058e0| 6d 65 74 68 6f 64 2e 20 | 20 54 68 65 20 6d 65 74 |method. | The met|
|000058f0| 68 6f 64 20 6d 61 79 20 | 68 61 76 65 20 5e 7b 6c |hod may |have ^{l|
|00005900| 6f 63 61 6c 7d 0d 0a 76 | 61 72 69 61 62 6c 65 73 |ocal}..v|ariables|
|00005910| 2c 20 61 6e 64 20 69 74 | 20 63 61 6e 20 72 65 63 |, and it| can rec|
|00005920| 65 69 76 65 20 5e 7b 61 | 72 67 75 6d 65 6e 74 73 |eive ^{a|rguments|
|00005930| 7d 2e 20 20 49 66 20 74 | 68 65 20 6d 65 74 68 6f |}. If t|he metho|
|00005940| 64 20 68 61 73 20 61 72 | 67 75 6d 65 6e 74 73 2c |d has ar|guments,|
|00005950| 20 74 68 65 0d 0a 61 72 | 67 75 6d 65 6e 74 20 6c | the..ar|gument l|
|00005960| 69 73 74 20 28 77 68 69 | 63 68 20 69 73 20 69 64 |ist (whi|ch is id|
|00005970| 65 6e 74 69 63 61 6c 20 | 74 6f 20 61 20 66 75 6e |entical |to a fun|
|00005980| 63 74 69 6f 6e 27 73 20 | 61 72 67 75 6d 65 6e 74 |ction's |argument|
|00005990| 20 6c 69 73 74 29 20 61 | 70 70 65 61 72 73 0d 0a | list) a|ppears..|
|000059a0| 61 66 74 65 72 20 74 68 | 65 20 6d 65 74 68 6f 64 |after th|e method|
|000059b0| 20 6e 61 6d 65 2e 20 20 | 46 6f 72 20 65 78 61 6d | name. |For exam|
|000059c0| 70 6c 65 3a 0d 0a 0d 0a | 7b 5c 65 78 61 6d 70 6c |ple:....|{\exampl|
|000059d0| 65 0d 0a 20 20 20 20 5c | 6f 62 6a 65 63 74 7b 6f |e.. \|object{o|
|000059e0| 62 6a 31 3a 20 6f 62 6a | 65 63 74 7d 0d 0a 20 20 |bj1: obj|ect}.. |
|000059f0| 20 20 20 20 20 20 66 28 | 78 29 20 3d 20 0d 0a 09 | f(|x) = ...|
|00005a00| 5c 6c 62 0d 0a 09 20 20 | 20 20 72 65 74 75 72 6e |\lb... | return|
|00005a10| 28 78 20 2b 20 31 29 3b | 0d 0a 09 5c 72 62 0d 0a |(x + 1);|...\rb..|
|00005a20| 20 20 20 20 5c 65 6e 64 | 6f 62 6a 0d 0a 7d 0d 0a | \end|obj..}..|
|00005a30| 0d 0a 57 68 65 6e 20 73 | 75 63 68 20 61 20 6d 65 |..When s|uch a me|
|00005a40| 74 68 6f 64 20 69 73 20 | 65 76 61 6c 75 61 74 65 |thod is |evaluate|
|00005a50| 64 2c 20 74 68 65 20 61 | 72 67 75 6d 65 6e 74 20 |d, the a|rgument |
|00005a60| 6c 69 73 74 20 69 73 20 | 73 70 65 63 69 66 69 65 |list is |specifie|
|00005a70| 64 20 61 66 74 65 72 20 | 74 68 65 0d 0a 6d 65 74 |d after |the..met|
|00005a80| 68 6f 64 20 6e 61 6d 65 | 2c 20 61 73 20 69 6e 3a |hod name|, as in:|
|00005a90| 0d 0a 0d 0a 7b 5c 65 78 | 61 6d 70 6c 65 0d 0a 20 |....{\ex|ample.. |
|00005aa0| 20 20 20 66 31 3a 20 66 | 75 6e 63 74 69 6f 6e 0d | f1: f|unction.|
|00005ab0| 0a 20 20 20 20 5c 6c 62 | 0d 0a 20 20 20 20 20 20 |. \lb|.. |
|00005ac0| 20 20 73 61 79 28 6f 62 | 6a 31 2e 66 28 31 32 33 | say(ob|j1.f(123|
|00005ad0| 29 29 3b 0d 0a 20 20 20 | 20 5c 72 62 0d 0a 7d 0d |));.. | \rb..}.|
|00005ae0| 0a 0d 0a 0d 0a 5c 6d 61 | 6a 6f 72 73 65 63 74 69 |.....\ma|jorsecti|
|00005af0| 6f 6e 7b 46 75 6e 63 74 | 69 6f 6e 73 7d 0d 0a 0d |on{Funct|ions}...|
|00005b00| 0a 0d 0a 41 20 5e 7b 66 | 75 6e 63 74 69 6f 6e 7d |...A ^{f|unction}|
|00005b10| 20 64 65 66 69 6e 69 74 | 69 6f 6e 20 68 61 73 20 | definit|ion has |
|00005b20| 74 68 69 73 20 66 6f 72 | 6d 3a 0d 0a 0d 0a 7b 5c |this for|m:....{\|
|00005b30| 65 78 61 6d 70 6c 65 0d | 0a 20 20 20 20 7b 5c 69 |example.|. {\i|
|00005b40| 74 20 69 64 65 6e 74 69 | 66 69 65 72 7d 3a 20 20 |t identi|fier}: |
|00005b50| 66 75 6e 63 74 69 6f 6e | 20 7b 5c 69 74 20 5b 7d |function| {\it [}|
|00005b60| 20 28 20 7b 5c 69 74 20 | 61 72 67 75 6d 65 6e 74 | ( {\it |argument|
|00005b70| 2d 6c 69 73 74 7d 20 29 | 20 7b 5c 69 74 20 5d 7d |-list} )| {\it ]}|
|00005b80| 20 0d 0a 20 20 20 20 5c | 6c 62 0d 0a 20 20 20 20 | .. \|lb.. |
|00005b90| 20 20 20 20 7b 5c 69 74 | 20 66 75 6e 63 74 69 6f | {\it| functio|
|00005ba0| 6e 2d 62 6f 64 79 7d 0d | 0a 20 20 20 20 5c 72 62 |n-body}.|. \rb|
|00005bb0| 0d 0a 7d 0d 0a 0d 0a 54 | 68 65 20 7b 5c 69 74 20 |..}....T|he {\it |
|00005bc0| 61 72 67 75 6d 65 6e 74 | 2d 6c 69 73 74 7d 20 69 |argument|-list} i|
|00005bd0| 73 20 6f 70 74 69 6f 6e | 61 6c 3b 20 66 75 6e 63 |s option|al; func|
|00005be0| 74 69 6f 6e 73 20 6e 65 | 65 64 20 6e 6f 74 20 74 |tions ne|ed not t|
|00005bf0| 61 6b 65 20 61 72 67 75 | 6d 65 6e 74 73 2e 20 49 |ake argu|ments. I|
|00005c00| 66 20 74 68 65 0d 0a 66 | 75 6e 63 74 69 6f 6e 20 |f the..f|unction |
|00005c10| 64 6f 65 73 20 74 61 6b | 65 20 6f 6e 65 20 6f 72 |does tak|e one or|
|00005c20| 20 6d 6f 72 65 20 5e 7b | 61 72 67 75 6d 65 6e 74 | more ^{|argument|
|00005c30| 73 7d 2c 20 74 68 65 20 | 6c 69 73 74 20 6c 6f 6f |s}, the |list loo|
|00005c40| 6b 73 20 6c 69 6b 65 20 | 74 68 69 73 3a 0d 0a 0d |ks like |this:...|
|00005c50| 0a 7b 5c 65 78 61 6d 70 | 6c 65 0d 0a 20 20 20 20 |.{\examp|le.. |
|00005c60| 7b 5c 69 74 20 69 64 65 | 6e 74 69 66 69 65 72 20 |{\it ide|ntifier |
|00005c70| 5b 7d 2c 20 7b 5c 69 74 | 20 61 72 67 75 6d 65 6e |[}, {\it| argumen|
|00005c80| 74 2d 6c 69 73 74 20 5d | 7d 0d 0a 7d 0d 0a 0d 0a |t-list ]|}..}....|
|00005c90| 54 68 65 20 69 64 65 6e | 74 69 66 69 65 72 73 20 |The iden|tifiers |
|00005ca0| 6d 61 79 20 62 65 20 75 | 73 65 64 20 6a 75 73 74 |may be u|sed just|
|00005cb0| 20 6c 69 6b 65 20 6c 6f | 63 61 6c 20 76 61 72 69 | like lo|cal vari|
|00005cc0| 61 62 6c 65 73 20 77 69 | 74 68 69 6e 20 74 68 65 |ables wi|thin the|
|00005cd0| 20 66 75 6e 63 74 69 6f | 6e 2e 0d 0a 0d 0a 54 68 | functio|n.....Th|
|00005ce0| 65 20 70 75 6e 63 74 75 | 61 74 69 6f 6e 20 69 6e |e punctu|ation in|
|00005cf0| 20 74 68 65 20 61 62 6f | 76 65 20 73 79 6e 74 61 | the abo|ve synta|
|00005d00| 63 74 69 63 20 64 65 73 | 63 72 69 70 74 69 6f 6e |ctic des|cription|
|00005d10| 20 6d 61 79 20 62 65 20 | 61 20 6c 69 74 74 6c 65 | may be |a little|
|00005d20| 20 6d 75 63 68 2c 20 73 | 6f 0d 0a 61 6e 20 65 78 | much, s|o..an ex|
|00005d30| 61 6d 70 6c 65 20 6d 69 | 67 68 74 20 62 65 20 68 |ample mi|ght be h|
|00005d40| 65 6c 70 66 75 6c 3a 0d | 0a 0d 0a 7b 5c 65 78 61 |elpful:.|...{\exa|
|00005d50| 6d 70 6c 65 0d 0a 20 20 | 61 64 64 6c 69 73 74 3a |mple.. |addlist:|
|00005d60| 20 66 75 6e 63 74 69 6f | 6e 28 6c 69 73 74 29 20 | functio|n(list) |
|00005d70| 20 20 5c 68 66 69 6c 6c | 20 20 20 20 2f 2f 20 61 | \hfill| // a|
|00005d80| 64 64 20 75 70 20 74 68 | 65 20 6e 75 6d 62 65 72 |dd up th|e number|
|00005d90| 73 20 69 6e 20 74 68 65 | 20 6c 69 73 74 0d 0a 20 |s in the| list.. |
|00005da0| 20 5c 6c 62 0d 0a 20 20 | 20 20 6c 6f 63 61 6c 20 | \lb.. | local |
|00005db0| 73 75 6d 2c 20 63 6f 75 | 6e 74 2c 20 69 3b 0d 0a |sum, cou|nt, i;..|
|00005dc0| 20 20 20 20 0d 0a 20 20 | 20 20 69 20 3a 3d 20 31 | .. | i := 1|
|00005dd0| 3b 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |; | |
|00005de0| 5c 68 66 69 6c 6c 20 20 | 20 20 20 20 2f 2f 20 69 |\hfill | // i|
|00005df0| 6e 64 65 78 20 74 68 65 | 20 66 69 72 73 74 20 69 |ndex the| first i|
|00005e00| 74 65 6d 20 69 6e 20 74 | 68 65 20 6c 69 73 74 0d |tem in t|he list.|
|00005e10| 0a 20 20 20 20 73 75 6d | 20 3a 3d 20 30 3b 20 20 |. sum| := 0; |
|00005e20| 20 20 20 20 20 20 20 20 | 20 20 20 5c 68 66 69 6c | | \hfil|
|00005e30| 6c 20 20 20 20 20 20 2f | 2f 20 69 6e 69 74 69 61 |l /|/ initia|
|00005e40| 6c 69 7a 65 20 74 68 65 | 20 73 75 6d 20 74 6f 20 |lize the| sum to |
|00005e50| 7a 65 72 6f 0d 0a 20 20 | 20 20 63 6f 75 6e 74 20 |zero.. | count |
|00005e60| 3a 3d 20 6c 65 6e 67 74 | 68 28 6c 69 73 74 29 3b |:= lengt|h(list);|
|00005e70| 20 5c 68 66 69 6c 6c 20 | 20 20 2f 2f 20 67 65 74 | \hfill | // get|
|00005e80| 20 74 68 65 20 6e 75 6d | 62 65 72 20 6f 66 20 69 | the num|ber of i|
|00005e90| 74 65 6d 73 20 69 6e 20 | 74 68 65 20 6c 69 73 74 |tems in |the list|
|00005ea0| 0d 0a 20 20 20 20 77 68 | 69 6c 65 20 28 69 20 3c |.. wh|ile (i <|
|00005eb0| 20 63 6f 75 6e 74 29 20 | 20 20 20 5c 68 66 69 6c | count) | \hfil|
|00005ec0| 6c 20 20 20 20 20 20 2f | 2f 20 61 73 20 6c 6f 6e |l /|/ as lon|
|00005ed0| 67 20 61 73 20 74 68 65 | 72 65 27 73 20 6d 6f 72 |g as the|re's mor|
|00005ee0| 65 20 74 6f 20 64 6f 2e | 2e 2e 0d 0a 20 20 20 20 |e to do.|.... |
|00005ef0| 5c 6c 62 0d 0a 20 20 20 | 20 20 20 20 20 73 75 6d |\lb.. | sum|
|00005f00| 20 3a 3d 20 73 75 6d 20 | 2b 20 6c 69 73 74 5b 69 | := sum |+ list[i|
|00005f10| 5d 3b 20 5c 68 66 69 6c | 6c 20 20 2f 2f 20 61 64 |]; \hfil|l // ad|
|00005f20| 64 20 6e 65 78 74 20 65 | 6c 65 6d 65 6e 74 0d 0a |d next e|lement..|
|00005f30| 09 69 20 3a 3d 20 69 20 | 2b 20 31 3b 20 20 20 20 |.i := i |+ 1; |
|00005f40| 20 20 20 20 20 20 20 5c | 68 66 69 6c 6c 20 20 2f | \|hfill /|
|00005f50| 2f 20 67 6f 20 6f 6e 20 | 74 6f 20 74 68 65 20 6e |/ go on |to the n|
|00005f60| 65 78 74 20 6c 69 73 74 | 20 65 6c 65 6d 65 6e 74 |ext list| element|
|00005f70| 0d 0a 20 20 20 20 5c 72 | 62 0d 0a 20 20 20 20 72 |.. \r|b.. r|
|00005f80| 65 74 75 72 6e 28 73 75 | 6d 29 3b 0d 0a 20 20 5c |eturn(su|m);.. \|
|00005f90| 72 62 0d 0a 7d 0d 0a 0d | 0a 5c 6d 69 6e 6f 72 73 |rb..}...|.\minors|
|00005fa0| 65 63 74 69 6f 6e 7b 46 | 75 6e 63 74 69 6f 6e 73 |ection{F|unctions|
|00005fb0| 20 77 69 74 68 20 56 61 | 72 69 61 62 6c 65 20 41 | with Va|riable A|
|00005fc0| 72 67 75 6d 65 6e 74 20 | 4c 69 73 74 73 7d 0d 0a |rgument |Lists}..|
|00005fd0| 0d 0a 49 74 20 69 73 20 | 70 6f 73 73 69 62 6c 65 |..It is |possible|
|00005fe0| 20 74 6f 20 64 65 66 69 | 6e 65 20 61 20 66 75 6e | to defi|ne a fun|
|00005ff0| 63 74 69 6f 6e 20 74 68 | 61 74 20 74 61 6b 65 73 |ction th|at takes|
|00006000| 20 61 20 76 61 72 69 61 | 62 6c 65 20 6e 75 6d 62 | a varia|ble numb|
|00006010| 65 72 0d 0a 6f 66 20 61 | 72 67 75 6d 65 6e 74 73 |er..of a|rguments|
|00006020| 2e 20 20 49 6e 20 74 68 | 65 20 66 75 6e 63 74 69 |. In th|e functi|
|00006030| 6f 6e 20 64 65 66 69 6e | 69 74 69 6f 6e 2c 20 79 |on defin|ition, y|
|00006040| 6f 75 20 63 61 6e 20 73 | 70 65 63 69 66 79 20 61 |ou can s|pecify a|
|00006050| 20 6d 69 6e 69 6d 75 6d | 0d 0a 6e 75 6d 62 65 72 | minimum|..number|
|00006060| 20 6f 66 20 61 72 67 75 | 6d 65 6e 74 73 20 74 68 | of argu|ments th|
|00006070| 61 74 20 61 72 65 20 61 | 6c 77 61 79 73 20 70 61 |at are a|lways pa|
|00006080| 73 73 65 64 20 74 6f 20 | 74 68 65 20 66 75 6e 63 |ssed to |the func|
|00006090| 74 69 6f 6e 20 28 77 68 | 69 63 68 20 63 61 6e 0d |tion (wh|ich can.|
|000060a0| 0a 62 65 20 6e 6f 20 61 | 72 67 75 6d 65 6e 74 73 |.be no a|rguments|
|000060b0| 20 61 74 20 61 6c 6c 2c | 20 69 66 20 79 6f 75 20 | at all,| if you |
|000060c0| 77 69 73 68 29 2c 20 61 | 6e 64 20 74 68 65 6e 20 |wish), a|nd then |
|000060d0| 73 70 65 63 69 66 79 20 | 74 68 61 74 20 6d 6f 72 |specify |that mor|
|000060e0| 65 0d 0a 61 72 67 75 6d | 65 6e 74 73 20 63 61 6e |e..argum|ents can|
|000060f0| 20 6f 70 74 69 6f 6e 61 | 6c 6c 79 20 66 6f 6c 6c | optiona|lly foll|
|00006100| 6f 77 2e 20 20 54 68 69 | 73 20 69 73 20 64 6f 6e |ow. Thi|s is don|
|00006110| 65 20 77 69 74 68 20 74 | 68 65 20 60 60 5e 7b 65 |e with t|he ``^{e|
|00006120| 6c 6c 69 70 73 69 73 7d | 27 27 0d 0a 74 6f 6b 65 |llipsis}|''..toke|
|00006130| 6e 2c 20 60 60 7b 5c 74 | 74 20 5e 7b 2e 2e 2e 7d |n, ``{\t|t ^{...}|
|00006140| 7d 27 27 2c 20 61 73 20 | 74 68 65 20 66 69 6e 61 |}'', as |the fina|
|00006150| 6c 20 60 60 61 72 67 75 | 6d 65 6e 74 27 27 20 69 |l ``argu|ment'' i|
|00006160| 6e 20 74 68 65 20 66 75 | 6e 63 74 69 6f 6e 27 73 |n the fu|nction's|
|00006170| 0d 0a 61 72 67 75 6d 65 | 6e 74 20 6c 69 73 74 2e |..argume|nt list.|
|00006180| 20 20 46 6f 72 20 65 78 | 61 6d 70 6c 65 2c 20 74 | For ex|ample, t|
|00006190| 6f 20 64 65 66 69 6e 65 | 20 61 20 66 75 6e 63 74 |o define| a funct|
|000061a0| 69 6f 6e 20 74 68 61 74 | 20 74 61 6b 65 73 20 61 |ion that| takes a|
|000061b0| 6e 79 0d 0a 6e 75 6d 62 | 65 72 20 6f 66 20 61 72 |ny..numb|er of ar|
|000061c0| 67 75 6d 65 6e 74 73 3a | 0d 0a 5e 5e 7b 76 61 72 |guments:|..^^{var|
|000061d0| 69 61 62 6c 65 20 61 72 | 67 75 6d 65 6e 74 20 6c |iable ar|gument l|
|000061e0| 69 73 74 73 7d 20 5e 5e | 7b 76 61 72 61 72 67 73 |ists} ^^|{varargs|
|000061f0| 20 66 75 6e 63 74 69 6f | 6e 73 7d 0d 0a 0d 0a 7b | functio|ns}....{|
|00006200| 5c 65 78 61 6d 70 6c 65 | 0d 0a 66 3a 20 66 75 6e |\example|..f: fun|
|00006210| 63 74 69 6f 6e 28 2e 2e | 2e 29 0d 0a 5c 6c 62 0d |ction(..|.)..\lb.|
|00006220| 0a 5c 72 62 0d 0a 7d 0d | 0a 0d 0a 54 6f 20 64 65 |.\rb..}.|...To de|
|00006230| 66 69 6e 65 20 61 20 66 | 75 6e 63 74 69 6f 6e 20 |fine a f|unction |
|00006240| 74 68 61 74 20 61 6c 77 | 61 79 73 20 74 61 6b 65 |that alw|ays take|
|00006250| 73 20 61 74 20 6c 65 61 | 73 74 20 6f 6e 65 20 61 |s at lea|st one a|
|00006260| 72 67 75 6d 65 6e 74 2c | 20 62 75 74 0d 0a 63 6f |rgument,| but..co|
|00006270| 75 6c 64 20 74 61 6b 65 | 20 61 64 64 69 74 69 6f |uld take| additio|
|00006280| 6e 61 6c 20 61 72 67 75 | 6d 65 6e 74 73 3a 0d 0a |nal argu|ments:..|
|00006290| 0d 0a 7b 5c 65 78 61 6d | 70 6c 65 0d 0a 67 3a 20 |..{\exam|ple..g: |
|000062a0| 66 75 6e 63 74 69 6f 6e | 28 66 6d 74 2c 20 2e 2e |function|(fmt, ..|
|000062b0| 2e 29 0d 0a 5c 6c 62 0d | 0a 5c 72 62 0d 0a 7d 0d |.)..\lb.|.\rb..}.|
|000062c0| 0a 0d 0a 49 6e 20 61 20 | 66 75 6e 63 74 69 6f 6e |...In a |function|
|000062d0| 20 74 61 6b 69 6e 67 20 | 61 20 76 61 72 69 61 62 | taking |a variab|
|000062e0| 6c 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 61 72 67 |le numbe|r of arg|
|000062f0| 75 6d 65 6e 74 73 2c 20 | 79 6f 75 20 63 61 6e 20 |uments, |you can |
|00006300| 64 65 74 65 72 6d 69 6e | 65 0d 0a 68 6f 77 20 6d |determin|e..how m|
|00006310| 61 6e 79 20 61 72 67 75 | 6d 65 6e 74 73 20 77 65 |any argu|ments we|
|00006320| 72 65 20 61 63 74 75 61 | 6c 6c 79 20 70 61 73 73 |re actua|lly pass|
|00006330| 65 64 20 74 6f 20 74 68 | 65 20 66 75 6e 63 74 69 |ed to th|e functi|
|00006340| 6f 6e 20 62 79 20 69 6e | 73 70 65 63 74 69 6e 67 |on by in|specting|
|00006350| 0d 0a 74 68 65 20 70 73 | 65 75 64 6f 2d 76 61 72 |..the ps|eudo-var|
|00006360| 69 61 62 6c 65 20 7b 5c | 74 74 20 5e 7b 61 72 67 |iable {\|tt ^{arg|
|00006370| 63 6f 75 6e 74 7d 7d 2e | 20 20 54 68 69 73 20 70 |count}}.| This p|
|00006380| 73 65 75 64 6f 2d 76 61 | 72 69 61 62 6c 65 27 73 |seudo-va|riable's|
|00006390| 20 76 61 6c 75 65 20 69 | 73 0d 0a 73 69 6d 70 6c | value i|s..simpl|
|000063a0| 79 20 74 68 65 20 6e 75 | 6d 62 65 72 20 6f 66 20 |y the nu|mber of |
|000063b0| 61 72 67 75 6d 65 6e 74 | 73 20 74 6f 20 74 68 65 |argument|s to the|
|000063c0| 20 63 75 72 72 65 6e 74 | 20 66 75 6e 63 74 69 6f | current| functio|
|000063d0| 6e 2e 0d 0a 0d 0a 54 6f | 20 72 65 74 72 69 65 76 |n.....To| retriev|
|000063e0| 65 20 61 6e 20 61 72 67 | 75 6d 65 6e 74 2c 20 75 |e an arg|ument, u|
|000063f0| 73 65 20 74 68 65 20 7b | 5c 74 74 20 5e 7b 67 65 |se the {|\tt ^{ge|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.