home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
1%
| dexvert
| Corel 10 Texture (image/corel10Texture)
| ext
| Unsupported |
1%
| dexvert
| Croteam texture file (image/croteamTextureFile)
| ext
| Unsupported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| LaTeX document text
| default
| |
99%
| file
| LaTeX document, ASCII text, with CRLF line terminators
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/281 LaTeX (Subdocument)
| default
| |
100%
| detectItEasy
| Format: plain text[CRLF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 63 68 61 70 74 65 72 | 7b 41 4e 20 45 58 41 4d |\chapter|{AN EXAM|
|00000010| 50 4c 45 2d 53 45 53 53 | 49 4f 4e 7d 0d 0a 0d 0a |PLE-SESS|ION}....|
|00000020| 55 70 6f 6e 20 72 65 63 | 65 69 76 69 6e 67 20 79 |Upon rec|eiving y|
|00000030| 6f 75 72 20 77 6f 6e 64 | 65 72 66 75 6c 20 6e 65 |our wond|erful ne|
|00000040| 77 20 45 6c 61 6e 20 50 | 72 6f 67 72 61 6d 6d 69 |w Elan P|rogrammi|
|00000050| 6e 67 20 45 6e 76 69 72 | 6f 6e 6d 65 6e 74 0d 0a |ng Envir|onment..|
|00000060| 79 6f 75 72 20 66 69 72 | 73 74 20 69 6e 63 6c 69 |your fir|st incli|
|00000070| 6e 61 74 69 6f 6e 2c 20 | 6e 6f 20 64 6f 75 62 74 |nation, |no doubt|
|00000080| 2c 20 69 73 20 74 6f 20 | 73 69 74 20 64 6f 77 6e |, is to |sit down|
|00000090| 20 69 6e 20 66 72 6f 6e | 74 20 6f 66 0d 0a 79 6f | in fron|t of..yo|
|000000a0| 75 72 20 63 6f 6d 70 75 | 74 65 72 20 61 6e 64 20 |ur compu|ter and |
|000000b0| 74 72 79 20 69 74 20 6f | 75 74 2e 20 54 68 69 73 |try it o|ut. This|
|000000c0| 20 64 65 73 69 72 65 20 | 69 73 20 75 6e 64 65 72 | desire |is under|
|000000d0| 73 74 61 6e 64 61 62 6c | 65 2c 0d 0a 62 75 74 20 |standabl|e,..but |
|000000e0| 77 69 6c 6c 20 6c 65 61 | 64 20 74 6f 20 73 65 76 |will lea|d to sev|
|000000f0| 65 72 65 20 64 69 73 61 | 70 70 6f 69 6e 74 6d 65 |ere disa|ppointme|
|00000100| 6e 74 73 20 75 6e 6c 65 | 73 73 20 79 6f 75 20 61 |nts unle|ss you a|
|00000110| 6c 72 65 61 64 79 20 6b | 6e 6f 77 0d 0a 68 6f 77 |lready k|now..how|
|00000120| 20 74 6f 20 70 72 6f 67 | 72 61 6d 20 61 6e 64 20 | to prog|ram and |
|00000130| 6b 6e 6f 77 20 74 68 65 | 20 6c 61 6e 67 75 61 67 |know the| languag|
|00000140| 65 20 45 6c 61 6e 2e 20 | 54 68 69 73 20 6d 61 6e |e Elan. |This man|
|00000150| 75 61 6c 20 63 61 6e 6e | 6f 74 0d 0a 74 65 61 63 |ual cann|ot..teac|
|00000160| 68 20 79 6f 75 20 70 72 | 6f 67 72 61 6d 6d 69 6e |h you pr|ogrammin|
|00000170| 67 2c 20 66 6f 72 20 74 | 68 61 74 20 77 65 20 72 |g, for t|hat we r|
|00000180| 65 66 65 72 20 79 6f 75 | 20 74 6f 20 74 68 65 20 |efer you| to the |
|00000190| 74 65 78 74 62 6f 6f 6b | 73 0d 0a 6d 65 6e 74 69 |textbook|s..menti|
|000001a0| 6f 6e 65 64 20 69 6e 20 | 74 68 65 20 69 6e 74 72 |oned in |the intr|
|000001b0| 6f 64 75 63 74 69 6f 6e | 2e 20 49 6e 20 63 68 61 |oduction|. In cha|
|000001c0| 70 74 65 72 20 34 20 79 | 6f 75 20 66 69 6e 64 20 |pter 4 y|ou find |
|000001d0| 61 6e 20 6f 76 65 72 76 | 69 65 77 0d 0a 6f 66 20 |an overv|iew..of |
|000001e0| 74 68 65 20 45 6c 61 6e | 20 6c 61 6e 67 75 61 67 |the Elan| languag|
|000001f0| 65 2e 20 49 6e 20 63 68 | 61 70 74 65 72 20 35 20 |e. In ch|apter 5 |
|00000200| 79 6f 75 20 66 69 6e 64 | 20 61 20 64 65 73 63 72 |you find| a descr|
|00000210| 69 70 74 69 6f 6e 20 6f | 66 20 74 68 65 0d 0a 45 |iption o|f the..E|
|00000220| 6c 61 6e 20 50 72 6f 67 | 72 61 6d 6d 69 6e 67 20 |lan Prog|ramming |
|00000230| 45 6e 76 69 72 6f 6e 6d | 65 6e 74 2e 20 7b 5c 65 |Environm|ent. {\e|
|00000240| 6d 20 54 68 65 20 62 65 | 73 74 20 73 74 72 61 74 |m The be|st strat|
|00000250| 65 67 79 20 69 73 20 74 | 6f 0d 0a 72 65 61 64 20 |egy is t|o..read |
|00000260| 74 68 6f 73 65 20 74 77 | 6f 20 63 68 61 70 74 65 |those tw|o chapte|
|00000270| 72 73 20 66 69 72 73 74 | 20 62 65 66 6f 72 65 20 |rs first| before |
|00000280| 65 6d 62 61 72 6b 69 6e | 67 20 75 70 6f 6e 20 74 |embarkin|g upon t|
|00000290| 68 65 20 70 72 65 73 65 | 6e 74 0d 0a 63 68 61 70 |he prese|nt..chap|
|000002a0| 74 65 72 7d 2e 0d 0a 0d | 0a 54 68 65 20 65 78 61 |ter}....|.The exa|
|000002b0| 6d 70 6c 65 20 73 65 73 | 73 69 6f 6e 20 69 6e 20 |mple ses|sion in |
|000002c0| 74 68 65 20 63 75 72 72 | 65 6e 74 20 63 68 61 70 |the curr|ent chap|
|000002d0| 74 65 72 20 69 6e 74 72 | 6f 64 75 63 65 73 20 79 |ter intr|oduces y|
|000002e0| 6f 75 20 69 6e 0d 0a 61 | 20 68 61 6e 64 73 2d 6f |ou in..a| hands-o|
|000002f0| 6e 20 66 61 73 68 69 6f | 6e 20 74 6f 20 74 68 65 |n fashio|n to the|
|00000300| 20 75 73 65 20 6f 66 20 | 74 68 65 20 45 6c 61 6e | use of |the Elan|
|00000310| 20 50 72 6f 67 72 61 6d | 6d 69 6e 67 20 45 6e 76 | Program|ming Env|
|00000320| 69 72 6f 6e 6d 65 6e 74 | 2e 0d 0a 42 79 20 66 6f |ironment|...By fo|
|00000330| 6c 6c 6f 77 69 6e 67 20 | 74 68 65 20 73 65 73 73 |llowing |the sess|
|00000340| 69 6f 6e 20 74 6f 20 74 | 68 65 20 6c 65 74 74 65 |ion to t|he lette|
|00000350| 72 20 79 6f 75 20 6f 62 | 74 61 69 6e 20 61 20 71 |r you ob|tain a q|
|00000360| 75 69 63 6b 20 74 6f 75 | 72 0d 0a 6f 66 20 6d 6f |uick tou|r..of mo|
|00000370| 73 74 20 6f 66 20 69 74 | 73 20 66 61 63 69 6c 69 |st of it|s facili|
|00000380| 74 69 65 73 2e 0d 0a 0d | 0a 49 6e 20 74 68 69 73 |ties....|.In this|
|00000390| 20 63 68 61 70 74 65 72 | 20 77 65 20 77 69 6c 6c | chapter| we will|
|000003a0| 20 6d 61 72 6b 20 6f 75 | 74 70 75 74 20 66 72 6f | mark ou|tput fro|
|000003b0| 6d 20 74 68 65 20 45 6c | 61 6e 20 50 72 6f 67 72 |m the El|an Progr|
|000003c0| 61 6d 6d 69 6e 67 20 45 | 6e 76 69 72 6f 6e 6d 65 |amming E|nvironme|
|000003d0| 6e 74 0d 0a 77 69 74 68 | 20 61 20 6c 69 6e 65 20 |nt..with| a line |
|000003e0| 69 6e 20 74 68 65 20 6c | 65 66 74 20 6d 61 72 67 |in the l|eft marg|
|000003f0| 69 6e 3b 20 74 68 65 20 | 69 6e 70 75 74 20 6f 66 |in; the |input of|
|00000400| 20 74 68 65 20 75 73 65 | 72 20 69 73 20 67 69 76 | the use|r is giv|
|00000410| 65 6e 0d 0a 77 69 74 68 | 6f 75 74 20 73 75 63 68 |en..with|out such|
|00000420| 20 61 20 6d 61 72 6b 2e | 20 54 68 65 20 63 75 72 | a mark.| The cur|
|00000430| 73 6f 72 20 77 69 6c 6c | 20 62 65 20 64 65 70 69 |sor will| be depi|
|00000440| 63 74 65 64 20 61 73 20 | 5c 63 75 72 73 6f 72 2e |cted as |\cursor.|
|00000450| 20 49 6e 20 69 6e 70 75 | 74 0d 0a 66 72 6f 6d 20 | In inpu|t..from |
|00000460| 74 68 65 20 75 73 65 72 | 20 77 65 20 77 69 6c 6c |the user| we will|
|00000470| 20 65 78 70 6c 69 63 69 | 74 6c 79 20 69 6e 64 69 | explici|tly indi|
|00000480| 63 61 74 65 20 74 68 65 | 20 60 60 72 65 74 75 72 |cate the| ``retur|
|00000490| 6e 27 27 20 6f 72 20 60 | 60 65 6e 74 65 72 27 27 |n'' or `|`enter''|
|000004a0| 0d 0a 6b 65 79 20 62 79 | 20 7b 5c 74 74 20 3c 52 |..key by| {\tt <R|
|000004b0| 45 54 3e 7d 20 61 6e 64 | 20 74 68 65 20 60 60 64 |ET>} and| the ``d|
|000004c0| 65 6c 65 74 65 27 27 20 | 6b 65 79 20 62 79 20 7b |elete'' |key by {|
|000004d0| 5c 74 74 20 3c 44 45 4c | 3e 7d 2e 0d 0a 0d 0a 5c |\tt <DEL|>}.....\|
|000004e0| 73 65 63 74 69 6f 6e 7b | 53 74 61 72 74 69 6e 67 |section{|Starting|
|000004f0| 2e 2e 2e 7d 0d 0a 0d 0a | 41 66 74 65 72 20 79 6f |...}....|After yo|
|00000500| 75 20 68 61 76 65 20 62 | 6f 6f 74 65 64 20 61 6e |u have b|ooted an|
|00000510| 64 20 73 74 61 72 74 65 | 64 20 74 68 65 20 45 6c |d starte|d the El|
|00000520| 61 6e 20 50 72 6f 67 72 | 61 6d 6d 69 6e 67 20 45 |an Progr|amming E|
|00000530| 6e 76 69 72 6f 6e 6d 65 | 6e 74 2c 0d 0a 74 68 65 |nvironme|nt,..the|
|00000540| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 69 64 65 6e 74 | followi|ng ident|
|00000550| 69 66 79 69 6e 67 20 6d | 65 73 73 61 67 65 20 61 |ifying m|essage a|
|00000560| 70 70 65 61 72 73 20 6f | 6e 20 74 68 65 20 73 63 |ppears o|n the sc|
|00000570| 72 65 65 6e 3a 0d 0a 0d | 0a 5c 62 65 67 69 6e 7b |reen:...|.\begin{|
|00000580| 65 6c 61 6e 7d 0d 0a 7c | 20 20 20 20 20 20 20 45 |elan}..|| E|
|00000590| 6c 61 6e 20 50 72 6f 67 | 72 61 6d 6d 69 6e 67 20 |lan Prog|ramming |
|000005a0| 45 6e 76 69 72 6f 6e 6d | 65 6e 74 0d 0a 7c 20 20 |Environm|ent..| |
|000005b0| 20 20 20 20 20 76 65 72 | 73 69 6f 6e 20 31 2e 35 | ver|sion 1.5|
|000005c0| 0d 0a 7c 20 20 20 20 20 | 20 20 43 6f 70 79 72 69 |..| | Copyri|
|000005d0| 67 68 74 20 4b 55 4e 2c | 20 41 75 67 20 31 39 38 |ght KUN,| Aug 198|
|000005e0| 38 0d 0a 5c 65 6e 64 7b | 65 6c 61 6e 7d 0d 0a 0d |8..\end{|elan}...|
|000005f0| 0a 5c 6e 6f 69 6e 64 65 | 6e 74 0d 0a 49 6d 6d 65 |.\noinde|nt..Imme|
|00000600| 64 69 61 74 65 6c 79 20 | 75 6e 64 65 72 6e 65 61 |diately |undernea|
|00000610| 74 68 20 79 6f 75 20 77 | 69 6c 6c 20 66 69 6e 64 |th you w|ill find|
|00000620| 20 74 68 65 20 7b 5c 65 | 6d 20 66 6f 63 75 73 7d | the {\e|m focus}|
|00000630| 2c 20 69 2e 65 2e 20 74 | 68 65 0d 0a 6e 61 6d 65 |, i.e. t|he..name|
|00000640| 20 6f 66 20 74 68 65 20 | 72 65 66 69 6e 65 6d 65 | of the |refineme|
|00000650| 6e 74 20 74 68 61 74 20 | 69 73 20 74 68 65 20 63 |nt that |is the c|
|00000660| 75 72 72 65 6e 74 20 66 | 6f 63 75 73 20 6f 66 20 |urrent f|ocus of |
|00000670| 69 6e 74 65 72 65 73 74 | 2e 0d 0a 54 68 65 20 64 |interest|...The d|
|00000680| 65 66 61 75 6c 74 20 66 | 6f 63 75 73 20 69 73 0d |efault f|ocus is.|
|00000690| 0a 0d 0a 5c 62 65 67 69 | 6e 7b 65 6c 61 6e 7d 0d |...\begi|n{elan}.|
|000006a0| 0a 7c 20 20 20 20 20 20 | 20 70 72 6f 67 72 61 6d |.| | program|
|000006b0| 20 3f 5c 63 75 72 73 6f | 72 0d 0a 5c 65 6e 64 7b | ?\curso|r..\end{|
|000006c0| 65 6c 61 6e 7d 0d 0a 0d | 0a 5c 6e 6f 69 6e 64 65 |elan}...|.\noinde|
|000006d0| 6e 74 0d 0a 54 68 65 20 | 71 75 65 73 74 69 6f 6e |nt..The |question|
|000006e0| 20 6d 61 72 6b 20 6d 65 | 61 6e 73 20 74 68 61 74 | mark me|ans that|
|000006f0| 20 7b 5c 74 74 20 70 72 | 6f 67 72 61 6d 7d 20 69 | {\tt pr|ogram} i|
|00000700| 73 20 6e 6f 74 20 74 68 | 65 20 6e 61 6d 65 20 6f |s not th|e name o|
|00000710| 66 0d 0a 61 20 6b 6e 6f | 77 6e 20 72 65 66 69 6e |f..a kno|wn refin|
|00000720| 65 6d 65 6e 74 2c 20 69 | 2e 65 2e 20 69 74 20 68 |ement, i|.e. it h|
|00000730| 61 73 20 6e 6f 74 20 79 | 65 74 20 6f 62 74 61 69 |as not y|et obtai|
|00000740| 6e 65 64 20 61 20 6d 65 | 61 6e 69 6e 67 2e 20 41 |ned a me|aning. A|
|00000750| 74 0d 0a 74 68 65 20 62 | 6f 74 74 6f 6d 20 6f 66 |t..the b|ottom of|
|00000760| 20 74 68 65 20 73 63 72 | 65 65 6e 2c 20 6f 6e 20 | the scr|een, on |
|00000770| 74 68 65 20 73 74 61 74 | 75 73 20 6c 69 6e 65 2c |the stat|us line,|
|00000780| 20 79 6f 75 20 66 69 6e | 64 20 74 68 65 20 6d 65 | you fin|d the me|
|00000790| 73 73 61 67 65 0d 0a 0d | 0a 5c 62 65 67 69 6e 7b |ssage...|.\begin{|
|000007a0| 65 6c 61 6e 7d 0d 0a 7c | 20 20 20 20 20 20 20 20 |elan}..|| |
|000007b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000007c0| 20 20 20 20 20 20 20 43 | 6f 6d 6d 61 6e 64 2c 20 | C|ommand, |
|000007d0| 70 6c 65 61 73 65 2e 2e | 2e 0d 0a 5c 65 6e 64 7b |please..|...\end{|
|000007e0| 65 6c 61 6e 7d 0d 0a 0d | 0a 5c 6e 6f 69 6e 64 65 |elan}...|.\noinde|
|000007f0| 6e 74 0d 0a 69 6e 64 69 | 63 61 74 69 6e 67 20 77 |nt..indi|cating w|
|00000800| 68 61 74 20 69 73 20 65 | 78 70 65 63 74 65 64 20 |hat is e|xpected |
|00000810| 66 72 6f 6d 20 79 6f 75 | 2e 20 42 79 20 67 69 76 |from you|. By giv|
|00000820| 69 6e 67 20 74 68 65 20 | 68 65 6c 70 2d 63 6f 6d |ing the |help-com|
|00000830| 6d 61 6e 64 0d 0a 0d 0a | 5c 62 65 67 69 6e 7b 65 |mand....|\begin{e|
|00000840| 6c 61 6e 7d 0d 0a 20 20 | 20 20 20 20 20 20 68 0d |lan}.. | h.|
|00000850| 0a 5c 65 6e 64 7b 65 6c | 61 6e 7d 0d 0a 0d 0a 5c |.\end{el|an}....\|
|00000860| 6e 6f 69 6e 64 65 6e 74 | 0d 0a 79 6f 75 20 61 72 |noindent|..you ar|
|00000870| 65 20 73 68 6f 77 6e 20 | 66 6f 72 20 6f 6e 65 20 |e shown |for one |
|00000880| 73 65 63 6f 6e 64 20 61 | 20 6c 69 73 74 20 6f 66 |second a| list of|
|00000890| 20 74 68 65 20 61 70 70 | 6c 69 63 61 62 6c 65 20 | the app|licable |
|000008a0| 63 6f 6d 6d 61 6e 64 73 | 2e 0d 0a 54 68 65 20 63 |commands|...The c|
|000008b0| 6f 6d 6d 61 6e 64 73 20 | 61 72 65 20 64 65 73 63 |ommands |are desc|
|000008c0| 72 69 62 65 64 20 69 6e | 20 63 68 61 70 74 65 72 |ribed in| chapter|
|000008d0| 20 35 20 6f 66 20 74 68 | 69 73 20 6d 61 6e 75 61 | 5 of th|is manua|
|000008e0| 6c 2e 20 54 68 65 20 68 | 65 6c 70 2d 63 6f 6d 6d |l. The h|elp-comm|
|000008f0| 61 6e 64 0d 0a 73 65 72 | 76 65 73 20 6f 6e 6c 79 |and..ser|ves only|
|00000900| 20 61 73 20 61 20 72 65 | 6d 69 6e 64 65 72 2e 0d | as a re|minder..|
|00000910| 0a 0d 0a 5c 73 65 63 74 | 69 6f 6e 7b 2e 2e 2e 20 |...\sect|ion{... |
|00000920| 61 6e 64 20 73 74 6f 70 | 70 69 6e 67 7d 0d 0a 0d |and stop|ping}...|
|00000930| 0a 4f 6e 63 65 20 68 61 | 76 69 6e 67 20 6c 65 61 |.Once ha|ving lea|
|00000940| 72 6e 65 64 20 68 6f 77 | 20 74 6f 20 73 74 61 72 |rned how| to star|
|00000950| 74 20 79 6f 75 20 6d 75 | 73 74 20 6c 65 61 72 6e |t you mu|st learn|
|00000960| 20 68 6f 77 20 74 6f 20 | 73 74 6f 70 2c 0d 0a 6a | how to |stop,..j|
|00000970| 75 73 74 20 6c 69 6b 65 | 20 74 68 65 20 61 70 70 |ust like| the app|
|00000980| 72 65 6e 74 69 63 65 20 | 73 6f 72 63 65 72 65 72 |rentice |sorcerer|
|00000990| 2e 0d 0a 59 6f 75 20 63 | 61 6e 20 73 74 6f 70 20 |...You c|an stop |
|000009a0| 74 68 65 20 70 72 6f 67 | 72 61 6d 6d 69 6e 67 20 |the prog|ramming |
|000009b0| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 20 62 79 20 67 |environm|ent by g|
|000009c0| 69 76 69 6e 67 20 74 68 | 65 20 71 75 69 74 2d 63 |iving th|e quit-c|
|000009d0| 6f 6d 6d 61 6e 64 0d 0a | 0d 0a 5c 62 65 67 69 6e |ommand..|..\begin|
|000009e0| 7b 65 6c 61 6e 7d 0d 0a | 20 20 20 20 20 20 20 20 |{elan}..| |
|000009f0| 71 0d 0a 5c 65 6e 64 7b | 65 6c 61 6e 7d 0d 0a 0d |q..\end{|elan}...|
|00000a00| 0a 5c 6e 6f 69 6e 64 65 | 6e 74 0d 0a 77 68 65 72 |.\noinde|nt..wher|
|00000a10| 65 20 75 70 6f 6e 20 79 | 6f 75 20 61 72 65 20 61 |e upon y|ou are a|
|00000a20| 73 6b 65 64 20 66 6f 72 | 20 61 20 63 6f 6e 66 69 |sked for| a confi|
|00000a30| 72 6d 61 74 69 6f 6e 0d | 0a 0d 0a 5c 62 65 67 69 |rmation.|...\begi|
|00000a40| 6e 7b 65 6c 61 6e 7d 0d | 0a 7c 20 20 20 20 20 20 |n{elan}.|.| |
|00000a50| 20 51 55 49 54 20 3f 5c | 63 75 72 73 6f 72 0d 0a | QUIT ?\|cursor..|
|00000a60| 5c 65 6e 64 7b 65 6c 61 | 6e 7d 0d 0a 0d 0a 5c 6e |\end{ela|n}....\n|
|00000a70| 6f 69 6e 64 65 6e 74 0d | 0a 54 68 65 20 70 6f 73 |oindent.|.The pos|
|00000a80| 73 69 62 6c 65 20 61 6e | 73 77 65 72 73 20 28 61 |sible an|swers (a|
|00000a90| 73 20 65 6c 69 63 69 74 | 65 64 20 62 79 20 74 68 |s elicit|ed by th|
|00000aa0| 65 20 68 65 6c 70 2d 63 | 6f 6d 6d 61 6e 64 29 20 |e help-c|ommand) |
|00000ab0| 61 72 65 20 7b 5c 74 74 | 20 79 7d 20 61 6e 64 20 |are {\tt| y} and |
|00000ac0| 7b 5c 74 74 20 6e 7d 2e | 20 55 70 6f 6e 20 61 6e |{\tt n}.| Upon an|
|00000ad0| 73 77 65 72 69 6e 67 0d | 0a 0d 0a 5c 62 65 67 69 |swering.|...\begi|
|00000ae0| 6e 7b 65 6c 61 6e 7d 0d | 0a 20 20 20 20 20 20 20 |n{elan}.|. |
|00000af0| 20 6e 0d 0a 5c 65 6e 64 | 7b 65 6c 61 6e 7d 0d 0a | n..\end|{elan}..|
|00000b00| 0d 0a 5c 6e 6f 69 6e 64 | 65 6e 74 0d 0a 74 68 65 |..\noind|ent..the|
|00000b10| 20 71 75 69 74 2d 63 6f | 6d 6d 61 6e 64 20 64 6f | quit-co|mmand do|
|00000b20| 65 73 20 6e 6f 74 68 69 | 6e 67 20 61 6e 64 20 74 |es nothi|ng and t|
|00000b30| 68 65 20 63 6f 6e 66 69 | 72 6d 61 74 69 6f 6e 20 |he confi|rmation |
|00000b40| 6d 65 73 73 61 67 65 20 | 64 69 73 61 70 70 65 61 |message |disappea|
|00000b50| 72 73 0d 0a 66 72 6f 6d | 20 79 6f 75 72 20 73 63 |rs..from| your sc|
|00000b60| 72 65 65 6e 2e 20 55 70 | 6f 6e 20 61 6e 73 77 65 |reen. Up|on answe|
|00000b70| 72 69 6e 67 0d 0a 0d 0a | 5c 62 65 67 69 6e 7b 65 |ring....|\begin{e|
|00000b80| 6c 61 6e 7d 0d 0a 20 20 | 20 20 20 20 20 20 79 0d |lan}.. | y.|
|00000b90| 0a 5c 65 6e 64 7b 65 6c | 61 6e 7d 0d 0a 0d 0a 5c |.\end{el|an}....\|
|00000ba0| 6e 6f 69 6e 64 65 6e 74 | 0d 0a 74 68 65 20 70 72 |noindent|..the pr|
|00000bb0| 6f 67 72 61 6d 6d 69 6e | 67 20 65 6e 76 69 72 6f |ogrammin|g enviro|
|00000bc0| 6e 6d 65 6e 74 20 68 61 | 6c 74 73 20 61 6e 64 20 |nment ha|lts and |
|00000bd0| 72 65 74 75 72 6e 73 20 | 63 6f 6e 74 72 6f 6c 20 |returns |control |
|00000be0| 74 6f 20 74 68 65 0d 0a | 73 79 73 74 65 6d 20 6f |to the..|system o|
|00000bf0| 6e 20 77 68 69 63 68 20 | 69 74 20 69 73 20 72 75 |n which |it is ru|
|00000c00| 6e 6e 69 6e 67 2e 0d 0a | 55 70 6f 6e 20 71 75 69 |nning...|Upon qui|
|00000c10| 74 74 69 6e 67 2c 20 74 | 68 65 20 70 72 6f 67 72 |tting, t|he progr|
|00000c20| 61 6d 20 74 68 61 74 20 | 69 73 20 74 68 65 6e 20 |am that |is then |
|00000c30| 69 6e 20 6d 65 6d 6f 72 | 79 20 69 73 20 66 6f 72 |in memor|y is for|
|00000c40| 67 6f 74 74 65 6e 0d 0a | 28 62 75 74 20 6f 66 20 |gotten..|(but of |
|00000c50| 63 6f 75 72 73 65 20 61 | 6c 6c 20 70 72 6f 67 72 |course a|ll progr|
|00000c60| 61 6d 73 20 74 68 61 74 | 20 68 61 76 65 20 62 65 |ams that| have be|
|00000c70| 65 6e 20 77 72 69 74 74 | 65 6e 20 74 6f 20 61 20 |en writt|en to a |
|00000c80| 66 69 6c 65 0d 0a 61 72 | 65 20 72 65 74 61 69 6e |file..ar|e retain|
|00000c90| 65 64 29 2e 0d 0a 0d 0a | 5c 73 65 63 74 69 6f 6e |ed).....|\section|
|00000ca0| 7b 52 65 61 64 69 6e 67 | 20 61 20 70 72 6f 67 72 |{Reading| a progr|
|00000cb0| 61 6d 7d 0d 0a 0d 0a 41 | 73 20 61 6e 20 65 78 61 |am}....A|s an exa|
|00000cc0| 6d 70 6c 65 20 77 65 20 | 77 69 6c 6c 20 72 65 61 |mple we |will rea|
|00000cd0| 64 2c 20 65 78 65 63 75 | 74 65 20 61 6e 64 20 6d |d, execu|te and m|
|00000ce0| 6f 64 69 66 79 20 74 68 | 65 20 70 72 6f 67 72 61 |odify th|e progra|
|00000cf0| 6d 20 63 61 6c 6c 65 64 | 0d 0a 7b 5c 74 74 20 72 |m called|..{\tt r|
|00000d00| 61 63 65 7d 20 28 73 65 | 65 20 33 2e 31 29 2c 20 |ace} (se|e 3.1), |
|00000d10| 73 74 6f 72 65 64 20 69 | 6e 20 61 20 66 69 6c 65 |stored i|n a file|
|00000d20| 0d 0a 77 69 74 68 20 74 | 68 65 20 73 61 6d 65 20 |..with t|he same |
|00000d30| 6e 61 6d 65 2c 20 77 68 | 69 63 68 20 63 61 6e 20 |name, wh|ich can |
|00000d40| 62 65 20 66 6f 75 6e 64 | 20 6f 6e 20 74 68 65 20 |be found| on the |
|00000d50| 66 6c 6f 70 70 79 20 64 | 69 73 63 20 63 6f 6e 74 |floppy d|isc cont|
|00000d60| 61 69 6e 69 6e 67 0d 0a | 74 68 65 20 45 6c 61 6e |aining..|the Elan|
|00000d70| 20 50 72 6f 67 72 61 6d | 6d 69 6e 67 20 45 6e 76 | Program|ming Env|
|00000d80| 69 72 6f 6e 6d 65 6e 74 | 2e 0d 0a 57 65 20 6d 61 |ironment|...We ma|
|00000d90| 6b 65 20 73 75 72 65 20 | 74 68 65 20 66 6c 6f 70 |ke sure |the flop|
|00000da0| 70 79 20 64 69 73 63 20 | 69 73 20 69 6e 73 65 72 |py disc |is inser|
|00000db0| 74 65 64 20 61 6e 64 20 | 67 69 76 65 20 74 68 65 |ted and |give the|
|00000dc0| 20 72 65 61 64 2d 63 6f | 6d 6d 61 6e 64 0d 0a 0d | read-co|mmand...|
|00000dd0| 0a 5c 62 65 67 69 6e 7b | 65 6c 61 6e 7d 0d 0a 20 |.\begin{|elan}.. |
|00000de0| 20 20 20 20 20 20 20 72 | 0d 0a 5c 65 6e 64 7b 65 | r|..\end{e|
|00000df0| 6c 61 6e 7d 0d 0a 0d 0a | 5c 6e 6f 69 6e 64 65 6e |lan}....|\noinden|
|00000e00| 74 0d 0a 54 68 65 20 70 | 72 6f 67 72 61 6d 6d 69 |t..The p|rogrammi|
|00000e10| 6e 67 20 65 6e 76 69 72 | 6f 6e 6d 65 6e 74 20 72 |ng envir|onment r|
|00000e20| 65 61 63 74 73 20 62 79 | 20 61 73 6b 69 6e 67 0d |eacts by| asking.|
|00000e30| 0a 0d 0a 5c 62 65 67 69 | 6e 7b 65 6c 61 6e 7d 0d |...\begi|n{elan}.|
|00000e40| 0a 7c 20 20 20 20 20 20 | 20 4e 61 6d 65 3a 5c 63 |.| | Name:\c|
|00000e50| 75 72 73 6f 72 0d 0a 5c | 65 6e 64 7b 65 6c 61 6e |ursor..\|end{elan|
|00000e60| 7d 0d 0a 0d 0a 5c 6e 6f | 69 6e 64 65 6e 74 0d 0a |}....\no|indent..|
|00000e70| 57 65 20 6e 6f 77 20 68 | 61 76 65 20 74 6f 20 69 |We now h|ave to i|
|00000e80| 6e 64 69 63 61 74 65 20 | 74 68 65 20 6e 61 6d 65 |ndicate |the name|
|00000e90| 20 6f 66 20 74 68 65 20 | 66 69 6c 65 2e 20 57 65 | of the |file. We|
|00000ea0| 20 74 79 70 65 20 69 6e | 0d 0a 0d 0a 5c 62 65 67 | type in|....\beg|
|00000eb0| 69 6e 7b 65 6c 61 6e 7d | 0d 0a 20 20 20 20 20 20 |in{elan}|.. |
|00000ec0| 20 20 72 61 63 65 3c 52 | 45 54 3e 0d 0a 5c 65 6e | race<R|ET>..\en|
|00000ed0| 64 7b 65 6c 61 6e 7d 0d | 0a 0d 0a 5c 6e 6f 69 6e |d{elan}.|...\noin|
|00000ee0| 64 65 6e 74 0d 0a 4e 6f | 74 69 63 65 20 74 68 61 |dent..No|tice tha|
|00000ef0| 74 20 74 68 69 73 20 74 | 69 6d 65 20 77 65 20 68 |t this t|ime we h|
|00000f00| 61 76 65 20 74 6f 20 67 | 69 76 65 20 61 20 7b 5c |ave to g|ive a {\|
|00000f10| 74 74 20 3c 52 45 54 3e | 7d 20 61 74 20 74 68 65 |tt <RET>|} at the|
|00000f20| 20 65 6e 64 20 69 6e 20 | 6f 72 64 65 72 0d 0a 74 | end in |order..t|
|00000f30| 6f 20 69 6e 64 69 63 61 | 74 65 20 74 68 61 74 20 |o indica|te that |
|00000f40| 74 68 65 20 6e 61 6d 65 | 20 69 73 20 63 6f 6d 70 |the name| is comp|
|00000f50| 6c 65 74 65 64 2e 20 53 | 69 6e 63 65 20 63 6f 6d |leted. S|ince com|
|00000f60| 6d 61 6e 64 73 20 63 6f | 6e 73 69 73 74 0d 0a 6f |mands co|nsist..o|
|00000f70| 66 20 6f 6e 65 20 73 69 | 6e 67 6c 65 20 6c 65 74 |f one si|ngle let|
|00000f80| 74 65 72 20 74 68 65 79 | 20 64 6f 20 6e 6f 74 20 |ter they| do not |
|00000f90| 6e 65 65 64 20 73 75 63 | 68 20 61 6e 20 69 6e 64 |need suc|h an ind|
|00000fa0| 69 63 61 74 69 6f 6e 2e | 0d 0a 54 68 65 20 73 74 |ication.|..The st|
|00000fb0| 61 74 75 73 20 6c 69 6e | 65 20 6e 6f 77 20 73 61 |atus lin|e now sa|
|00000fc0| 79 73 0d 0a 0d 0a 5c 62 | 65 67 69 6e 7b 65 6c 61 |ys....\b|egin{ela|
|00000fd0| 6e 7d 0d 0a 7c 20 20 20 | 20 20 20 20 20 20 20 20 |n}..| | |
|00000fe0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000ff0| 20 20 20 20 52 65 61 64 | 69 6e 67 2e 2e 2e 0d 0a | Read|ing.....|
|00001000| 5c 65 6e 64 7b 65 6c 61 | 6e 7d 0d 0a 0d 0a 5c 6e |\end{ela|n}....\n|
|00001010| 6f 69 6e 64 65 6e 74 0d | 0a 77 68 69 6c 65 20 74 |oindent.|.while t|
|00001020| 68 65 20 74 65 78 74 20 | 6f 66 20 74 68 65 20 72 |he text |of the r|
|00001030| 65 66 69 6e 65 6d 65 6e | 74 73 20 6f 66 20 74 68 |efinemen|ts of th|
|00001040| 65 20 70 72 6f 67 72 61 | 6d 20 70 61 73 73 65 73 |e progra|m passes|
|00001050| 20 6f 76 65 72 0d 0a 74 | 68 65 20 73 63 72 65 65 | over..t|he scree|
|00001060| 6e 2e 20 55 70 6f 6e 20 | 63 6f 6d 70 6c 65 74 69 |n. Upon |completi|
|00001070| 6f 6e 20 6f 66 20 74 68 | 65 20 72 65 61 64 69 6e |on of th|e readin|
|00001080| 67 2c 20 74 68 65 20 69 | 6e 74 65 72 70 72 65 74 |g, the i|nterpret|
|00001090| 65 72 20 67 69 76 65 73 | 0d 0a 61 20 76 69 65 77 |er gives|..a view|
|000010a0| 2c 20 61 20 6c 69 73 74 | 20 6f 66 20 61 6c 6c 20 |, a list| of all |
|000010b0| 6b 6e 6f 77 6e 20 72 65 | 66 69 6e 65 6d 65 6e 74 |known re|finement|
|000010c0| 73 20 61 6e 64 20 61 6e | 20 69 6e 64 69 63 61 74 |s and an| indicat|
|000010d0| 69 6f 6e 0d 0a 6f 66 20 | 74 68 65 20 72 65 6d 61 |ion..of |the rema|
|000010e0| 69 6e 69 6e 67 20 6d 65 | 6d 6f 72 79 20 73 70 61 |ining me|mory spa|
|000010f0| 63 65 2e 0d 0a 0d 0a 5c | 62 65 67 69 6e 7b 65 6c |ce.....\|begin{el|
|00001100| 61 6e 7d 0d 0a 7c 20 20 | 20 20 20 20 20 46 72 65 |an}..| | Fre|
|00001110| 65 20 73 70 61 63 65 3a | 20 20 31 37 39 33 35 0d |e space:| 17935.|
|00001120| 0a 7c 0d 0a 7c 20 20 20 | 20 20 20 20 70 72 6f 67 |.|..| | prog|
|00001130| 72 61 6d 0d 0a 7c 20 20 | 20 20 20 20 20 7c 20 73 |ram..| | | s|
|00001140| 74 61 72 74 20 68 6f 72 | 73 65 73 0d 0a 7c 20 20 |tart hor|ses..| |
|00001150| 20 20 20 20 20 7c 20 7c | 20 64 69 73 70 6c 61 79 | | || display|
|00001160| 20 74 69 74 6c 65 2c 20 | 70 75 74 20 68 6f 72 73 | title, |put hors|
|00001170| 65 20 61 74 20 73 74 61 | 72 74 20 70 6f 73 2c 0d |e at sta|rt pos,.|
|00001180| 0a 7c 20 20 20 20 20 20 | 20 7c 20 7c 20 6d 61 72 |.| | | | mar|
|00001190| 6b 20 73 74 61 72 74 20 | 6f 66 20 74 72 61 63 6b |k start |of track|
|000011a0| 2c 20 6d 61 72 6b 20 65 | 6e 64 20 6f 66 20 74 72 |, mark e|nd of tr|
|000011b0| 61 63 6b 0d 0a 7c 20 20 | 20 20 20 20 20 7c 20 63 |ack..| | | c|
|000011c0| 68 6f 6f 73 65 20 68 6f | 72 73 65 2c 20 6d 6f 76 |hoose ho|rse, mov|
|000011d0| 65 20 68 6f 72 73 65 2c | 20 66 69 6e 69 73 68 65 |e horse,| finishe|
|000011e0| 64 2c 20 64 69 73 70 6c | 61 79 20 77 69 6e 6e 65 |d, displ|ay winne|
|000011f0| 72 0d 0a 7c 0d 0a 7c 20 | 20 20 20 20 20 20 70 72 |r..|..| | pr|
|00001200| 6f 67 72 61 6d 3a 5c 63 | 75 72 73 6f 72 0d 0a 5c |ogram:\c|ursor..\|
|00001210| 65 6e 64 7b 65 6c 61 6e | 7d 0d 0a 0d 0a 5c 6e 6f |end{elan|}....\no|
|00001220| 69 6e 64 65 6e 74 0d 0a | 54 68 65 20 73 74 61 74 |indent..|The stat|
|00001230| 75 73 20 6c 69 6e 65 20 | 61 67 61 69 6e 20 73 61 |us line |again sa|
|00001240| 79 73 0d 0a 0d 0a 5c 62 | 65 67 69 6e 7b 65 6c 61 |ys....\b|egin{ela|
|00001250| 6e 7d 0d 0a 7c 20 20 20 | 20 20 20 20 20 20 20 20 |n}..| | |
|00001260| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001270| 20 20 20 20 43 6f 6d 6d | 61 6e 64 2c 20 70 6c 65 | Comm|and, ple|
|00001280| 61 73 65 2e 2e 2e 0d 0a | 5c 65 6e 64 7b 65 6c 61 |ase.....|\end{ela|
|00001290| 6e 7d 0d 0a 0d 0a 5c 6e | 6f 69 6e 64 65 6e 74 0d |n}....\n|oindent.|
|000012a0| 0a 54 68 69 73 20 76 69 | 65 77 20 79 6f 75 20 6e |.This vi|ew you n|
|000012b0| 6f 77 20 68 61 76 65 20 | 63 61 6e 20 61 6c 73 6f |ow have |can also|
|000012c0| 20 62 65 20 6f 62 74 61 | 69 6e 65 64 20 62 79 20 | be obta|ined by |
|000012d0| 67 69 76 69 6e 67 20 74 | 68 65 0d 0a 6c 69 73 74 |giving t|he..list|
|000012e0| 2d 63 6f 6d 6d 61 6e 64 | 0d 0a 0d 0a 5c 62 65 67 |-command|....\beg|
|000012f0| 69 6e 7b 65 6c 61 6e 7d | 0d 0a 20 20 20 20 20 20 |in{elan}|.. |
|00001300| 20 20 6c 0d 0a 5c 65 6e | 64 7b 65 6c 61 6e 7d 0d | l..\en|d{elan}.|
|00001310| 0a 0d 0a 5c 73 65 63 74 | 69 6f 6e 7b 49 6e 73 70 |...\sect|ion{Insp|
|00001320| 65 63 74 69 6e 67 20 61 | 6e 64 20 65 78 65 63 75 |ecting a|nd execu|
|00001330| 74 69 6e 67 20 61 20 72 | 65 66 69 6e 65 6d 65 6e |ting a r|efinemen|
|00001340| 74 7d 0d 0a 0d 0a 54 68 | 65 20 72 65 66 69 6e 65 |t}....Th|e refine|
|00001350| 6d 65 6e 74 20 7b 5c 74 | 74 20 70 72 6f 67 72 61 |ment {\t|t progra|
|00001360| 6d 7d 20 68 61 73 2c 20 | 62 79 20 74 68 65 20 72 |m} has, |by the r|
|00001370| 65 61 64 69 6e 67 2c 20 | 6f 62 74 61 69 6e 65 64 |eading, |obtained|
|00001380| 20 61 0d 0a 76 61 6c 75 | 65 2c 20 77 68 69 63 68 | a..valu|e, which|
|00001390| 20 63 61 6e 20 62 65 20 | 64 69 73 70 6c 61 79 65 | can be |displaye|
|000013a0| 64 20 6f 6e 20 74 68 65 | 20 73 63 72 65 65 6e 20 |d on the| screen |
|000013b0| 62 79 20 6d 65 61 6e 73 | 20 6f 66 20 74 68 65 20 |by means| of the |
|000013c0| 73 68 6f 77 2d 63 6f 6d | 6d 61 6e 64 0d 0a 0d 0a |show-com|mand....|
|000013d0| 5c 62 65 67 69 6e 7b 65 | 6c 61 6e 7d 0d 0a 20 20 |\begin{e|lan}.. |
|000013e0| 20 20 20 20 20 20 73 0d | 0a 0d 0a 7c 20 20 20 20 | s.|...| |
|000013f0| 20 20 20 70 72 6f 67 72 | 61 6d 3a 0d 0a 7c 20 20 | progr|am:..| |
|00001400| 20 20 20 20 20 20 20 73 | 74 61 72 74 20 68 6f 72 | s|tart hor|
|00001410| 73 65 73 3b 0d 0a 7c 20 | 20 20 20 20 20 20 20 20 |ses;..| | |
|00001420| 52 45 50 0d 0a 7c 20 20 | 20 20 20 20 20 20 20 20 |REP..| | |
|00001430| 20 63 68 6f 6f 73 65 20 | 68 6f 72 73 65 3b 0d 0a | choose |horse;..|
|00001440| 7c 20 20 20 20 20 20 20 | 20 20 20 20 6d 6f 76 65 || | move|
|00001450| 20 68 6f 72 73 65 0d 0a | 7c 20 20 20 20 20 20 20 | horse..|| |
|00001460| 20 20 55 4e 54 49 4c 20 | 66 69 6e 69 73 68 65 64 | UNTIL |finished|
|00001470| 0d 0a 7c 20 20 20 20 20 | 20 20 20 20 45 4e 44 52 |..| | ENDR|
|00001480| 45 50 3b 0d 0a 7c 20 20 | 20 20 20 20 20 20 20 64 |EP;..| | d|
|00001490| 69 73 70 6c 61 79 20 77 | 69 6e 6e 65 72 2e 0d 0a |isplay w|inner...|
|000014a0| 7c 0d 0a 7c 20 20 20 20 | 20 20 20 70 72 6f 67 72 ||..| | progr|
|000014b0| 61 6d 3a 5c 63 75 72 73 | 6f 72 0d 0a 5c 65 6e 64 |am:\curs|or..\end|
|000014c0| 7b 65 6c 61 6e 7d 0d 0a | 0d 0a 5c 6e 6f 69 6e 64 |{elan}..|..\noind|
|000014d0| 65 6e 74 0d 0a 54 68 65 | 20 66 6f 63 75 73 20 69 |ent..The| focus i|
|000014e0| 73 20 73 74 69 6c 6c 20 | 7b 5c 74 74 20 70 72 6f |s still |{\tt pro|
|000014f0| 67 72 61 6d 7d 2c 20 62 | 75 74 20 6e 6f 77 20 69 |gram}, b|ut now i|
|00001500| 74 73 20 6d 65 61 6e 69 | 6e 67 20 69 73 20 64 65 |ts meani|ng is de|
|00001510| 66 69 6e 65 64 2c 0d 0a | 61 73 20 69 73 20 73 68 |fined,..|as is sh|
|00001520| 6f 77 6e 20 62 79 20 74 | 68 65 20 66 61 63 74 20 |own by t|he fact |
|00001530| 74 68 61 74 20 69 74 20 | 69 73 20 66 6f 6c 6c 6f |that it |is follo|
|00001540| 77 65 64 20 62 79 20 61 | 20 7b 5c 74 74 20 3a 7d |wed by a| {\tt :}|
|00001550| 20 69 6e 73 74 65 61 64 | 20 6f 66 20 61 20 7b 5c | instead| of a {\|
|00001560| 74 74 20 3f 7d 2e 0d 0a | 57 65 20 63 61 6e 20 65 |tt ?}...|We can e|
|00001570| 78 65 63 75 74 65 20 74 | 68 65 20 70 72 6f 67 72 |xecute t|he progr|
|00001580| 61 6d 20 77 69 74 68 20 | 74 68 69 73 20 72 65 66 |am with |this ref|
|00001590| 69 6e 65 6d 65 6e 74 20 | 61 73 20 72 6f 6f 74 0d |inement |as root.|
|000015a0| 0a 62 79 20 67 69 76 69 | 6e 67 20 74 68 65 20 65 |.by givi|ng the e|
|000015b0| 78 65 63 75 74 65 2d 63 | 6f 6d 6d 61 6e 64 0d 0a |xecute-c|ommand..|
|000015c0| 0d 0a 5c 62 65 67 69 6e | 7b 65 6c 61 6e 7d 0d 0a |..\begin|{elan}..|
|000015d0| 20 20 20 20 20 20 20 20 | 78 0d 0a 5c 65 6e 64 7b | |x..\end{|
|000015e0| 65 6c 61 6e 7d 0d 0a 0d | 0a 5c 6e 6f 69 6e 64 65 |elan}...|.\noinde|
|000015f0| 6e 74 0d 0a 4a 75 73 74 | 20 74 72 79 20 69 74 2c |nt..Just| try it,|
|00001600| 20 61 6e 64 20 73 65 65 | 20 77 68 61 74 20 68 61 | and see| what ha|
|00001610| 70 70 65 6e 73 2e 0d 0a | 0d 0a 5c 73 65 63 74 69 |ppens...|..\secti|
|00001620| 6f 6e 7b 53 68 69 66 74 | 69 6e 67 20 74 68 65 20 |on{Shift|ing the |
|00001630| 66 6f 63 75 73 7d 0d 0a | 0d 0a 49 6e 20 6f 72 64 |focus}..|..In ord|
|00001640| 65 72 20 74 6f 20 69 6e | 73 70 65 63 74 20 6f 72 |er to in|spect or|
|00001650| 20 65 78 65 63 75 74 65 | 20 61 6e 6f 74 68 65 72 | execute| another|
|00001660| 20 72 65 66 69 6e 65 6d | 65 6e 74 2c 20 65 2e 67 | refinem|ent, e.g|
|00001670| 2e 0d 0a 7b 5c 74 74 20 | 73 74 61 72 74 20 68 6f |...{\tt |start ho|
|00001680| 72 73 65 73 7d 2c 20 77 | 65 20 68 61 76 65 20 74 |rses}, w|e have t|
|00001690| 6f 20 73 68 69 66 74 20 | 74 68 65 20 66 6f 63 75 |o shift |the focu|
|000016a0| 73 20 62 79 20 6d 65 61 | 6e 73 20 6f 66 20 74 68 |s by mea|ns of th|
|000016b0| 65 20 66 6f 63 75 73 2d | 63 6f 6d 6d 61 6e 64 0d |e focus-|command.|
|000016c0| 0a 0d 0a 5c 62 65 67 69 | 6e 7b 65 6c 61 6e 7d 0d |...\begi|n{elan}.|
|000016d0| 0a 20 20 20 20 20 20 20 | 20 66 0d 0a 0d 0a 7c 20 |. | f....| |
|000016e0| 20 20 20 20 20 20 4e 61 | 6d 65 3a 5c 63 75 72 73 | Na|me:\curs|
|000016f0| 6f 72 0d 0a 0d 0a 20 20 | 20 20 20 20 20 20 73 74 |or.... | st|
|00001700| 61 72 74 20 68 6f 72 73 | 65 73 3c 52 45 54 3e 0d |art hors|es<RET>.|
|00001710| 0a 0d 0a 7c 20 20 20 20 | 20 20 20 73 74 61 72 74 |...| | start|
|00001720| 20 68 6f 72 73 65 73 3a | 5c 63 75 72 73 6f 72 0d | horses:|\cursor.|
|00001730| 0a 5c 65 6e 64 7b 65 6c | 61 6e 7d 0d 0a 0d 0a 5c |.\end{el|an}....\|
|00001740| 6e 6f 69 6e 64 65 6e 74 | 0d 0a 57 65 20 63 61 6e |noindent|..We can|
|00001750| 20 6e 6f 77 20 69 6e 73 | 70 65 63 74 20 74 68 69 | now ins|pect thi|
|00001760| 73 20 72 65 66 69 6e 65 | 6d 65 6e 74 20 62 79 20 |s refine|ment by |
|00001770| 6d 65 61 6e 73 20 6f 66 | 20 74 68 65 20 73 68 6f |means of| the sho|
|00001780| 77 2d 63 6f 6d 6d 61 6e | 64 2e 0d 0a 54 68 65 20 |w-comman|d...The |
|00001790| 66 6f 63 75 73 2d 63 6f | 6d 6d 61 6e 64 20 28 7b |focus-co|mmand ({|
|000017a0| 5c 74 74 20 66 7d 29 20 | 63 61 6e 20 62 65 20 75 |\tt f}) |can be u|
|000017b0| 73 65 64 20 74 6f 20 66 | 6f 63 75 73 20 6f 6e 20 |sed to f|ocus on |
|000017c0| 61 6e 79 20 6e 61 6d 65 | 2c 0d 0a 62 65 20 69 74 |any name|,..be it|
|000017d0| 20 61 6c 72 65 61 64 79 | 20 64 65 66 69 6e 65 64 | already| defined|
|000017e0| 20 6f 72 20 75 6e 6b 6e | 6f 77 6e 2e 0d 0a 46 6f | or unkn|own...Fo|
|000017f0| 72 20 66 6f 63 75 73 73 | 69 6e 67 20 6f 6e 20 6b |r focuss|ing on k|
|00001800| 6e 6f 77 6e 20 6e 61 6d | 65 73 2c 20 61 20 73 68 |nown nam|es, a sh|
|00001810| 6f 72 74 68 61 6e 64 20 | 6d 65 63 68 61 6e 69 73 |orthand |mechanis|
|00001820| 6d 20 65 78 69 73 74 73 | 3a 20 77 65 0d 0a 6d 61 |m exists|: we..ma|
|00001830| 79 20 72 65 70 6c 61 63 | 65 20 74 68 65 20 6c 61 |y replac|e the la|
|00001840| 73 74 20 70 61 72 74 20 | 6f 66 20 74 68 65 20 6e |st part |of the n|
|00001850| 61 6d 65 20 62 79 20 61 | 20 7b 5c 74 74 20 2a 7d |ame by a| {\tt *}|
|00001860| 2c 20 65 2e 67 2e 0d 0a | 0d 0a 5c 62 65 67 69 6e |, e.g...|..\begin|
|00001870| 7b 65 6c 61 6e 7d 0d 0a | 20 20 20 20 20 20 20 20 |{elan}..| |
|00001880| 73 74 61 72 74 20 68 2a | 3c 52 45 54 3e 0d 0a 5c |start h*|<RET>..\|
|00001890| 65 6e 64 7b 65 6c 61 6e | 7d 0d 0a 0d 0a 5c 6e 6f |end{elan|}....\no|
|000018a0| 69 6e 64 65 6e 74 0d 0a | 4e 6f 74 69 63 65 20 74 |indent..|Notice t|
|000018b0| 68 61 74 20 69 66 20 77 | 65 20 68 61 64 20 67 69 |hat if w|e had gi|
|000018c0| 76 65 6e 20 61 20 73 68 | 6f 72 74 65 72 20 70 61 |ven a sh|orter pa|
|000018d0| 72 74 20 6f 66 20 74 68 | 65 20 6e 61 6d 65 20 7b |rt of th|e name {|
|000018e0| 5c 74 74 20 73 74 61 72 | 74 2a 3c 52 45 54 3e 7d |\tt star|t*<RET>}|
|000018f0| 0d 0a 77 65 20 77 6f 75 | 6c 64 20 68 61 76 65 20 |..we wou|ld have |
|00001900| 6f 62 74 61 69 6e 65 64 | 20 74 68 65 20 6f 62 6a |obtained| the obj|
|00001910| 65 63 74 20 7b 5c 74 74 | 20 73 74 61 72 74 20 70 |ect {\tt| start p|
|00001920| 6f 73 7d 20 69 6e 73 74 | 65 61 64 2e 0d 0a 0d 0a |os} inst|ead.....|
|00001930| 5c 73 65 63 74 69 6f 6e | 7b 4d 6f 64 69 66 79 69 |\section|{Modifyi|
|00001940| 6e 67 20 61 20 72 65 66 | 69 6e 65 6d 65 6e 74 7d |ng a ref|inement}|
|00001950| 0d 0a 0d 0a 57 65 20 77 | 69 6c 6c 20 6e 6f 77 20 |....We w|ill now |
|00001960| 6d 6f 64 69 66 79 20 6f | 6e 65 20 6f 66 20 74 68 |modify o|ne of th|
|00001970| 65 20 72 65 66 69 6e 65 | 6d 65 6e 74 73 20 6f 66 |e refine|ments of|
|00001980| 20 74 68 65 20 70 72 6f | 67 72 61 6d 2e 20 57 65 | the pro|gram. We|
|00001990| 0d 0a 61 72 65 20 66 6f | 63 75 73 73 65 64 20 6f |..are fo|cussed o|
|000019a0| 6e 20 7b 5c 74 74 20 73 | 74 61 72 74 20 68 6f 72 |n {\tt s|tart hor|
|000019b0| 73 65 73 7d 20 61 6e 64 | 20 67 69 76 65 20 61 20 |ses} and| give a |
|000019c0| 73 68 6f 77 2d 63 6f 6d | 6d 61 6e 64 0d 0a 0d 0a |show-com|mand....|
|000019d0| 5c 62 65 67 69 6e 7b 65 | 6c 61 6e 7d 0d 0a 20 20 |\begin{e|lan}.. |
|000019e0| 20 20 20 20 20 20 73 0d | 0a 0d 0a 7c 20 20 20 20 | s.|...| |
|000019f0| 20 20 20 73 74 61 72 74 | 20 68 6f 72 73 65 73 3a | start| horses:|
|00001a00| 0d 0a 7c 20 20 20 20 20 | 20 20 20 20 4c 45 54 20 |..| | LET |
|00001a10| 6e 6f 20 6f 66 20 68 6f | 72 73 65 73 20 3d 20 36 |no of ho|rses = 6|
|00001a20| 3b 0d 0a 7c 20 20 20 20 | 20 20 20 20 20 4c 45 54 |;..| | LET|
|00001a30| 20 73 74 61 72 74 20 70 | 6f 73 20 3d 20 31 32 3b | start p|os = 12;|
|00001a40| 0d 0a 7c 20 20 20 20 20 | 20 20 20 20 4c 45 54 20 |..| | LET |
|00001a50| 65 6e 64 20 70 6f 73 20 | 3d 20 35 30 20 3b 0d 0a |end pos |= 50 ;..|
|00001a60| 7c 20 20 20 20 20 20 20 | 20 20 52 4f 57 20 6e 6f || | ROW no|
|00001a70| 20 6f 66 20 68 6f 72 73 | 65 73 20 49 4e 54 20 56 | of hors|es INT V|
|00001a80| 41 52 20 68 6f 72 73 65 | 3b 0d 0a 7c 20 20 20 20 |AR horse|;..| |
|00001a90| 20 20 20 20 20 64 69 73 | 70 6c 61 79 20 74 69 74 | dis|play tit|
|00001aa0| 6c 65 3b 0d 0a 7c 20 20 | 20 20 20 20 20 20 20 49 |le;..| | I|
|00001ab0| 4e 54 20 56 41 52 20 69 | 3b 0d 0a 7c 20 20 20 20 |NT VAR i|;..| |
|00001ac0| 20 20 20 20 20 46 4f 52 | 20 69 20 46 52 4f 4d 20 | FOR| i FROM |
|00001ad0| 31 20 55 50 54 4f 20 6e | 6f 20 6f 66 20 68 6f 72 |1 UPTO n|o of hor|
|00001ae0| 73 65 73 0d 0a 7c 20 20 | 20 20 20 20 20 20 20 52 |ses..| | R|
|00001af0| 45 50 0d 0a 7c 20 20 20 | 20 20 20 20 20 20 20 20 |EP..| | |
|00001b00| 70 75 74 20 68 6f 72 73 | 65 20 61 74 20 73 74 61 |put hors|e at sta|
|00001b10| 72 74 70 6f 73 3b 0d 0a | 7c 20 20 20 20 20 20 20 |rtpos;..|| |
|00001b20| 20 20 20 20 6d 61 72 6b | 20 73 74 61 72 74 20 6f | mark| start o|
|00001b30| 66 20 74 72 61 63 6b 3b | 0d 0a 7c 20 20 20 20 20 |f track;|..| |
|00001b40| 20 20 20 20 20 20 6d 61 | 72 6b 20 65 6e 64 20 6f | ma|rk end o|
|00001b50| 66 20 74 72 61 63 6b 3b | 0d 0a 7c 20 20 20 20 20 |f track;|..| |
|00001b60| 20 20 20 20 45 4e 44 52 | 45 50 2e 0d 0a 7c 0d 0a | ENDR|EP...|..|
|00001b70| 7c 20 20 20 20 20 20 20 | 73 74 61 72 74 20 68 6f || |start ho|
|00001b80| 72 73 65 73 3a 5c 63 75 | 72 73 6f 72 0d 0a 5c 65 |rses:\cu|rsor..\e|
|00001b90| 6e 64 7b 65 6c 61 6e 7d | 0d 0a 0d 0a 5c 6e 6f 69 |nd{elan}|....\noi|
|00001ba0| 6e 64 65 6e 74 0d 0a 57 | 65 20 77 69 73 68 20 74 |ndent..W|e wish t|
|00001bb0| 6f 20 63 68 61 6e 67 65 | 20 74 68 65 20 7b 5c 74 |o change| the {\t|
|00001bc0| 74 20 36 7d 20 69 6e 20 | 74 68 65 20 66 69 72 73 |t 6} in |the firs|
|00001bd0| 74 20 6c 69 6e 65 20 6f | 66 20 74 68 65 20 62 6f |t line o|f the bo|
|00001be0| 64 79 20 6f 66 0d 0a 74 | 68 65 20 72 65 66 69 6e |dy of..t|he refin|
|00001bf0| 65 6d 65 6e 74 20 69 6e | 74 6f 20 7b 5c 74 74 20 |ement in|to {\tt |
|00001c00| 34 7d 2e 20 54 6f 20 74 | 68 61 74 20 65 6e 64 20 |4}. To t|hat end |
|00001c10| 77 65 20 67 69 76 65 20 | 61 6e 20 65 64 69 74 2d |we give |an edit-|
|00001c20| 63 6f 6d 6d 61 6e 64 0d | 0a 0d 0a 5c 62 65 67 69 |command.|...\begi|
|00001c30| 6e 7b 65 6c 61 6e 7d 0d | 0a 20 20 20 20 20 20 20 |n{elan}.|. |
|00001c40| 20 65 0d 0a 5c 65 6e 64 | 7b 65 6c 61 6e 7d 0d 0a | e..\end|{elan}..|
|00001c50| 0d 0a 5c 6e 6f 69 6e 64 | 65 6e 74 0d 0a 54 68 65 |..\noind|ent..The|
|00001c60| 20 73 61 6d 65 20 74 65 | 78 74 20 61 70 70 65 61 | same te|xt appea|
|00001c70| 72 73 2c 20 77 69 74 68 | 20 6f 6e 20 74 68 65 20 |rs, with| on the |
|00001c80| 73 74 61 74 75 73 20 6c | 69 6e 65 0d 0a 0d 0a 5c |status l|ine....\|
|00001c90| 62 65 67 69 6e 7b 65 6c | 61 6e 7d 0d 0a 7c 20 20 |begin{el|an}..| |
|00001ca0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001cb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 49 6e 70 | | Inp|
|00001cc0| 75 74 2c 20 70 6c 65 61 | 73 65 2e 2e 2e 0d 0a 5c |ut, plea|se.....\|
|00001cd0| 65 6e 64 7b 65 6c 61 6e | 7d 0d 0a 0d 0a 5c 6e 6f |end{elan|}....\no|
|00001ce0| 69 6e 64 65 6e 74 0d 0a | 42 79 20 6d 65 61 6e 73 |indent..|By means|
|00001cf0| 20 6f 66 20 74 68 65 20 | 63 75 72 73 6f 72 20 6b | of the |cursor k|
|00001d00| 65 79 73 20 28 6d 61 72 | 6b 65 64 20 77 69 74 68 |eys (mar|ked with|
|00001d10| 20 61 72 72 6f 77 73 29 | 20 77 65 20 6d 6f 76 65 | arrows)| we move|
|00001d20| 20 74 68 65 20 63 75 72 | 73 6f 72 0d 0a 74 6f 20 | the cur|sor..to |
|00001d30| 74 68 65 20 72 69 67 68 | 74 20 70 6f 73 69 74 69 |the righ|t positi|
|00001d40| 6f 6e 2c 20 73 74 72 69 | 6b 65 20 6f 75 74 20 74 |on, stri|ke out t|
|00001d50| 68 65 20 7b 5c 74 74 20 | 36 7d 20 62 79 20 6d 65 |he {\tt |6} by me|
|00001d60| 61 6e 73 20 6f 66 20 74 | 68 65 0d 0a 7b 5c 74 74 |ans of t|he..{\tt|
|00001d70| 20 3c 44 45 4c 3e 7d 2d | 6b 65 79 20 61 6e 64 20 | <DEL>}-|key and |
|00001d80| 69 6e 73 65 72 74 20 61 | 20 7b 5c 74 74 20 34 7d |insert a| {\tt 4}|
|00001d90| 20 69 6e 73 74 65 61 64 | 2e 20 57 65 20 74 68 65 | instead|. We the|
|00001da0| 6e 20 73 74 72 69 6b 65 | 20 74 68 65 20 7b 5c 74 |n strike| the {\t|
|00001db0| 74 20 3c 52 45 54 3e 7d | 2d 6b 65 79 0d 0a 74 6f |t <RET>}|-key..to|
|00001dc0| 20 69 6e 64 69 63 61 74 | 65 20 74 68 61 74 20 74 | indicat|e that t|
|00001dd0| 68 65 20 6d 6f 64 69 66 | 69 63 61 74 69 6f 6e 20 |he modif|ication |
|00001de0| 69 73 20 63 6f 6d 70 6c | 65 74 65 2e 0d 0a 0d 0a |is compl|ete.....|
|00001df0| 57 65 20 6e 6f 77 20 77 | 61 6e 74 20 74 6f 20 73 |We now w|ant to s|
|00001e00| 65 65 20 77 68 61 74 20 | 65 66 66 65 63 74 20 74 |ee what |effect t|
|00001e10| 68 69 73 20 6d 6f 64 69 | 66 69 63 61 74 69 6f 6e |his modi|fication|
|00001e20| 20 68 61 73 20 6f 6e 20 | 74 68 65 20 65 78 65 63 | has on |the exec|
|00001e30| 75 74 69 6f 6e 0d 0a 6f | 66 20 74 68 65 20 70 72 |ution..o|f the pr|
|00001e40| 6f 67 72 61 6d 2e 20 57 | 65 20 66 69 72 73 74 20 |ogram. W|e first |
|00001e50| 68 61 76 65 20 74 6f 20 | 66 6f 63 75 73 20 61 67 |have to |focus ag|
|00001e60| 61 69 6e 20 6f 6e 20 74 | 68 65 20 72 6f 6f 74 0d |ain on t|he root.|
|00001e70| 0a 0d 0a 5c 62 65 67 69 | 6e 7b 65 6c 61 6e 7d 0d |...\begi|n{elan}.|
|00001e80| 0a 20 20 20 20 20 20 20 | 20 66 0d 0a 0d 0a 7c 20 |. | f....| |
|00001e90| 20 20 20 20 20 20 4e 61 | 6d 65 3a 5c 63 75 72 73 | Na|me:\curs|
|00001ea0| 6f 72 0d 0a 5c 65 6e 64 | 7b 65 6c 61 6e 7d 0d 0a |or..\end|{elan}..|
|00001eb0| 0d 0a 5c 6e 6f 69 6e 64 | 65 6e 74 0d 0a 57 65 20 |..\noind|ent..We |
|00001ec0| 6d 61 6b 65 20 75 73 65 | 20 6f 66 20 74 68 65 20 |make use| of the |
|00001ed0| 73 68 6f 72 74 68 61 6e | 64 20 6d 65 63 68 61 6e |shorthan|d mechan|
|00001ee0| 69 73 6d 0d 0a 0d 0a 5c | 62 65 67 69 6e 7b 65 6c |ism....\|begin{el|
|00001ef0| 61 6e 7d 0d 0a 20 20 20 | 20 20 20 20 20 70 72 6f |an}.. | pro|
|00001f00| 67 2a 3c 52 45 54 3e 0d | 0a 0d 0a 7c 20 20 20 20 |g*<RET>.|...| |
|00001f10| 20 20 20 70 72 6f 67 72 | 61 6d 3a 5c 63 75 72 73 | progr|am:\curs|
|00001f20| 6f 72 0d 0a 5c 65 6e 64 | 7b 65 6c 61 6e 7d 0d 0a |or..\end|{elan}..|
|00001f30| 0d 0a 5c 6e 6f 69 6e 64 | 65 6e 74 0d 0a 42 79 20 |..\noind|ent..By |
|00001f40| 67 69 76 69 6e 67 20 74 | 68 65 20 65 78 65 63 75 |giving t|he execu|
|00001f50| 74 65 2d 63 6f 6d 6d 61 | 6e 64 20 77 65 20 63 61 |te-comma|nd we ca|
|00001f60| 6e 20 76 65 72 69 66 79 | 20 74 68 61 74 20 6e 6f |n verify| that no|
|00001f70| 77 20 6f 6e 6c 79 20 66 | 6f 75 72 0d 0a 68 6f 72 |w only f|our..hor|
|00001f80| 73 65 73 20 74 61 6b 65 | 20 70 61 72 74 20 69 6e |ses take| part in|
|00001f90| 20 74 68 65 20 72 61 63 | 65 2e 0d 0a 0d 0a 5c 73 | the rac|e.....\s|
|00001fa0| 65 63 74 69 6f 6e 7b 53 | 61 76 69 6e 67 20 61 20 |ection{S|aving a |
|00001fb0| 70 72 6f 67 72 61 6d 7d | 0d 0a 0d 0a 57 65 20 63 |program}|....We c|
|00001fc0| 61 6e 20 6e 6f 77 20 73 | 61 76 65 20 74 68 65 20 |an now s|ave the |
|00001fd0| 74 68 65 20 70 72 6f 67 | 72 61 6d 20 74 6f 20 61 |the prog|ram to a|
|00001fe0| 20 66 69 6c 65 20 62 79 | 20 6d 65 61 6e 73 20 6f | file by| means o|
|00001ff0| 66 20 74 68 65 20 77 72 | 69 74 65 2d 63 6f 6d 6d |f the wr|ite-comm|
|00002000| 61 6e 64 0d 0a 0d 0a 5c | 62 65 67 69 6e 7b 65 6c |and....\|begin{el|
|00002010| 61 6e 7d 0d 0a 20 20 20 | 20 20 20 20 20 77 0d 0a |an}.. | w..|
|00002020| 0d 0a 7c 20 20 20 20 20 | 20 20 4e 61 6d 65 3a 5c |..| | Name:\|
|00002030| 63 75 72 73 6f 72 0d 0a | 5c 65 6e 64 7b 65 6c 61 |cursor..|\end{ela|
|00002040| 6e 7d 0d 0a 0d 0a 5c 6e | 6f 69 6e 64 65 6e 74 0d |n}....\n|oindent.|
|00002050| 0a 57 65 20 68 61 76 65 | 20 74 6f 20 63 68 6f 6f |.We have| to choo|
|00002060| 73 65 20 61 20 6e 61 6d | 65 20 66 6f 72 20 74 68 |se a nam|e for th|
|00002070| 65 20 66 69 6c 65 2c 20 | 65 2e 67 2e 0d 0a 0d 0a |e file, |e.g.....|
|00002080| 5c 62 65 67 69 6e 7b 65 | 6c 61 6e 7d 0d 0a 20 20 |\begin{e|lan}.. |
|00002090| 20 20 20 20 20 20 72 61 | 63 65 34 3c 52 45 54 3e | ra|ce4<RET>|
|000020a0| 0d 0a 5c 65 6e 64 7b 65 | 6c 61 6e 7d 0d 0a 0d 0a |..\end{e|lan}....|
|000020b0| 5c 6e 6f 69 6e 64 65 6e | 74 0d 0a 4f 6e 20 74 68 |\noinden|t..On th|
|000020c0| 65 20 73 74 61 74 75 73 | 20 6c 69 6e 65 20 74 68 |e status| line th|
|000020d0| 65 20 6d 65 73 73 61 67 | 65 0d 0a 0d 0a 5c 62 65 |e messag|e....\be|
|000020e0| 67 69 6e 7b 65 6c 61 6e | 7d 0d 0a 7c 20 20 20 20 |gin{elan|}..| |
|000020f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002100| 20 20 20 20 20 20 20 20 | 20 20 20 57 72 69 74 69 | | Writi|
|00002110| 6e 67 2e 2e 2e 0d 0a 5c | 65 6e 64 7b 65 6c 61 6e |ng.....\|end{elan|
|00002120| 7d 0d 0a 0d 0a 5c 6e 6f | 69 6e 64 65 6e 74 0d 0a |}....\no|indent..|
|00002130| 61 70 70 65 61 72 73 20 | 61 6e 64 20 61 66 74 65 |appears |and afte|
|00002140| 72 20 73 6f 6d 65 20 74 | 69 6d 65 20 77 65 20 61 |r some t|ime we a|
|00002150| 67 61 69 6e 20 6f 62 74 | 61 69 6e 20 74 68 65 20 |gain obt|ain the |
|00002160| 70 72 6f 6d 70 74 0d 0a | 0d 0a 5c 62 65 67 69 6e |prompt..|..\begin|
|00002170| 7b 65 6c 61 6e 7d 0d 0a | 7c 20 20 20 20 20 20 20 |{elan}..|| |
|00002180| 70 72 6f 67 72 61 6d 3a | 5c 63 75 72 73 6f 72 0d |program:|\cursor.|
|00002190| 0a 5c 65 6e 64 7b 65 6c | 61 6e 7d 0d 0a 0d 0a 5c |.\end{el|an}....\|
|000021a0| 73 65 63 74 69 6f 6e 7b | 43 6c 65 61 72 69 6e 67 |section{|Clearing|
|000021b0| 20 74 68 65 20 6d 65 6d | 6f 72 79 7d 0d 0a 0d 0a | the mem|ory}....|
|000021c0| 57 65 20 63 61 6e 20 63 | 6c 65 61 72 20 74 68 65 |We can c|lear the|
|000021d0| 20 77 68 6f 6c 65 20 6d | 65 6d 6f 72 79 20 62 79 | whole m|emory by|
|000021e0| 20 6d 65 61 6e 73 20 6f | 66 20 74 68 65 20 63 6c | means o|f the cl|
|000021f0| 65 61 72 2d 63 6f 6d 6d | 61 6e 64 0d 0a 0d 0a 5c |ear-comm|and....\|
|00002200| 62 65 67 69 6e 7b 65 6c | 61 6e 7d 0d 0a 20 20 20 |begin{el|an}.. |
|00002210| 20 20 20 20 20 63 0d 0a | 5c 65 6e 64 7b 65 6c 61 | c..|\end{ela|
|00002220| 6e 7d 0d 0a 0d 0a 5c 6e | 6f 69 6e 64 65 6e 74 0d |n}....\n|oindent.|
|00002230| 0a 77 68 65 72 65 75 70 | 6f 6e 20 74 68 65 20 69 |.whereup|on the i|
|00002240| 6e 74 65 72 70 72 65 74 | 65 72 20 61 73 6b 73 20 |nterpret|er asks |
|00002250| 66 6f 72 20 63 6f 6e 66 | 69 72 6d 61 74 69 6f 6e |for conf|irmation|
|00002260| 0d 0a 0d 0a 5c 62 65 67 | 69 6e 7b 65 6c 61 6e 7d |....\beg|in{elan}|
|00002270| 0d 0a 7c 20 20 20 20 20 | 20 20 43 4c 45 41 52 20 |..| | CLEAR |
|00002280| 3f 5c 63 75 72 73 6f 72 | 0d 0a 5c 65 6e 64 7b 65 |?\cursor|..\end{e|
|00002290| 6c 61 6e 7d 0d 0a 0d 0a | 5c 6e 6f 69 6e 64 65 6e |lan}....|\noinden|
|000022a0| 74 0d 0a 54 68 65 20 74 | 77 6f 20 70 6f 73 73 69 |t..The t|wo possi|
|000022b0| 62 6c 65 20 61 6e 73 77 | 65 72 73 20 61 72 65 0d |ble answ|ers are.|
|000022c0| 0a 0d 0a 5c 62 65 67 69 | 6e 7b 65 6c 61 6e 7d 0d |...\begi|n{elan}.|
|000022d0| 0a 20 20 20 20 20 20 20 | 20 6e 0d 0a 5c 65 6e 64 |. | n..\end|
|000022e0| 7b 65 6c 61 6e 7d 0d 0a | 0d 0a 5c 6e 6f 69 6e 64 |{elan}..|..\noind|
|000022f0| 65 6e 74 0d 0a 77 68 65 | 72 65 75 70 6f 6e 20 74 |ent..whe|reupon t|
|00002300| 68 65 20 63 6f 6d 6d 61 | 6e 64 20 68 61 73 20 6e |he comma|nd has n|
|00002310| 6f 20 65 66 66 65 63 74 | 2c 20 61 6e 64 0d 0a 0d |o effect|, and...|
|00002320| 0a 5c 62 65 67 69 6e 7b | 65 6c 61 6e 7d 0d 0a 20 |.\begin{|elan}.. |
|00002330| 20 20 20 20 20 20 20 79 | 0d 0a 5c 65 6e 64 7b 65 | y|..\end{e|
|00002340| 6c 61 6e 7d 0d 0a 0d 0a | 5c 6e 6f 69 6e 64 65 6e |lan}....|\noinden|
|00002350| 74 0d 0a 77 68 69 63 68 | 20 63 61 75 73 65 73 20 |t..which| causes |
|00002360| 74 68 65 20 69 6e 74 65 | 72 70 72 65 74 65 72 20 |the inte|rpreter |
|00002370| 74 6f 20 63 6f 6d 65 20 | 62 61 63 6b 20 74 6f 20 |to come |back to |
|00002380| 69 74 73 20 69 6e 69 74 | 69 61 6c 20 73 74 61 74 |its init|ial stat|
|00002390| 65 0d 0a 77 69 74 68 20 | 61 6e 20 65 6d 70 74 79 |e..with |an empty|
|000023a0| 20 6d 65 6d 6f 72 79 2e | 0d 0a 0d 0a 5c 73 65 63 | memory.|....\sec|
|000023b0| 74 69 6f 6e 7b 44 69 72 | 65 63 74 6f 72 79 20 6f |tion{Dir|ectory o|
|000023c0| 66 20 66 69 6c 65 73 7d | 0d 0a 0d 0a 54 68 65 20 |f files}|....The |
|000023d0| 70 72 6f 67 72 61 6d 73 | 20 73 61 76 65 64 20 69 |programs| saved i|
|000023e0| 6e 20 74 68 69 73 20 66 | 61 73 68 69 6f 6e 20 63 |n this f|ashion c|
|000023f0| 61 6e 20 62 65 20 72 65 | 61 64 20 62 61 63 6b 20 |an be re|ad back |
|00002400| 66 72 6f 6d 20 66 69 6c | 65 0d 0a 69 6e 74 6f 20 |from fil|e..into |
|00002410| 6d 65 6d 6f 72 79 20 62 | 79 20 6d 65 61 6e 73 20 |memory b|y means |
|00002420| 6f 66 20 74 68 65 20 72 | 65 61 64 2d 63 6f 6d 6d |of the r|ead-comm|
|00002430| 61 6e 64 2e 20 53 69 6e | 63 65 20 77 65 20 6d 61 |and. Sin|ce we ma|
|00002440| 79 20 69 6e 20 74 69 6d | 65 0d 0a 66 6f 72 67 65 |y in tim|e..forge|
|00002450| 74 20 74 68 65 20 6e 61 | 6d 65 73 20 6f 66 20 6f |t the na|mes of o|
|00002460| 75 72 20 66 69 6c 65 73 | 2c 20 69 74 20 69 73 20 |ur files|, it is |
|00002470| 70 6f 73 73 69 62 6c 65 | 20 74 6f 20 67 65 74 20 |possible| to get |
|00002480| 61 20 64 69 72 65 63 74 | 6f 72 79 2c 0d 0a 69 2e |a direct|ory,..i.|
|00002490| 65 2e 20 6c 69 73 74 20 | 6f 66 20 66 69 6c 65 20 |e. list |of file |
|000024a0| 6e 61 6d 65 73 2e 20 57 | 65 20 6f 62 74 61 69 6e |names. W|e obtain|
|000024b0| 20 74 68 69 73 20 62 79 | 20 61 20 73 6f 6d 65 77 | this by| a somew|
|000024c0| 68 61 74 20 72 6f 75 6e | 64 61 62 6f 75 74 0d 0a |hat roun|dabout..|
|000024d0| 77 61 79 2c 20 76 69 7a | 2e 20 62 79 20 74 72 79 |way, viz|. by try|
|000024e0| 69 6e 67 20 74 6f 20 72 | 65 61 64 20 61 20 66 69 |ing to r|ead a fi|
|000024f0| 6c 65 20 74 68 61 74 20 | 69 73 20 64 65 66 69 6e |le that |is defin|
|00002500| 69 74 69 76 65 6c 79 20 | 6e 6f 74 20 74 68 65 72 |itively |not ther|
|00002510| 65 2c 0d 0a 65 2e 67 2e | 0d 0a 0d 0a 5c 62 65 67 |e,..e.g.|....\beg|
|00002520| 69 6e 7b 65 6c 61 6e 7d | 0d 0a 20 20 20 20 20 20 |in{elan}|.. |
|00002530| 20 20 72 0d 0a 0d 0a 7c | 20 20 20 20 20 20 20 4e | r....|| N|
|00002540| 61 6d 65 3a 5c 63 75 72 | 73 6f 72 0d 0a 0d 0a 20 |ame:\cur|sor.... |
|00002550| 20 20 20 20 20 20 20 72 | 72 72 72 72 3c 52 45 54 | r|rrrr<RET|
|00002560| 3e 0d 0a 5c 65 6e 64 7b | 65 6c 61 6e 7d 0d 0a 0d |>..\end{|elan}...|
|00002570| 0a 5c 6e 6f 69 6e 64 65 | 6e 74 0d 0a 57 65 20 63 |.\noinde|nt..We c|
|00002580| 61 6e 20 6e 6f 77 20 69 | 6e 73 70 65 63 74 20 74 |an now i|nspect t|
|00002590| 68 65 20 64 69 72 65 63 | 74 6f 72 79 20 74 6f 20 |he direc|tory to |
|000025a0| 64 65 63 69 64 65 20 77 | 68 61 74 20 69 73 20 74 |decide w|hat is t|
|000025b0| 68 65 20 6e 61 6d 65 20 | 6f 66 0d 0a 74 68 65 20 |he name |of..the |
|000025c0| 66 69 6c 65 20 77 65 20 | 77 61 6e 74 20 74 6f 20 |file we |want to |
|000025d0| 72 65 61 64 2e 0d 0a 0d | 0a 5c 73 65 63 74 69 6f |read....|.\sectio|
|000025e0| 6e 7b 45 6e 74 65 72 69 | 6e 67 20 61 20 6e 65 77 |n{Enteri|ng a new|
|000025f0| 20 70 72 6f 67 72 61 6d | 7d 0d 0a 0d 0a 49 74 20 | program|}....It |
|00002600| 69 73 20 6f 66 20 63 6f | 75 72 73 65 20 70 6f 73 |is of co|urse pos|
|00002610| 73 69 62 6c 65 20 74 6f | 20 69 6e 70 75 74 20 61 |sible to| input a|
|00002620| 20 70 72 6f 67 72 61 6d | 20 66 72 6f 6d 20 73 63 | program| from sc|
|00002630| 72 61 74 63 68 2e 0d 0a | 49 74 20 69 73 20 6e 6f |ratch...|It is no|
|00002640| 74 20 61 74 20 61 6c 6c | 20 61 64 76 69 73 61 62 |t at all| advisab|
|00002650| 6c 65 20 74 6f 20 70 72 | 6f 67 72 61 6d 20 77 68 |le to pr|ogram wh|
|00002660| 69 6c 73 74 20 73 69 74 | 74 69 6e 67 20 69 6e 20 |ilst sit|ting in |
|00002670| 66 72 6f 6e 74 0d 0a 6f | 66 20 74 68 65 20 63 6f |front..o|f the co|
|00002680| 6d 70 75 74 65 72 20 73 | 63 72 65 65 6e 2c 20 73 |mputer s|creen, s|
|00002690| 6f 20 77 65 20 61 73 73 | 75 6d 65 20 74 68 65 20 |o we ass|ume the |
|000026a0| 72 65 61 64 65 72 20 74 | 6f 20 68 61 76 65 20 77 |reader t|o have w|
|000026b0| 72 69 74 74 65 6e 0d 0a | 74 68 65 20 66 6f 6c 6c |ritten..|the foll|
|000026c0| 6f 77 69 6e 67 20 6c 69 | 74 74 6c 65 20 70 72 6f |owing li|ttle pro|
|000026d0| 67 72 61 6d 2c 20 74 68 | 61 74 20 68 65 20 6e 6f |gram, th|at he no|
|000026e0| 77 20 77 69 73 68 65 73 | 20 74 6f 20 65 6e 74 65 |w wishes| to ente|
|000026f0| 72 20 69 6e 74 6f 0d 0a | 74 68 65 20 63 6f 6d 70 |r into..|the comp|
|00002700| 75 74 65 72 3a 0d 0a 0d | 0a 5c 62 65 67 69 6e 7b |uter:...|.\begin{|
|00002710| 65 6c 61 6e 7d 0d 0a 20 | 20 20 20 20 20 20 20 6d |elan}.. | m|
|00002720| 79 20 66 69 72 73 74 20 | 70 72 6f 67 72 61 6d 3a |y first |program:|
|00002730| 0d 0a 20 20 20 20 20 20 | 20 20 20 20 72 65 61 64 |.. | read|
|00002740| 20 74 77 6f 20 6e 75 6d | 62 65 72 73 3b 0d 0a 20 | two num|bers;.. |
|00002750| 20 20 20 20 20 20 09 20 | 20 70 72 69 6e 74 20 74 | . | print t|
|00002760| 68 65 69 72 20 73 75 6d | 2e 0d 0a 0d 0a 20 20 20 |heir sum|..... |
|00002770| 20 20 20 20 20 72 65 61 | 64 20 74 77 6f 20 6e 75 | rea|d two nu|
|00002780| 6d 62 65 72 73 3a 0d 0a | 20 20 20 20 20 20 20 20 |mbers:..| |
|00002790| 20 20 72 65 61 64 20 66 | 69 72 73 74 20 6e 75 6d | read f|irst num|
|000027a0| 62 65 72 3b 0d 0a 20 20 | 20 20 20 20 20 20 20 20 |ber;.. | |
|000027b0| 72 65 61 64 20 73 65 63 | 6f 6e 64 20 6e 75 6d 62 |read sec|ond numb|
|000027c0| 65 72 2e 0d 0a 0d 0a 20 | 20 20 20 20 20 20 20 72 |er..... | r|
|000027d0| 65 61 64 20 66 69 72 73 | 74 20 6e 75 6d 62 65 72 |ead firs|t number|
|000027e0| 3a 0d 0a 20 20 20 20 20 | 20 20 20 20 20 49 4e 54 |:.. | INT|
|000027f0| 20 56 41 52 20 66 69 72 | 73 74 3b 0d 0a 20 20 20 | VAR fir|st;.. |
|00002800| 20 20 20 20 20 20 20 70 | 75 74 20 28 22 46 69 72 | p|ut ("Fir|
|00002810| 73 74 20 6e 75 6d 62 65 | 72 20 3d 20 22 29 3b 0d |st numbe|r = ");.|
|00002820| 0a 20 20 20 20 20 20 20 | 20 20 20 67 65 74 20 28 |. | get (|
|00002830| 66 69 72 73 74 29 3b 0d | 0a 20 20 20 20 20 20 20 |first);.|. |
|00002840| 20 20 20 6c 69 6e 65 2e | 0d 0a 0d 0a 20 20 20 20 | line.|.... |
|00002850| 20 20 20 20 72 65 61 64 | 20 73 65 63 6f 6e 64 20 | read| second |
|00002860| 6e 75 6d 62 65 72 3a 0d | 0a 20 20 20 20 20 20 20 |number:.|. |
|00002870| 20 20 20 49 4e 54 20 56 | 41 52 20 73 65 63 6f 6e | INT V|AR secon|
|00002880| 64 3b 0d 0a 20 20 20 20 | 20 20 20 20 20 20 70 75 |d;.. | pu|
|00002890| 74 20 28 22 53 65 63 6f | 6e 64 20 6e 75 6d 62 65 |t ("Seco|nd numbe|
|000028a0| 72 20 3d 20 22 29 3b 0d | 0a 20 20 20 20 20 20 20 |r = ");.|. |
|000028b0| 20 20 20 67 65 74 20 28 | 73 65 63 6f 6e 64 29 3b | get (|second);|
|000028c0| 0d 0a 20 20 20 20 20 20 | 20 20 20 20 6c 69 6e 65 |.. | line|
|000028d0| 2e 0d 0a 0d 0a 20 20 20 | 20 20 20 20 20 70 72 69 |..... | pri|
|000028e0| 6e 74 20 74 68 65 69 72 | 20 73 75 6d 3a 0d 0a 20 |nt their| sum:.. |
|000028f0| 20 20 20 20 20 20 20 20 | 20 6c 69 6e 65 3b 0d 0a | | line;..|
|00002900| 20 20 20 20 20 20 20 20 | 20 20 70 75 74 20 28 22 | | put ("|
|00002910| 53 75 6d 20 3d 20 22 29 | 3b 0d 0a 20 20 20 20 20 |Sum = ")|;.. |
|00002920| 20 20 20 20 20 70 75 74 | 20 28 66 69 72 73 74 20 | put| (first |
|00002930| 2b 20 73 65 63 6f 6e 64 | 29 2e 0d 0a 5c 65 6e 64 |+ second|)...\end|
|00002940| 7b 65 6c 61 6e 7d 0d 0a | 0d 0a 41 66 74 65 72 20 |{elan}..|..After |
|00002950| 73 74 61 72 74 69 6e 67 | 20 74 68 65 20 45 6c 61 |starting| the Ela|
|00002960| 6e 20 50 72 6f 67 72 61 | 6d 6d 69 6e 67 20 45 6e |n Progra|mming En|
|00002970| 76 69 72 6f 6e 6d 65 6e | 74 2c 20 66 69 72 73 74 |vironmen|t, first|
|00002980| 20 66 6f 63 75 73 0d 0a | 6f 6e 20 74 68 65 20 6e | focus..|on the n|
|00002990| 61 6d 65 20 6f 66 20 74 | 68 65 20 72 65 66 69 6e |ame of t|he refin|
|000029a0| 65 6d 65 6e 74 20 77 68 | 69 63 68 20 69 73 20 74 |ement wh|ich is t|
|000029b0| 6f 20 73 65 72 76 65 20 | 61 73 20 74 68 65 20 72 |o serve |as the r|
|000029c0| 6f 6f 74 0d 0a 6f 66 20 | 74 68 65 20 70 72 6f 67 |oot..of |the prog|
|000029d0| 72 61 6d 2e 0d 0a 53 69 | 6e 63 65 20 69 74 20 69 |ram...Si|nce it i|
|000029e0| 73 20 72 61 74 68 65 72 | 20 68 61 72 64 20 74 6f |s rather| hard to|
|000029f0| 20 63 68 61 6e 67 65 20 | 74 68 65 20 6e 61 6d 65 | change |the name|
|00002a00| 20 6f 66 20 74 68 65 20 | 72 6f 6f 74 20 6f 6e 63 | of the |root onc|
|00002a10| 65 0d 0a 69 74 20 69 73 | 20 63 68 6f 73 65 6e 2c |e..it is| chosen,|
|00002a20| 20 77 65 20 68 61 76 65 | 20 74 6f 20 63 68 6f 6f | we have| to choo|
|00002a30| 73 65 20 69 74 20 77 69 | 74 68 20 63 61 72 65 2e |se it wi|th care.|
|00002a40| 0d 0a 0d 0a 5c 62 65 67 | 69 6e 7b 65 6c 61 6e 7d |....\beg|in{elan}|
|00002a50| 0d 0a 20 20 20 20 20 20 | 20 20 66 0d 0a 0d 0a 7c |.. | f....||
|00002a60| 20 20 20 20 20 20 20 4e | 61 6d 65 3a 5c 63 75 72 | N|ame:\cur|
|00002a70| 73 6f 72 0d 0a 0d 0a 20 | 20 20 20 20 20 20 20 6d |sor.... | m|
|00002a80| 79 20 66 69 72 73 74 20 | 70 72 6f 67 72 61 6d 3c |y first |program<|
|00002a90| 52 45 54 3e 0d 0a 5c 65 | 6e 64 7b 65 6c 61 6e 7d |RET>..\e|nd{elan}|
|00002aa0| 0d 0a 0d 0a 5c 6e 6f 69 | 6e 64 65 6e 74 0d 0a 54 |....\noi|ndent..T|
|00002ab0| 68 65 20 70 72 6f 6d 70 | 74 20 74 65 6c 6c 73 20 |he promp|t tells |
|00002ac0| 75 73 20 77 65 20 68 61 | 76 65 20 66 6f 63 75 73 |us we ha|ve focus|
|00002ad0| 73 65 64 20 73 75 63 63 | 65 73 73 66 75 6c 6c 79 |sed succ|essfully|
|00002ae0| 2e 0d 0a 0d 0a 5c 62 65 | 67 69 6e 7b 65 6c 61 6e |.....\be|gin{elan|
|00002af0| 7d 0d 0a 7c 20 20 20 20 | 20 20 20 6d 79 20 66 69 |}..| | my fi|
|00002b00| 72 73 74 20 70 72 6f 67 | 72 61 6d 20 3f 5c 63 75 |rst prog|ram ?\cu|
|00002b10| 72 73 6f 72 0d 0a 5c 65 | 6e 64 7b 65 6c 61 6e 7d |rsor..\e|nd{elan}|
|00002b20| 0d 0a 0d 0a 5c 6e 6f 69 | 6e 64 65 6e 74 0d 0a 57 |....\noi|ndent..W|
|00002b30| 65 20 6e 6f 77 20 73 75 | 70 70 6c 79 20 61 20 64 |e now su|pply a d|
|00002b40| 65 66 69 6e 69 74 69 6f | 6e 20 66 6f 72 20 74 68 |efinitio|n for th|
|00002b50| 65 20 72 6f 6f 74 20 62 | 79 20 6d 65 61 6e 73 20 |e root b|y means |
|00002b60| 6f 66 20 74 68 65 20 65 | 64 69 74 6f 72 2e 0d 0a |of the e|ditor...|
|00002b70| 0d 0a 5c 62 65 67 69 6e | 7b 65 6c 61 6e 7d 0d 0a |..\begin|{elan}..|
|00002b80| 20 20 20 20 20 20 20 20 | 65 0d 0a 0d 0a 7c 20 20 | |e....| |
|00002b90| 20 20 20 20 20 6d 79 20 | 66 69 72 73 74 20 70 72 | my |first pr|
|00002ba0| 6f 67 72 61 6d 3a 0d 0a | 7c 20 20 20 20 20 20 20 |ogram:..|| |
|00002bb0| 5c 63 75 72 73 6f 72 0d | 0a 5c 65 6e 64 7b 65 6c |\cursor.|.\end{el|
|00002bc0| 61 6e 7d 0d 0a 0d 0a 5c | 6e 6f 69 6e 64 65 6e 74 |an}....\|noindent|
|00002bd0| 0d 0a 57 65 20 74 79 70 | 65 3a 0d 0a 0d 0a 5c 62 |..We typ|e:....\b|
|00002be0| 65 67 69 6e 7b 65 6c 61 | 6e 7d 0d 0a 20 20 20 20 |egin{ela|n}.. |
|00002bf0| 20 20 20 20 72 65 61 64 | 20 74 77 6f 20 6e 75 6d | read| two num|
|00002c00| 62 65 72 73 3b 70 72 69 | 6e 74 20 74 68 65 69 72 |bers;pri|nt their|
|00002c10| 20 73 75 6d 2e 3c 52 45 | 54 3e 0d 0a 0d 0a 7c 20 | sum.<RE|T>....| |
|00002c20| 20 20 20 20 20 20 6d 79 | 20 66 69 72 73 74 20 70 | my| first p|
|00002c30| 72 6f 67 72 61 6d 3a 5c | 63 75 72 73 6f 72 0d 0a |rogram:\|cursor..|
|00002c40| 5c 65 6e 64 7b 65 6c 61 | 6e 7d 0d 0a 0d 0a 5c 6e |\end{ela|n}....\n|
|00002c50| 6f 69 6e 64 65 6e 74 0d | 0a 54 68 65 20 70 72 6f |oindent.|.The pro|
|00002c60| 6d 70 74 20 6e 6f 77 20 | 74 65 6c 6c 73 20 75 73 |mpt now |tells us|
|00002c70| 20 74 68 61 74 20 74 68 | 65 20 72 6f 6f 74 20 69 | that th|e root i|
|00002c80| 73 20 61 20 72 65 66 69 | 6e 65 6d 65 6e 74 2e 0d |s a refi|nement..|
|00002c90| 0a 4e 6f 74 69 63 65 20 | 74 68 61 74 20 77 65 20 |.Notice |that we |
|00002ca0| 6e 65 65 64 20 6e 6f 74 | 20 74 61 6b 65 20 70 61 |need not| take pa|
|00002cb0| 72 74 69 63 75 6c 61 72 | 20 70 61 69 6e 73 20 74 |rticular| pains t|
|00002cc0| 6f 20 6d 61 6b 65 20 61 | 0d 0a 6e 69 63 65 20 6c |o make a|..nice l|
|00002cd0| 61 79 6f 75 74 2c 20 62 | 65 63 61 75 73 65 20 74 |ayout, b|ecause t|
|00002ce0| 68 65 20 7b 5c 65 6d 20 | 70 72 65 74 74 79 20 70 |he {\em |pretty p|
|00002cf0| 72 69 6e 74 69 6e 67 7d | 20 66 75 6e 63 74 69 6f |rinting}| functio|
|00002d00| 6e 0d 0a 6f 66 20 74 68 | 65 20 73 68 6f 77 2d 63 |n..of th|e show-c|
|00002d10| 6f 6d 6d 61 6e 64 20 77 | 69 6c 6c 20 73 74 61 6e |ommand w|ill stan|
|00002d20| 64 61 72 64 69 7a 65 20 | 74 68 65 20 6c 61 79 6f |dardize |the layo|
|00002d30| 75 74 20 61 6e 79 77 61 | 79 2e 0d 0a 0d 0a 5c 62 |ut anywa|y.....\b|
|00002d40| 65 67 69 6e 7b 65 6c 61 | 6e 7d 0d 0a 20 20 20 20 |egin{ela|n}.. |
|00002d50| 20 20 20 20 73 0d 0a 0d | 0a 7c 20 20 20 20 20 20 | s...|.| |
|00002d60| 20 6d 79 20 66 69 72 73 | 74 20 70 72 6f 67 72 61 | my firs|t progra|
|00002d70| 6d 3a 0d 0a 7c 20 20 20 | 20 20 20 20 20 20 72 65 |m:..| | re|
|00002d80| 61 64 20 74 77 6f 20 6e | 75 6d 62 65 72 73 3b 0d |ad two n|umbers;.|
|00002d90| 0a 7c 20 20 20 20 20 20 | 20 20 20 70 72 69 6e 74 |.| | print|
|00002da0| 20 74 68 65 69 72 20 73 | 75 6d 2e 0d 0a 7c 0d 0a | their s|um...|..|
|00002db0| 7c 20 20 20 20 20 20 20 | 6d 79 20 66 69 72 73 74 || |my first|
|00002dc0| 20 70 72 6f 67 72 61 6d | 3a 5c 63 75 72 73 6f 72 | program|:\cursor|
|00002dd0| 0d 0a 5c 65 6e 64 7b 65 | 6c 61 6e 7d 0d 0a 0d 0a |..\end{e|lan}....|
|00002de0| 5c 73 65 63 74 69 6f 6e | 7b 41 75 74 6f 6d 61 74 |\section|{Automat|
|00002df0| 69 63 20 67 75 69 64 61 | 6e 63 65 20 6f 66 20 69 |ic guida|nce of i|
|00002e00| 6e 70 75 74 7d 0d 0a 0d | 0a 54 68 65 20 70 72 6f |nput}...|.The pro|
|00002e10| 73 70 65 63 74 20 6f 66 | 20 65 6e 74 65 72 69 6e |spect of| enterin|
|00002e20| 67 20 74 68 65 20 72 65 | 6d 61 69 6e 69 6e 67 20 |g the re|maining |
|00002e30| 72 65 66 69 6e 65 6d 65 | 6e 74 73 20 6f 6e 65 20 |refineme|nts one |
|00002e40| 62 79 20 6f 6e 65 2c 0d | 0a 62 79 20 66 69 72 73 |by one,.|.by firs|
|00002e50| 74 20 66 6f 63 75 73 73 | 69 6e 67 20 6f 6e 20 74 |t focuss|ing on t|
|00002e60| 68 65 69 72 20 6e 61 6d | 65 20 61 6e 64 20 74 68 |heir nam|e and th|
|00002e70| 65 6e 20 75 73 69 6e 67 | 20 74 68 65 20 65 64 69 |en using| the edi|
|00002e80| 74 6f 72 2c 20 69 73 0d | 0a 72 61 74 68 65 72 20 |tor, is.|.rather |
|00002e90| 66 6f 72 62 69 64 64 69 | 6e 67 2e 0d 0a 4c 75 63 |forbiddi|ng...Luc|
|00002ea0| 6b 69 6c 79 20 74 68 65 | 72 65 20 69 73 20 61 20 |kily the|re is a |
|00002eb0| 70 6f 73 73 69 62 69 6c | 69 74 79 20 74 6f 20 61 |possibil|ity to a|
|00002ec0| 76 6f 69 64 20 61 6c 6c | 20 74 68 65 20 65 66 66 |void all| the eff|
|00002ed0| 6f 72 74 20 6f 66 20 66 | 6f 63 75 73 73 69 6e 67 |ort of f|ocussing|
|00002ee0| 0d 0a 61 6e 64 20 72 65 | 74 79 70 69 6e 67 20 6e |..and re|typing n|
|00002ef0| 61 6d 65 73 3a 20 77 65 | 20 63 61 6e 20 62 65 20 |ames: we| can be |
|00002f00| 67 75 69 64 65 64 20 62 | 79 20 74 68 65 20 45 6c |guided b|y the El|
|00002f10| 61 6e 20 50 72 6f 67 72 | 61 6d 6d 69 6e 67 20 45 |an Progr|amming E|
|00002f20| 6e 76 69 72 6f 6e 6d 65 | 6e 74 2c 0d 0a 73 6f 20 |nvironme|nt,..so |
|00002f30| 74 68 61 74 20 77 65 20 | 68 61 76 65 20 74 6f 20 |that we |have to |
|00002f40| 69 6e 70 75 74 20 6f 6e | 6c 79 20 74 68 65 20 62 |input on|ly the b|
|00002f50| 6f 64 69 65 73 20 6f 66 | 20 74 68 65 20 72 65 66 |odies of| the ref|
|00002f60| 69 6e 65 6d 65 6e 74 73 | 2e 0d 0a 0d 0a 57 65 20 |inements|.....We |
|00002f70| 61 72 65 20 66 6f 63 75 | 73 73 65 64 20 6f 6e 20 |are focu|ssed on |
|00002f80| 74 68 65 20 72 6f 6f 74 | 20 61 6e 64 20 74 72 79 |the root| and try|
|00002f90| 20 74 6f 20 65 78 65 63 | 75 74 65 20 69 74 2e 0d | to exec|ute it..|
|00002fa0| 0a 0d 0a 5c 62 65 67 69 | 6e 7b 65 6c 61 6e 7d 0d |...\begi|n{elan}.|
|00002fb0| 0a 7c 20 20 20 20 20 20 | 20 6d 79 20 66 69 72 73 |.| | my firs|
|00002fc0| 74 20 70 72 6f 67 72 61 | 6d 3a 5c 63 75 72 73 6f |t progra|m:\curso|
|00002fd0| 72 0d 0a 0d 0a 20 20 20 | 20 20 20 20 20 78 0d 0a |r.... | x..|
|00002fe0| 5c 65 6e 64 7b 65 6c 61 | 6e 7d 0d 0a 0d 0a 5c 6e |\end{ela|n}....\n|
|00002ff0| 6f 69 6e 64 65 6e 74 0d | 0a 49 6d 6d 65 64 69 61 |oindent.|.Immedia|
|00003000| 74 65 6c 79 20 77 65 20 | 61 72 65 20 77 61 72 6e |tely we |are warn|
|00003010| 65 64 20 6f 66 20 74 68 | 65 20 66 61 63 74 20 74 |ed of th|e fact t|
|00003020| 68 61 74 20 74 68 65 20 | 66 69 72 73 74 20 72 65 |hat the |first re|
|00003030| 66 69 6e 65 6d 65 6e 74 | 20 69 73 20 75 6e 6b 6e |finement| is unkn|
|00003040| 6f 77 6e 2e 0d 0a 0d 0a | 5c 62 65 67 69 6e 7b 65 |own.....|\begin{e|
|00003050| 6c 61 6e 7d 0d 0a 7c 20 | 20 20 20 20 20 20 72 65 |lan}..| | re|
|00003060| 61 64 20 74 77 6f 20 6e | 75 6d 62 65 72 73 0d 0a |ad two n|umbers..|
|00003070| 7c 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 || | |
|00003080| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003090| 72 65 61 64 20 74 77 6f | 20 6e 75 6d 62 65 72 73 |read two| numbers|
|000030a0| 5c 63 75 72 73 6f 72 0d | 0a 0d 0a 7c 20 20 20 20 |\cursor.|...| |
|000030b0| 20 20 20 43 61 6e 27 74 | 20 69 64 65 6e 74 69 66 | Can't| identif|
|000030c0| 79 20 20 20 20 20 20 20 | 20 20 20 42 61 63 6b 74 |y | Backt|
|000030d0| 72 61 63 65 20 63 6f 6d | 6d 61 6e 64 2c 20 70 6c |race com|mand, pl|
|000030e0| 65 61 73 65 2e 2e 2e 0d | 0a 5c 65 6e 64 7b 65 6c |ease....|.\end{el|
|000030f0| 61 6e 7d 0d 0a 0d 0a 5c | 6e 6f 69 6e 64 65 6e 74 |an}....\|noindent|
|00003100| 0d 0a 57 65 20 61 72 65 | 20 6e 6f 77 20 69 6e 20 |..We are| now in |
|00003110| 62 61 63 6b 74 72 61 63 | 65 2d 6d 6f 6f 64 2c 20 |backtrac|e-mood, |
|00003120| 61 6e 64 20 67 69 76 65 | 20 74 68 65 20 65 64 69 |and give| the edi|
|00003130| 74 2d 63 6f 6d 6d 61 6e | 64 0d 0a 0d 0a 5c 62 65 |t-comman|d....\be|
|00003140| 67 69 6e 7b 65 6c 61 6e | 7d 0d 0a 20 20 20 20 20 |gin{elan|}.. |
|00003150| 20 20 20 65 0d 0a 5c 65 | 6e 64 7b 65 6c 61 6e 7d | e..\e|nd{elan}|
|00003160| 0d 0a 0d 0a 5c 6e 6f 69 | 6e 64 65 6e 74 0d 0a 54 |....\noi|ndent..T|
|00003170| 68 65 20 45 6c 61 6e 20 | 50 72 6f 67 72 61 6d 6d |he Elan |Programm|
|00003180| 69 6e 67 20 45 6e 76 69 | 72 6f 6e 6d 65 6e 74 20 |ing Envi|ronment |
|00003190| 72 65 73 70 6f 6e 64 73 | 20 62 79 0d 0a 0d 0a 5c |responds| by....\|
|000031a0| 62 65 67 69 6e 7b 65 6c | 61 6e 7d 0d 0a 7c 20 20 |begin{el|an}..| |
|000031b0| 20 20 20 20 20 72 65 61 | 64 20 74 77 6f 20 6e 75 | rea|d two nu|
|000031c0| 6d 62 65 72 73 3a 0d 0a | 7c 20 20 20 20 20 20 20 |mbers:..|| |
|000031d0| 5c 63 75 72 73 6f 72 0d | 0a 5c 65 6e 64 7b 65 6c |\cursor.|.\end{el|
|000031e0| 61 6e 7d 0d 0a 0d 0a 5c | 6e 6f 69 6e 64 65 6e 74 |an}....\|noindent|
|000031f0| 0d 0a 41 66 74 65 72 20 | 77 65 20 65 6e 74 65 72 |..After |we enter|
|00003200| 20 74 68 65 20 62 6f 64 | 79 2c 20 77 65 20 72 65 | the bod|y, we re|
|00003210| 74 75 72 6e 20 74 6f 20 | 74 68 65 20 72 6f 6f 74 |turn to |the root|
|00003220| 20 6f 66 20 74 68 65 20 | 70 72 6f 67 72 61 6d 2c | of the |program,|
|00003230| 0d 0a 77 68 69 63 68 20 | 77 65 20 74 72 79 20 74 |..which |we try t|
|00003240| 6f 20 65 78 65 63 75 74 | 65 20 61 67 61 69 6e 2e |o execut|e again.|
|00003250| 0d 0a 0d 0a 49 6e 20 74 | 68 69 73 20 77 61 79 2c |....In t|his way,|
|00003260| 20 77 65 20 61 72 65 20 | 6d 61 64 65 20 74 6f 20 | we are |made to |
|00003270| 65 6e 74 65 72 20 6f 6e | 65 20 72 65 66 69 6e 65 |enter on|e refine|
|00003280| 6d 65 6e 74 20 61 74 20 | 61 20 74 69 6d 65 2c 20 |ment at |a time, |
|00003290| 75 6e 74 69 6c 0d 0a 74 | 68 65 20 70 72 6f 67 72 |until..t|he progr|
|000032a0| 61 6d 20 69 73 20 63 6f | 6d 70 6c 65 74 65 2e 0d |am is co|mplete..|
|000032b0| 0a 54 68 69 73 20 67 75 | 69 64 61 6e 63 65 20 64 |.This gu|idance d|
|000032c0| 75 72 69 6e 67 20 69 6e | 70 75 74 20 61 6c 6c 6f |uring in|put allo|
|000032d0| 77 73 20 75 73 20 74 6f | 20 74 79 70 65 20 6d 6f |ws us to| type mo|
|000032e0| 73 74 20 72 65 66 69 6e | 65 6d 65 6e 74 20 6e 61 |st refin|ement na|
|000032f0| 6d 65 73 0d 0a 6f 6e 6c | 79 20 6f 6e 63 65 2c 20 |mes..onl|y once, |
|00003300| 74 68 75 73 20 61 6c 6c | 65 76 69 61 74 69 6e 67 |thus all|eviating|
|00003310| 20 6f 6e 65 20 6f 66 20 | 74 68 65 20 64 72 61 77 | one of |the draw|
|00003320| 62 61 63 6b 73 20 6f 66 | 20 54 6f 70 2d 44 6f 77 |backs of| Top-Dow|
|00003330| 6e 20 70 72 6f 67 72 61 | 6d 6d 69 6e 67 0d 0a 61 |n progra|mming..a|
|00003340| 6e 64 20 65 6e 63 6f 75 | 72 61 67 69 6e 67 20 74 |nd encou|raging t|
|00003350| 68 65 20 75 73 65 20 6f | 66 20 6d 65 61 6e 69 6e |he use o|f meanin|
|00003360| 67 66 75 6c 20 69 64 65 | 6e 74 69 66 69 65 72 73 |gful ide|ntifiers|
|00003370| 2e 0d 0a 0d 0a 5c 73 65 | 63 74 69 6f 6e 7b 45 6e |.....\se|ction{En|
|00003380| 74 65 72 69 6e 67 20 70 | 72 6f 63 65 64 75 72 65 |tering p|rocedure|
|00003390| 73 20 61 6e 64 20 74 79 | 70 65 73 7d 0d 0a 0d 0a |s and ty|pes}....|
|000033a0| 4f 6e 63 65 20 79 6f 75 | 20 72 65 61 63 68 20 74 |Once you| reach t|
|000033b0| 68 65 20 73 74 61 67 65 | 20 6f 66 20 42 6f 74 74 |he stage| of Bott|
|000033c0| 6f 6d 2d 55 70 20 70 72 | 6f 67 72 61 6d 6d 69 6e |om-Up pr|ogrammin|
|000033d0| 67 2c 20 79 6f 75 20 6d | 75 73 74 20 6c 65 61 72 |g, you m|ust lear|
|000033e0| 6e 20 68 6f 77 20 74 6f | 0d 0a 69 6e 70 75 74 20 |n how to|..input |
|000033f0| 79 6f 75 72 20 6f 77 6e | 20 74 79 70 65 73 2c 20 |your own| types, |
|00003400| 70 72 6f 63 65 64 75 72 | 65 73 20 61 6e 64 20 6f |procedur|es and o|
|00003410| 70 65 72 61 74 6f 72 73 | 2e 20 59 6f 75 20 64 6f |perators|. You do|
|00003420| 20 74 68 69 73 20 62 79 | 20 66 69 72 73 74 0d 0a | this by| first..|
|00003430| 66 6f 63 75 73 73 69 6e | 67 20 6f 6e 20 61 6e 79 |focussin|g on any|
|00003440| 20 6e 61 6d 65 20 28 66 | 6f 72 20 69 6e 73 74 61 | name (f|or insta|
|00003450| 6e 63 65 20 74 68 65 20 | 6e 61 6d 65 20 6f 66 20 |nce the |name of |
|00003460| 74 68 65 20 74 79 70 65 | 20 6f 72 20 70 72 6f 63 |the type| or proc|
|00003470| 65 64 75 72 65 20 79 6f | 75 0d 0a 77 61 6e 74 20 |edure yo|u..want |
|00003480| 74 6f 20 65 6e 74 65 72 | 29 2c 20 67 69 76 65 20 |to enter|), give |
|00003490| 74 68 65 20 65 64 69 74 | 2d 63 6f 6d 6d 61 6e 64 |the edit|-command|
|000034a0| 20 61 6e 64 20 74 68 65 | 6e 20 65 6e 74 65 72 20 | and the|n enter |
|000034b0| 69 74 73 20 63 6f 6d 70 | 6c 65 74 65 0d 0a 64 65 |its comp|lete..de|
|000034c0| 63 6c 61 72 61 74 69 6f | 6e 20 66 6f 6c 6c 6f 77 |claratio|n follow|
|000034d0| 65 64 20 62 79 20 61 20 | 73 65 6d 69 63 6f 6c 6f |ed by a |semicolo|
|000034e0| 6e 2e 0d 0a 0d 0a 53 6f | 6d 65 20 65 78 61 6d 70 |n.....So|me examp|
|000034f0| 6c 65 73 2e 20 4c 65 74 | 20 75 73 20 66 69 72 73 |les. Let| us firs|
|00003500| 74 20 65 6e 74 65 72 20 | 61 20 70 72 6f 63 65 64 |t enter |a proced|
|00003510| 75 72 65 20 7b 5c 74 74 | 20 6e 65 77 20 6e 75 6d |ure {\tt| new num|
|00003520| 62 65 72 7d 2e 0d 0a 0d | 0a 5c 62 65 67 69 6e 7b |ber}....|.\begin{|
|00003530| 65 6c 61 6e 7d 0d 0a 20 | 20 20 20 20 20 20 20 66 |elan}.. | f|
|00003540| 0d 0a 0d 0a 7c 20 20 20 | 20 20 20 20 4e 61 6d 65 |....| | Name|
|00003550| 3a 5c 63 75 72 73 6f 72 | 0d 0a 0d 0a 20 20 20 20 |:\cursor|.... |
|00003560| 20 20 20 20 6e 65 77 20 | 6e 75 6d 62 65 72 3c 52 | new |number<R|
|00003570| 45 54 3e 0d 0a 0d 0a 7c | 20 20 20 20 20 20 20 6e |ET>....|| n|
|00003580| 65 77 20 6e 75 6d 62 65 | 72 20 3f 5c 63 75 72 73 |ew numbe|r ?\curs|
|00003590| 6f 72 0d 0a 5c 65 6e 64 | 7b 65 6c 61 6e 7d 0d 0a |or..\end|{elan}..|
|000035a0| 0d 0a 5c 6e 6f 69 6e 64 | 65 6e 74 0d 0a 54 68 65 |..\noind|ent..The|
|000035b0| 20 45 6c 61 6e 20 50 72 | 6f 67 72 61 6d 6d 69 6e | Elan Pr|ogrammin|
|000035c0| 67 20 45 6e 76 69 72 6f | 6e 6d 65 6e 74 20 74 61 |g Enviro|nment ta|
|000035d0| 6b 65 73 20 74 68 69 73 | 20 66 6f 72 20 61 20 72 |kes this| for a r|
|000035e0| 65 66 69 6e 65 6d 65 6e | 74 20 6e 61 6d 65 2e 0d |efinemen|t name..|
|000035f0| 0a 0d 0a 5c 62 65 67 69 | 6e 7b 65 6c 61 6e 7d 0d |...\begi|n{elan}.|
|00003600| 0a 20 20 20 20 20 20 20 | 20 65 0d 0a 0d 0a 7c 20 |. | e....| |
|00003610| 20 20 20 20 20 20 6e 65 | 77 20 6e 75 6d 62 65 72 | ne|w number|
|00003620| 3a 0d 0a 7c 20 20 20 20 | 20 20 20 5c 63 75 72 73 |:..| | \curs|
|00003630| 6f 72 0d 0a 5c 65 6e 64 | 7b 65 6c 61 6e 7d 0d 0a |or..\end|{elan}..|
|00003640| 0d 0a 5c 6e 6f 69 6e 64 | 65 6e 74 0d 0a 57 65 20 |..\noind|ent..We |
|00003650| 65 64 69 74 20 74 68 65 | 20 74 65 78 74 20 6f 6e |edit the| text on|
|00003660| 20 74 68 65 20 73 63 72 | 65 65 6e 20 75 6e 74 69 | the scr|een unti|
|00003670| 6c 20 77 65 20 68 61 76 | 65 20 6f 62 74 61 69 6e |l we hav|e obtain|
|00003680| 65 64 20 61 20 63 6f 6d | 70 6c 65 74 65 0d 0a 70 |ed a com|plete..p|
|00003690| 72 6f 63 65 64 75 72 65 | 20 64 65 63 6c 61 72 61 |rocedure| declara|
|000036a0| 74 69 6f 6e 2c 20 66 6f | 6c 6c 6f 77 65 64 20 62 |tion, fo|llowed b|
|000036b0| 79 20 61 20 73 65 6d 69 | 63 6f 6c 6f 6e 2e 0d 0a |y a semi|colon...|
|000036c0| 0d 0a 5c 62 65 67 69 6e | 7b 65 6c 61 6e 7d 0d 0a |..\begin|{elan}..|
|000036d0| 20 20 20 20 20 20 20 20 | 49 4e 54 20 50 52 4f 43 | |INT PROC|
|000036e0| 20 6e 65 77 20 6e 75 6d | 62 65 72 3a 3c 52 45 54 | new num|ber:<RET|
|000036f0| 3e 0d 0a 20 20 20 20 20 | 20 20 20 20 20 49 4e 54 |>.. | INT|
|00003700| 20 56 41 52 20 6e 3b 3c | 52 45 54 3e 0d 0a 20 20 | VAR n;<|RET>.. |
|00003710| 20 20 20 20 20 20 20 20 | 67 65 74 28 6e 29 3b 3c | |get(n);<|
|00003720| 52 45 54 3e 0d 0a 20 20 | 20 20 20 20 20 20 20 20 |RET>.. | |
|00003730| 6e 3c 52 45 54 3e 0d 0a | 20 20 20 20 20 20 20 20 |n<RET>..| |
|00003740| 45 4e 44 50 52 4f 43 20 | 6e 65 77 20 6e 75 6d 62 |ENDPROC |new numb|
|00003750| 65 72 3b 3c 52 45 54 3e | 0d 0a 5c 65 6e 64 7b 65 |er;<RET>|..\end{e|
|00003760| 6c 61 6e 7d 0d 0a 0d 0a | 5c 6e 6f 69 6e 64 65 6e |lan}....|\noinden|
|00003770| 74 0d 0a 57 65 20 63 61 | 6e 20 6e 6f 77 20 73 65 |t..We ca|n now se|
|00003780| 65 20 66 72 6f 6d 20 74 | 68 65 20 70 72 6f 6d 70 |e from t|he promp|
|00003790| 74 20 74 68 61 74 20 6f | 75 72 20 66 6f 63 75 73 |t that o|ur focus|
|000037a0| 20 69 73 20 61 20 70 72 | 6f 63 65 64 75 72 65 0d | is a pr|ocedure.|
|000037b0| 0a 0d 0a 5c 62 65 67 69 | 6e 7b 65 6c 61 6e 7d 0d |...\begi|n{elan}.|
|000037c0| 0a 20 20 20 20 20 20 20 | 20 49 4e 54 20 50 52 4f |. | INT PRO|
|000037d0| 43 20 6e 65 77 20 6e 75 | 6d 62 65 72 5c 63 75 72 |C new nu|mber\cur|
|000037e0| 73 6f 72 0d 0a 5c 65 6e | 64 7b 65 6c 61 6e 7d 0d |sor..\en|d{elan}.|
|000037f0| 0a 0d 0a 41 73 20 61 20 | 73 65 63 6f 6e 64 20 65 |...As a |second e|
|00003800| 78 61 6d 70 6c 65 2c 20 | 6c 65 74 20 75 73 20 65 |xample, |let us e|
|00003810| 6e 74 65 72 20 61 20 74 | 79 70 65 2d 64 65 63 6c |nter a t|ype-decl|
|00003820| 61 72 61 74 69 6f 6e 2e | 0d 0a 0d 0a 5c 62 65 67 |aration.|....\beg|
|00003830| 69 6e 7b 65 6c 61 6e 7d | 0d 0a 20 20 20 20 20 20 |in{elan}|.. |
|00003840| 20 20 66 0d 0a 0d 0a 7c | 20 20 20 20 20 20 20 4e | f....|| N|
|00003850| 61 6d 65 3a 5c 63 75 72 | 73 6f 72 0d 0a 0d 0a 20 |ame:\cur|sor.... |
|00003860| 20 20 20 20 20 20 20 43 | 4f 4d 50 4c 3c 52 45 54 | C|OMPL<RET|
|00003870| 3e 0d 0a 0d 0a 7c 20 20 | 20 20 20 20 20 43 4f 4d |>....| | COM|
|00003880| 50 4c 20 3f 5c 63 75 72 | 73 6f 72 0d 0a 5c 65 6e |PL ?\cur|sor..\en|
|00003890| 64 7b 65 6c 61 6e 7d 0d | 0a 0d 0a 5c 6e 6f 69 6e |d{elan}.|...\noin|
|000038a0| 64 65 6e 74 0d 0a 57 65 | 20 6d 61 73 73 61 67 65 |dent..We| massage|
|000038b0| 20 74 68 69 73 20 74 65 | 78 74 20 6f 6e 20 74 68 | this te|xt on th|
|000038c0| 65 20 73 63 72 65 65 6e | 20 69 6e 74 6f 20 74 68 |e screen| into th|
|000038d0| 65 20 74 79 70 65 2d 64 | 65 63 6c 61 72 61 74 69 |e type-d|eclarati|
|000038e0| 6f 6e 20 77 65 0d 0a 77 | 61 6e 74 20 74 6f 20 68 |on we..w|ant to h|
|000038f0| 61 76 65 2e 0d 0a 0d 0a | 5c 62 65 67 69 6e 7b 65 |ave.....|\begin{e|
|00003900| 6c 61 6e 7d 0d 0a 20 20 | 20 20 20 20 20 20 54 59 |lan}.. | TY|
|00003910| 50 45 20 43 4f 4d 50 4c | 20 3d 20 53 54 52 55 43 |PE COMPL| = STRUC|
|00003920| 54 20 28 52 45 41 4c 20 | 72 65 2c 20 69 6d 29 3b |T (REAL |re, im);|
|00003930| 3c 52 45 54 3e 0d 0a 0d | 0a 7c 20 20 20 20 20 20 |<RET>...|.| |
|00003940| 20 54 59 50 45 20 43 4f | 4d 50 4c 5c 63 75 72 73 | TYPE CO|MPL\curs|
|00003950| 6f 72 0d 0a 5c 65 6e 64 | 7b 65 6c 61 6e 7d 0d 0a |or..\end|{elan}..|
|00003960| 0d 0a 5c 6e 6f 69 6e 64 | 65 6e 74 0d 0a 44 6f 20 |..\noind|ent..Do |
|00003970| 6e 6f 74 20 66 6f 72 67 | 65 74 20 74 68 65 20 73 |not forg|et the s|
|00003980| 65 6d 69 63 6f 6c 6f 6e | 20 61 74 20 74 68 65 20 |emicolon| at the |
|00003990| 65 6e 64 2e 0d 0a 0d 0a | 54 68 65 20 6f 72 64 65 |end.....|The orde|
|000039a0| 72 20 6f 66 20 72 65 66 | 69 6e 65 6d 65 6e 74 73 |r of ref|inements|
|000039b0| 2c 20 74 79 70 65 2d 64 | 65 63 6c 61 72 61 74 69 |, type-d|eclarati|
|000039c0| 6f 6e 73 2c 20 70 72 6f | 63 65 64 75 72 65 2d 64 |ons, pro|cedure-d|
|000039d0| 65 63 6c 61 72 61 74 69 | 6f 6e 73 0d 0a 61 6e 64 |eclarati|ons..and|
|000039e0| 20 6f 70 65 72 61 74 6f | 72 2d 64 65 63 6c 61 5c | operato|r-decla\|
|000039f0| 2d 72 61 74 69 6f 6e 73 | 20 69 73 20 66 72 65 65 |-rations| is free|
|00003a00| 2c 20 62 75 74 20 74 68 | 65 20 66 69 72 73 74 20 |, but th|e first |
|00003a10| 72 65 66 69 6e 65 6d 65 | 6e 74 20 77 68 69 63 68 |refineme|nt which|
|00003a20| 20 69 73 0d 0a 65 6e 74 | 65 72 65 64 20 62 65 63 | is..ent|ered bec|
|00003a30| 6f 6d 65 73 20 74 68 65 | 20 72 6f 6f 74 20 6f 66 |omes the| root of|
|00003a40| 20 74 68 65 20 70 72 6f | 67 72 61 6d 2e 0d 0a 0d | the pro|gram....|
|00003a50| 0a 5c 73 65 63 74 69 6f | 6e 7b 49 6e 73 70 65 63 |.\sectio|n{Inspec|
|00003a60| 74 69 6e 67 20 74 68 65 | 20 73 74 61 6e 64 61 72 |ting the| standar|
|00003a70| 64 20 6c 69 62 72 61 72 | 79 7d 0d 0a 0d 0a 42 79 |d librar|y}....By|
|00003a80| 20 6d 65 61 6e 73 20 6f | 66 20 74 68 65 20 66 6f | means o|f the fo|
|00003a90| 63 75 73 2d 20 61 6e 64 | 20 73 68 6f 77 2d 63 6f |cus- and| show-co|
|00003aa0| 6d 6d 61 6e 64 20 77 65 | 20 63 61 6e 20 69 6e 73 |mmand we| can ins|
|00003ab0| 70 65 63 74 20 6e 6f 74 | 20 6f 6e 6c 79 0d 0a 74 |pect not| only..t|
|00003ac0| 68 65 20 64 65 66 69 6e | 69 74 69 6f 6e 73 20 77 |he defin|itions w|
|00003ad0| 68 69 63 68 20 77 65 20 | 68 61 76 65 20 65 6e 74 |hich we |have ent|
|00003ae0| 65 72 65 64 20 6f 75 72 | 73 65 6c 76 65 73 20 62 |ered our|selves b|
|00003af0| 75 74 20 61 6c 73 6f 20 | 74 68 6f 73 65 20 6f 66 |ut also |those of|
|00003b00| 0d 0a 74 68 65 20 73 74 | 61 6e 64 61 72 64 20 6c |..the st|andard l|
|00003b10| 69 62 72 61 72 79 20 28 | 73 65 65 20 41 70 70 65 |ibrary (|see Appe|
|00003b20| 6e 64 69 78 20 41 29 2e | 20 49 6e 20 63 68 61 70 |ndix A).| In chap|
|00003b30| 74 65 72 20 35 2e 32 2e | 34 20 74 68 65 0d 0a 6d |ter 5.2.|4 the..m|
|00003b40| 65 63 68 61 6e 69 63 73 | 20 6f 66 20 74 68 69 73 |echanics| of this|
|00003b50| 20 66 61 63 69 6c 69 74 | 79 20 61 72 65 20 65 78 | facilit|y are ex|
|00003b60| 70 6c 61 69 6e 65 64 2e | 20 57 65 20 77 69 6c 6c |plained.| We will|
|00003b70| 20 75 73 65 20 69 74 20 | 74 6f 20 6c 6f 6f 6b 0d | use it |to look.|
|00003b80| 0a 61 74 20 74 68 65 20 | 61 76 61 69 6c 61 62 6c |.at the |availabl|
|00003b90| 65 20 61 64 64 69 74 69 | 6f 6e 73 2e 0d 0a 0d 0a |e additi|ons.....|
|00003ba0| 5c 62 65 67 69 6e 7b 65 | 6c 61 6e 7d 0d 0a 20 20 |\begin{e|lan}.. |
|00003bb0| 20 20 20 20 20 20 66 0d | 0a 0d 0a 7c 20 20 20 20 | f.|...| |
|00003bc0| 20 20 20 4e 61 6d 65 3a | 5c 63 75 72 73 6f 72 0d | Name:|\cursor.|
|00003bd0| 0a 0d 0a 20 20 20 20 20 | 20 20 20 2b 3c 52 45 54 |... | +<RET|
|00003be0| 3e 0d 0a 0d 0a 7c 20 20 | 20 20 20 20 20 49 4e 54 |>....| | INT|
|00003bf0| 20 4f 50 20 2b 20 28 49 | 4e 54 20 43 4f 4e 53 54 | OP + (I|NT CONST|
|00003c00| 20 61 29 5c 63 75 72 73 | 6f 72 0d 0a 7c 20 20 20 | a)\curs|or..| |
|00003c10| 20 20 20 20 52 45 41 4c | 20 4f 50 20 2b 20 28 52 | REAL| OP + (R|
|00003c20| 45 41 4c 20 43 4f 4e 53 | 54 20 61 29 0d 0a 7c 20 |EAL CONS|T a)..| |
|00003c30| 20 20 20 20 20 20 49 4e | 54 20 4f 50 20 2b 20 28 | IN|T OP + (|
|00003c40| 49 4e 54 20 43 4f 4e 53 | 54 20 61 2c 20 62 29 0d |INT CONS|T a, b).|
|00003c50| 0a 7c 20 20 20 20 20 20 | 20 52 45 41 4c 20 4f 50 |.| | REAL OP|
|00003c60| 20 2b 20 28 52 45 41 4c | 20 43 4f 4e 53 54 20 61 | + (REAL| CONST a|
|00003c70| 2c 20 62 29 0d 0a 7c 20 | 20 20 20 20 20 20 54 45 |, b)..| | TE|
|00003c80| 58 54 20 4f 50 20 2b 20 | 28 54 45 58 54 20 43 4f |XT OP + |(TEXT CO|
|00003c90| 4e 53 54 20 61 2c 20 62 | 29 0d 0a 5c 65 6e 64 7b |NST a, b|)..\end{|
|00003ca0| 65 6c 61 6e 7d 0d 0a 0d | 0a 57 65 20 6f 62 73 65 |elan}...|.We obse|
|00003cb0| 72 76 65 20 74 68 65 72 | 65 20 61 72 65 20 73 65 |rve ther|e are se|
|00003cc0| 76 65 72 61 6c 20 64 65 | 66 69 6e 69 74 69 6f 6e |veral de|finition|
|00003cd0| 73 2c 20 6f 66 20 77 68 | 69 63 68 20 74 68 65 20 |s, of wh|ich the |
|00003ce0| 66 69 72 73 74 20 6f 6e | 65 20 69 73 0d 0a 70 72 |first on|e is..pr|
|00003cf0| 65 73 65 6e 74 6c 79 20 | 74 68 65 20 66 6f 63 75 |esently |the focu|
|00003d00| 73 2e 20 42 79 20 6d 65 | 61 6e 73 20 6f 66 20 74 |s. By me|ans of t|
|00003d10| 68 65 20 28 72 65 70 65 | 61 74 65 64 29 20 75 73 |he (repe|ated) us|
|00003d20| 65 20 6f 66 20 74 68 65 | 20 6e 65 78 74 20 63 6f |e of the| next co|
|00003d30| 6d 6d 61 6e 64 0d 0a 0d | 0a 5c 62 65 67 69 6e 7b |mmand...|.\begin{|
|00003d40| 65 6c 61 6e 7d 0d 0a 20 | 20 20 20 20 20 20 20 6e |elan}.. | n|
|00003d50| 0d 0a 5c 65 6e 64 7b 65 | 6c 61 6e 7d 0d 0a 0d 0a |..\end{e|lan}....|
|00003d60| 5c 6e 6f 69 6e 64 65 6e | 74 0d 0a 77 65 20 63 61 |\noinden|t..we ca|
|00003d70| 6e 20 6d 61 6b 65 20 61 | 6e 79 20 20 6f 66 20 74 |n make a|ny of t|
|00003d80| 68 65 73 65 20 64 65 66 | 69 6e 69 74 69 6f 6e 73 |hese def|initions|
|00003d90| 20 74 68 65 20 66 6f 63 | 75 73 2e 0d 0a 57 65 20 | the foc|us...We |
|00003da0| 63 61 6e 20 69 6e 73 70 | 65 63 74 20 69 74 20 62 |can insp|ect it b|
|00003db0| 79 20 67 69 76 69 6e 67 | 20 61 20 73 68 6f 77 2d |y giving| a show-|
|00003dc0| 63 6f 6d 6d 61 6e 64 0d | 0a 0d 0a 5c 62 65 67 69 |command.|...\begi|
|00003dd0| 6e 7b 65 6c 61 6e 7d 0d | 0a 20 20 20 20 20 20 20 |n{elan}.|. |
|00003de0| 20 73 0d 0a 0d 0a 7c 20 | 20 20 20 20 20 20 49 4e | s....| | IN|
|00003df0| 54 20 4f 50 20 2b 20 28 | 49 4e 54 20 43 4f 4e 53 |T OP + (|INT CONS|
|00003e00| 54 20 61 29 3a 0d 0a 7c | 20 20 20 20 20 20 20 20 |T a):..|| |
|00003e10| 20 43 4f 44 45 20 33 30 | 0d 0a 7c 20 20 20 20 20 | CODE 30|..| |
|00003e20| 20 20 45 4e 44 4f 50 20 | 2b 0d 0a 7c 0d 0a 7c 20 | ENDOP |+..|..| |
|00003e30| 20 20 20 20 20 20 49 4e | 54 20 4f 50 20 2b 20 28 | IN|T OP + (|
|00003e40| 49 4e 54 20 43 4f 4e 53 | 54 20 61 29 5c 63 75 72 |INT CONS|T a)\cur|
|00003e50| 73 6f 72 0d 0a 7c 20 20 | 20 20 20 20 20 52 45 41 |sor..| | REA|
|00003e60| 4c 20 4f 50 20 2b 20 28 | 52 45 41 4c 20 43 4f 4e |L OP + (|REAL CON|
|00003e70| 53 54 20 61 29 0d 0a 7c | 20 20 20 20 20 20 20 49 |ST a)..|| I|
|00003e80| 4e 54 20 4f 50 20 2b 20 | 28 49 4e 54 20 43 4f 4e |NT OP + |(INT CON|
|00003e90| 53 54 20 61 2c 20 62 29 | 0d 0a 7c 20 20 20 20 20 |ST a, b)|..| |
|00003ea0| 20 20 52 45 41 4c 20 4f | 50 20 2b 20 28 52 45 41 | REAL O|P + (REA|
|00003eb0| 4c 20 43 4f 4e 53 54 20 | 61 2c 20 62 29 0d 0a 7c |L CONST |a, b)..||
|00003ec0| 20 20 20 20 20 20 20 54 | 45 58 54 20 4f 50 20 2b | T|EXT OP +|
|00003ed0| 20 28 54 45 58 54 20 43 | 4f 4e 53 54 20 61 2c 20 | (TEXT C|ONST a, |
|00003ee0| 62 29 0d 0a 5c 65 6e 64 | 7b 65 6c 61 6e 7d 0d 0a |b)..\end|{elan}..|
|00003ef0| 0d 0a 5c 6e 6f 69 6e 64 | 65 6e 74 0d 0a 77 68 69 |..\noind|ent..whi|
|00003f00| 63 68 20 64 6f 65 73 20 | 6e 6f 74 20 72 65 61 6c |ch does |not real|
|00003f10| 6c 79 20 6d 61 6b 65 73 | 20 75 73 20 6d 75 63 68 |ly makes| us much|
|00003f20| 20 77 69 73 65 72 2e 0d | 0a 0d 0a 41 20 6e 61 6d | wiser..|...A nam|
|00003f30| 65 20 77 69 74 68 20 6d | 6f 72 65 20 74 68 61 6e |e with m|ore than|
|00003f40| 20 6f 6e 65 20 64 65 66 | 69 6e 69 74 69 6f 6e 20 | one def|inition |
|00003f50| 28 73 75 63 68 20 61 73 | 20 7b 5c 74 74 20 2b 7d |(such as| {\tt +}|
|00003f60| 20 6f 72 20 7b 5c 74 74 | 20 70 75 74 7d 29 0d 0a | or {\tt| put})..|
|00003f70| 69 73 20 63 61 6c 6c 65 | 64 20 67 65 6e 65 72 69 |is calle|d generi|
|00003f80| 63 2e 0d 0a 4d 6f 64 69 | 66 79 69 6e 67 20 64 65 |c...Modi|fying de|
|00003f90| 66 69 6e 69 74 69 6f 6e | 73 20 66 6f 72 20 67 65 |finition|s for ge|
|00003fa0| 6e 65 72 69 63 20 6e 61 | 6d 65 73 20 66 72 6f 6d |neric na|mes from|
|00003fb0| 20 74 68 65 20 73 74 61 | 6e 64 61 72 64 20 6c 69 | the sta|ndard li|
|00003fc0| 62 72 61 72 79 0d 0a 69 | 73 20 72 61 74 68 65 72 |brary..i|s rather|
|00003fd0| 20 74 72 69 63 6b 79 2e | 0d 0a 54 68 65 20 65 61 | tricky.|..The ea|
|00003fe0| 73 69 65 73 74 20 77 61 | 79 20 69 73 20 74 6f 20 |siest wa|y is to |
|00003ff0| 66 6f 63 75 73 20 6f 6e | 20 73 6f 6d 65 20 68 61 |focus on| some ha|
|00004000| 72 6d 6c 65 73 73 20 72 | 65 66 69 6e 65 6d 65 6e |rmless r|efinemen|
|00004010| 74 20 6e 61 6d 65 0d 0a | 28 6c 69 6b 65 20 7b 5c |t name..|(like {\|
|00004020| 74 74 20 61 7d 29 20 61 | 6e 64 20 74 68 65 6e 20 |tt a}) a|nd then |
|00004030| 6d 61 73 73 61 67 69 6e | 67 20 74 68 65 20 72 65 |massagin|g the re|
|00004040| 73 75 6c 74 69 6e 67 20 | 73 63 72 65 65 6e 20 74 |sulting |screen t|
|00004050| 65 78 74 20 69 6e 74 6f | 20 74 68 65 0d 0a 64 65 |ext into| the..de|
|00004060| 73 69 72 65 64 20 64 65 | 66 69 6e 69 74 69 6f 6e |sired de|finition|
|00004070| 2e 0d 0a 0d 0a 5c 73 65 | 63 74 69 6f 6e 7b 53 74 |.....\se|ction{St|
|00004080| 61 6e 64 61 72 64 20 70 | 61 63 6b 65 74 73 20 61 |andard p|ackets a|
|00004090| 6e 64 20 73 74 61 6e 64 | 61 72 64 20 70 72 6f 67 |nd stand|ard prog|
|000040a0| 72 61 6d 73 7d 0d 0a 0d | 0a 49 6e 20 61 20 63 6c |rams}...|.In a cl|
|000040b0| 61 73 73 72 6f 6f 6d 20 | 73 69 74 75 61 74 69 6f |assroom |situatio|
|000040c0| 6e 20 69 74 20 77 69 6c | 6c 20 6e 6f 74 20 61 6c |n it wil|l not al|
|000040d0| 77 61 79 73 20 62 65 20 | 74 68 65 20 63 61 73 65 |ways be |the case|
|000040e0| 20 74 68 61 74 0d 0a 61 | 20 63 6f 6d 70 6c 65 74 | that..a| complet|
|000040f0| 65 20 70 72 6f 67 72 61 | 6d 20 69 73 20 77 72 69 |e progra|m is wri|
|00004100| 74 74 65 6e 20 66 72 6f | 6d 20 73 63 72 61 74 63 |tten fro|m scratc|
|00004110| 68 2e 20 52 61 74 68 65 | 72 20 74 68 65 20 74 65 |h. Rathe|r the te|
|00004120| 61 63 68 65 72 0d 0a 77 | 69 6c 6c 20 73 75 70 70 |acher..w|ill supp|
|00004130| 6c 79 20 61 20 70 61 63 | 6b 65 74 20 6f 66 20 72 |ly a pac|ket of r|
|00004140| 65 66 69 6e 65 6d 65 6e | 74 73 2c 20 6f 72 20 65 |efinemen|ts, or e|
|00004150| 76 65 6e 20 61 20 63 6f | 6d 70 6c 65 74 65 20 70 |ven a co|mplete p|
|00004160| 72 6f 67 72 61 6d 0d 0a | 74 68 61 74 20 74 68 65 |rogram..|that the|
|00004170| 20 70 75 70 69 6c 73 20 | 68 61 76 65 20 74 6f 20 | pupils |have to |
|00004180| 75 73 65 2e 0d 0a 46 6f | 72 20 74 68 69 73 20 72 |use...Fo|r this r|
|00004190| 65 61 73 6f 6e 2c 20 74 | 68 65 20 45 6c 61 6e 20 |eason, t|he Elan |
|000041a0| 50 72 6f 67 72 61 6d 6d | 69 6e 67 20 45 6e 76 69 |Programm|ing Envi|
|000041b0| 72 6f 6e 6d 65 6e 74 20 | 68 61 73 20 61 20 73 69 |ronment |has a si|
|000041c0| 6d 70 6c 65 0d 0a 66 61 | 63 69 6c 69 74 79 20 66 |mple..fa|cility f|
|000041d0| 6f 72 20 72 65 61 64 69 | 6e 67 20 73 74 61 6e 64 |or readi|ng stand|
|000041e0| 61 72 64 20 70 61 63 6b | 65 74 73 20 61 6e 64 20 |ard pack|ets and |
|000041f0| 73 74 61 6e 64 61 72 64 | 20 70 72 6f 67 72 61 6d |standard| program|
|00004200| 73 2e 0d 0a 0d 0a 41 20 | 7b 5c 65 6d 20 73 74 61 |s.....A |{\em sta|
|00004210| 6e 64 61 72 64 20 70 72 | 6f 67 72 61 6d 7d 20 69 |ndard pr|ogram} i|
|00004220| 73 20 61 20 63 6f 6d 70 | 6c 65 74 65 20 45 6c 61 |s a comp|lete Ela|
|00004230| 6e 20 70 72 6f 67 72 61 | 6d 2c 20 74 6f 20 62 65 |n progra|m, to be|
|00004240| 20 75 73 65 64 0d 0a 77 | 69 74 68 6f 75 74 20 6d | used..w|ithout m|
|00004250| 6f 64 69 66 69 63 61 74 | 69 6f 6e 73 20 6f 72 20 |odificat|ions or |
|00004260| 61 64 64 69 74 69 6f 6e | 73 2e 20 49 74 73 20 66 |addition|s. Its f|
|00004270| 69 72 73 74 20 72 65 66 | 69 6e 65 6d 65 6e 74 20 |irst ref|inement |
|00004280| 6d 75 73 74 0d 0a 68 61 | 76 65 20 74 68 65 20 6e |must..ha|ve the n|
|00004290| 61 6d 65 20 7b 5c 74 74 | 20 70 72 6f 67 72 61 6d |ame {\tt| program|
|000042a0| 7d 2e 0d 0a 0d 0a 41 20 | 7b 5c 65 6d 20 73 74 61 |}.....A |{\em sta|
|000042b0| 6e 64 61 72 64 20 70 61 | 63 6b 65 74 7d 20 69 73 |ndard pa|cket} is|
|000042c0| 20 61 20 63 6f 6c 6c 65 | 63 74 69 6f 6e 20 6f 66 | a colle|ction of|
|000042d0| 20 64 65 63 6c 61 72 61 | 74 69 6f 6e 73 20 74 68 | declara|tions th|
|000042e0| 61 74 0d 0a 74 68 65 20 | 70 75 70 69 6c 73 20 6d |at..the |pupils m|
|000042f0| 61 79 20 75 73 65 20 69 | 6e 20 61 20 70 72 6f 67 |ay use i|n a prog|
|00004300| 72 61 6d 20 6f 66 20 74 | 68 65 69 72 20 6f 77 6e |ram of t|heir own|
|00004310| 20 77 69 74 68 6f 75 74 | 20 74 68 65 20 6e 65 63 | without| the nec|
|00004320| 65 73 73 69 74 79 0d 0a | 74 6f 20 74 79 70 65 20 |essity..|to type |
|00004330| 74 68 65 6d 20 69 6e 2e | 20 4e 6f 6e 65 20 6f 66 |them in.| None of|
|00004340| 20 69 74 73 20 72 65 66 | 69 6e 65 6d 65 6e 74 73 | its ref|inements|
|00004350| 20 6d 61 79 20 68 61 76 | 65 20 74 68 65 20 6e 61 | may hav|e the na|
|00004360| 6d 65 20 7b 5c 74 74 0d | 0a 70 72 6f 67 72 61 6d |me {\tt.|.program|
|00004370| 7d 2e 0d 0a 0d 0a 46 6f | 72 20 72 65 61 64 69 6e |}.....Fo|r readin|
|00004380| 67 20 74 68 65 73 65 2c | 20 61 20 76 61 72 69 61 |g these,| a varia|
|00004390| 6e 74 20 6f 66 20 74 68 | 65 20 72 65 61 64 2d 63 |nt of th|e read-c|
|000043a0| 6f 6d 6d 61 6e 64 20 68 | 61 73 20 62 65 65 6e 20 |ommand h|as been |
|000043b0| 69 6e 74 72 6f 64 75 63 | 65 64 2c 0d 0a 74 68 65 |introduc|ed,..the|
|000043c0| 20 70 61 63 6b 65 74 2d | 63 6f 6d 6d 61 6e 64 20 | packet-|command |
|000043d0| 28 7b 5c 74 74 20 70 7d | 29 2c 20 77 68 69 63 68 |({\tt p}|), which|
|000043e0| 20 68 61 73 20 74 68 65 | 20 70 72 6f 70 65 72 74 | has the| propert|
|000043f0| 79 20 74 68 61 74 20 69 | 74 0d 0a 6b 65 65 70 73 |y that i|t..keeps|
|00004400| 20 74 68 65 20 63 6f 6e | 74 65 6e 74 73 20 6f 66 | the con|tents of|
|00004410| 20 74 68 65 20 70 61 63 | 6b 65 74 20 70 72 61 63 | the pac|ket prac|
|00004420| 74 69 63 61 6c 6c 79 20 | 69 6e 76 69 73 69 62 6c |tically |invisibl|
|00004430| 65 3a 20 74 68 65 20 70 | 75 70 69 6c 0d 0a 63 61 |e: the p|upil..ca|
|00004440| 6e 20 69 6e 73 70 65 63 | 74 20 62 75 74 20 63 61 |n inspec|t but ca|
|00004450| 6e 6e 6f 74 20 6d 6f 64 | 69 66 79 20 6f 72 20 64 |nnot mod|ify or d|
|00004460| 65 6c 65 74 65 20 74 68 | 65 6d 2e 0d 0a 0d 0a 5c |elete th|em.....\|
|00004470| 73 65 63 74 69 6f 6e 7b | 45 78 61 6d 70 6c 65 20 |section{|Example |
|00004480| 6f 66 20 61 20 73 74 61 | 6e 64 61 72 64 20 70 72 |of a sta|ndard pr|
|00004490| 6f 67 72 61 6d 7d 0d 0a | 0d 0a 41 73 20 61 6e 20 |ogram}..|..As an |
|000044a0| 65 78 61 6d 70 6c 65 20 | 77 65 20 63 61 6e 20 74 |example |we can t|
|000044b0| 72 79 20 74 6f 20 72 65 | 61 64 20 61 6e 79 20 70 |ry to re|ad any p|
|000044c0| 72 6f 67 72 61 6d 20 61 | 73 20 61 20 73 74 61 6e |rogram a|s a stan|
|000044d0| 64 61 72 64 20 70 72 6f | 67 72 61 6d 2e 0d 0a 57 |dard pro|gram...W|
|000044e0| 65 20 67 69 76 65 20 74 | 68 65 20 70 61 63 6b 65 |e give t|he packe|
|000044f0| 74 2d 63 6f 6d 6d 61 6e | 64 0d 0a 0d 0a 5c 62 65 |t-comman|d....\be|
|00004500| 67 69 6e 7b 65 6c 61 6e | 7d 0d 0a 20 20 20 20 20 |gin{elan|}.. |
|00004510| 20 20 20 70 0d 0a 0d 0a | 7c 20 20 20 20 20 20 20 | p....|| |
|00004520| 4e 61 6d 65 3a 5c 63 75 | 72 73 6f 72 0d 0a 5c 65 |Name:\cu|rsor..\e|
|00004530| 6e 64 7b 65 6c 61 6e 7d | 0d 0a 0d 0a 5c 6e 6f 69 |nd{elan}|....\noi|
|00004540| 6e 64 65 6e 74 0d 0a 49 | 6e 20 74 79 70 69 6e 67 |ndent..I|n typing|
|00004550| 20 74 68 65 20 6e 61 6d | 65 20 28 66 6f 6c 6c 6f | the nam|e (follo|
|00004560| 77 65 64 20 62 79 20 7b | 5c 74 74 20 3c 52 45 54 |wed by {|\tt <RET|
|00004570| 3e 7d 29 20 69 74 20 69 | 73 20 6e 6f 74 20 73 68 |>}) it i|s not sh|
|00004580| 6f 77 6e 20 6f 6e 20 74 | 68 65 0d 0a 73 63 72 65 |own on t|he..scre|
|00004590| 65 6e 2e 20 53 69 6d 69 | 6c 61 72 6c 79 2c 20 69 |en. Simi|larly, i|
|000045a0| 6e 20 72 65 61 64 69 6e | 67 20 74 68 65 20 72 65 |n readin|g the re|
|000045b0| 66 69 6e 65 6d 65 6e 74 | 73 20 6f 66 20 74 68 65 |finement|s of the|
|000045c0| 20 70 72 6f 67 72 61 6d | 0d 0a 6f 6e 6c 79 20 74 | program|..only t|
|000045d0| 68 65 69 72 20 6e 61 6d | 65 73 20 28 6e 6f 74 20 |heir nam|es (not |
|000045e0| 74 68 65 69 72 20 62 6f | 64 69 65 73 29 20 61 72 |their bo|dies) ar|
|000045f0| 65 20 73 68 6f 77 6e 2e | 20 49 6d 6d 65 64 69 61 |e shown.| Immedia|
|00004600| 74 65 6c 79 20 61 66 74 | 65 72 0d 0a 74 68 65 20 |tely aft|er..the |
|00004610| 72 65 61 64 69 6e 67 20 | 61 20 6c 69 73 74 20 6f |reading |a list o|
|00004620| 66 20 61 6c 6c 20 72 65 | 66 69 6e 65 6d 65 6e 74 |f all re|finement|
|00004630| 73 20 6f 66 20 74 68 65 | 20 70 72 6f 67 72 61 6d |s of the| program|
|00004640| 20 69 73 20 64 69 73 70 | 6c 61 79 65 64 0d 0a 6f | is disp|layed..o|
|00004650| 6e 20 74 68 65 20 73 63 | 72 65 65 6e 2c 20 62 75 |n the sc|reen, bu|
|00004660| 74 20 74 68 69 73 20 69 | 73 20 6e 6f 74 20 72 65 |t this i|s not re|
|00004670| 70 72 6f 64 75 63 69 62 | 6c 65 20 62 79 20 6d 65 |producib|le by me|
|00004680| 61 6e 73 20 6f 66 20 74 | 68 65 20 6c 69 73 74 2d |ans of t|he list-|
|00004690| 63 6f 6d 6d 61 6e 64 0d | 0a 62 65 63 61 75 73 65 |command.|.because|
|000046a0| 20 74 68 65 20 72 65 66 | 69 6e 65 6d 65 6e 74 73 | the ref|inements|
|000046b0| 20 62 65 63 6f 6d 65 20 | 60 60 69 6e 76 69 73 69 | become |``invisi|
|000046c0| 62 6c 65 27 27 2e 20 57 | 65 20 63 61 6e 20 65 78 |ble''. W|e can ex|
|000046d0| 65 63 75 74 65 20 65 74 | 63 2e 0d 0a 74 68 65 20 |ecute et|c...the |
|000046e0| 70 72 6f 67 72 61 6d 20 | 69 6e 20 74 68 65 20 75 |program |in the u|
|000046f0| 73 75 61 6c 20 77 61 79 | 20 62 75 74 20 77 65 20 |sual way| but we |
|00004700| 63 61 6e 20 6e 6f 74 20 | 6d 6f 64 69 66 79 20 69 |can not |modify i|
|00004710| 74 2e 20 41 74 20 6d 6f | 73 74 0d 0a 77 65 20 63 |t. At mo|st..we c|
|00004720| 61 6e 20 61 64 64 20 6e | 65 77 20 72 65 66 69 6e |an add n|ew refin|
|00004730| 65 6d 65 6e 74 73 2e 0d | 0a 0d 0a 5c 73 65 63 74 |ements..|...\sect|
|00004740| 69 6f 6e 7b 45 78 61 6d | 70 6c 65 20 6f 66 20 61 |ion{Exam|ple of a|
|00004750| 20 73 74 61 6e 64 61 72 | 64 20 70 61 63 6b 65 74 | standar|d packet|
|00004760| 7d 0d 0a 0d 0a 54 68 65 | 20 70 72 6f 67 72 61 6d |}....The| program|
|00004770| 20 7b 5c 74 74 20 6b 61 | 72 65 6c 7d 20 28 73 65 | {\tt ka|rel} (se|
|00004780| 65 20 33 2e 37 29 20 69 | 73 20 61 20 73 74 61 6e |e 3.7) i|s a stan|
|00004790| 64 61 72 64 20 70 61 63 | 6b 65 74 20 62 75 74 20 |dard pac|ket but |
|000047a0| 6e 6f 74 0d 0a 61 20 73 | 74 61 6e 64 61 72 64 20 |not..a s|tandard |
|000047b0| 70 72 6f 67 72 61 6d 2e | 20 54 68 65 20 64 69 66 |program.| The dif|
|000047c0| 66 65 72 65 6e 63 65 20 | 69 73 20 74 68 61 74 20 |ference |is that |
|000047d0| 74 68 65 20 72 6f 6f 74 | 20 6f 66 20 61 20 73 74 |the root| of a st|
|000047e0| 61 6e 64 61 72 64 0d 0a | 70 72 6f 67 72 61 6d 20 |andard..|program |
|000047f0| 6d 75 73 74 20 62 65 20 | 6e 61 6d 65 64 20 7b 5c |must be |named {\|
|00004800| 74 74 20 70 72 6f 67 72 | 61 6d 7d 20 77 68 65 72 |tt progr|am} wher|
|00004810| 65 61 73 20 66 6f 72 20 | 61 20 73 74 61 6e 64 61 |eas for |a standa|
|00004820| 72 64 20 70 61 63 6b 65 | 74 0d 0a 69 74 20 6d 75 |rd packe|t..it mu|
|00004830| 73 74 20 62 65 20 64 69 | 66 66 65 72 65 6e 74 20 |st be di|fferent |
|00004840| 66 72 6f 6d 20 7b 5c 74 | 74 20 70 72 6f 67 72 61 |from {\t|t progra|
|00004850| 6d 7d 2e 20 54 68 69 73 | 20 67 69 76 65 73 20 75 |m}. This| gives u|
|00004860| 73 20 74 68 65 20 6f 70 | 70 6f 72 74 75 6e 69 74 |s the op|portunit|
|00004870| 79 0d 0a 74 6f 20 61 64 | 64 20 6f 75 72 20 6f 77 |y..to ad|d our ow|
|00004880| 6e 20 72 65 66 69 6e 65 | 6d 65 6e 74 20 7b 5c 74 |n refine|ment {\t|
|00004890| 74 20 70 72 6f 67 72 61 | 6d 7d 20 61 73 20 72 6f |t progra|m} as ro|
|000048a0| 6f 74 20 6f 66 20 74 68 | 65 20 70 72 6f 67 72 61 |ot of th|e progra|
|000048b0| 6d 2c 0d 0a 69 6e 20 77 | 68 69 63 68 20 61 6c 6c |m,..in w|hich all|
|000048c0| 20 74 68 65 20 72 65 66 | 69 6e 65 6d 65 6e 74 73 | the ref|inements|
|000048d0| 20 6f 66 20 74 68 65 20 | 70 61 63 6b 65 74 73 20 | of the |packets |
|000048e0| 63 61 6e 20 62 65 20 75 | 73 65 64 2e 20 54 68 65 |can be u|sed. The|
|000048f0| 0d 0a 70 61 63 6b 65 74 | 20 61 73 20 69 74 20 77 |..packet| as it w|
|00004900| 65 72 65 20 65 78 74 65 | 6e 64 73 20 74 68 65 20 |ere exte|nds the |
|00004910| 6c 61 6e 67 75 61 67 65 | 20 77 69 74 68 20 61 20 |language| with a |
|00004920| 6e 75 6d 62 65 72 20 6f | 66 20 63 6f 6e 63 72 65 |number o|f concre|
|00004930| 74 65 0d 0a 61 6c 67 6f | 72 69 74 68 6d 73 2e 0d |te..algo|rithms..|
|00004940| 0a 0d 0a 49 6e 20 6f 72 | 64 65 72 20 74 6f 20 75 |...In or|der to u|
|00004950| 73 65 20 74 68 69 73 20 | 73 74 61 6e 64 61 72 64 |se this |standard|
|00004960| 20 70 61 63 6b 65 74 20 | 77 65 20 66 69 72 73 74 | packet |we first|
|00004970| 20 72 65 61 64 20 69 74 | 20 77 69 74 68 20 61 0d | read it| with a.|
|00004980| 0a 70 61 63 6b 65 74 2d | 63 6f 6d 6d 61 6e 64 2e |.packet-|command.|
|00004990| 20 54 68 65 6e 20 77 65 | 20 72 65 61 64 20 74 68 | Then we| read th|
|000049a0| 65 20 73 74 61 6e 64 61 | 72 64 20 70 61 63 6b 65 |e standa|rd packe|
|000049b0| 74 20 7b 5c 74 74 20 65 | 6e 76 69 72 6f 6e 7d 0d |t {\tt e|nviron}.|
|000049c0| 0a 69 6e 20 74 68 65 20 | 73 61 6d 65 20 77 61 79 |.in the |same way|
|000049d0| 2e 20 46 69 6e 61 6c 6c | 79 20 77 65 20 72 65 61 |. Finall|y we rea|
|000049e0| 64 20 74 68 65 20 70 72 | 6f 67 72 61 6d 20 7b 5c |d the pr|ogram {\|
|000049f0| 74 74 20 6e 65 77 73 70 | 61 70 65 72 7d 0d 0a 62 |tt newsp|aper}..b|
|00004a00| 79 20 6d 65 61 6e 73 20 | 6f 66 20 61 20 72 65 61 |y means |of a rea|
|00004a10| 64 2d 63 6f 6d 6d 61 6e | 64 20 61 6e 64 20 67 69 |d-comman|d and gi|
|00004a20| 76 65 20 74 68 65 20 65 | 78 65 63 75 74 65 2d 63 |ve the e|xecute-c|
|00004a30| 6f 6d 6d 61 6e 64 2e 20 | 4f 6e 6c 79 0d 0a 74 68 |ommand. |Only..th|
|00004a40| 65 20 72 65 66 69 6e 65 | 6d 65 6e 74 73 20 6f 66 |e refine|ments of|
|00004a50| 20 74 68 69 73 20 6c 61 | 73 74 20 70 72 6f 67 72 | this la|st progr|
|00004a60| 61 6d 20 63 61 6e 20 62 | 65 20 6d 6f 64 69 66 69 |am can b|e modifi|
|00004a70| 65 64 20 6f 72 20 64 65 | 6c 65 74 65 64 2e 0d 0a |ed or de|leted...|
|00004a80| 54 68 65 20 72 65 66 69 | 6e 65 6d 65 6e 74 73 20 |The refi|nements |
|00004a90| 6f 66 20 74 68 65 20 70 | 61 63 6b 65 74 73 20 63 |of the p|ackets c|
|00004aa0| 61 6e 20 6e 6f 74 20 62 | 65 20 6d 6f 64 69 66 69 |an not b|e modifi|
|00004ab0| 65 64 20 6f 72 20 64 65 | 6c 65 74 65 64 0d 0a 61 |ed or de|leted..a|
|00004ac0| 6e 64 20 77 69 6c 6c 20 | 6e 6f 74 20 62 65 20 73 |nd will |not be s|
|00004ad0| 61 76 65 64 20 62 79 20 | 61 20 77 72 69 74 65 2d |aved by |a write-|
|00004ae0| 63 6f 6d 6d 61 6e 64 2e | 0d 0a 0d 0a 5c 73 65 63 |command.|....\sec|
|00004af0| 74 69 6f 6e 7b 43 6f 6e | 63 6c 75 73 69 6f 6e 7d |tion{Con|clusion}|
|00004b00| 0d 0a 0d 0a 49 6e 20 74 | 68 69 73 20 71 75 69 63 |....In t|his quic|
|00004b10| 6b 20 74 6f 75 72 20 77 | 65 20 68 61 76 65 20 6d |k tour w|e have m|
|00004b20| 69 73 73 65 64 20 6d 61 | 6e 79 20 69 6d 70 6f 72 |issed ma|ny impor|
|00004b30| 74 61 6e 74 20 61 73 70 | 65 63 74 73 20 6f 66 0d |tant asp|ects of.|
|00004b40| 0a 74 68 65 20 70 72 6f | 67 72 61 6d 6d 69 6e 67 |.the pro|gramming|
|00004b50| 20 65 6e 76 69 72 6f 6e | 6d 65 6e 74 2c 20 73 75 | environ|ment, su|
|00004b60| 63 68 20 61 73 0d 0a 0d | 0a 5c 62 65 67 69 6e 7b |ch as...|.\begin{|
|00004b70| 69 74 65 6d 69 7a 65 7d | 0d 0a 5c 69 74 65 6d 20 |itemize}|..\item |
|00004b80| 64 65 6c 65 74 69 6e 67 | 20 61 20 72 65 66 69 6e |deleting| a refin|
|00004b90| 65 6d 65 6e 74 20 62 79 | 20 6d 65 61 6e 73 20 6f |ement by| means o|
|00004ba0| 66 20 61 20 64 65 6c 65 | 74 65 2d 63 6f 6d 6d 61 |f a dele|te-comma|
|00004bb0| 6e 64 20 28 7b 5c 74 74 | 20 64 7d 29 3b 0d 0a 5c |nd ({\tt| d});..\|
|00004bc0| 69 74 65 6d 20 74 68 65 | 20 69 6e 63 72 65 6d 65 |item the| increme|
|00004bd0| 6e 74 61 6c 20 73 79 6e | 74 61 78 20 63 68 65 63 |ntal syn|tax chec|
|00004be0| 6b 20 64 75 72 69 6e 67 | 20 69 6e 70 75 74 20 6f |k during| input o|
|00004bf0| 66 20 6e 65 77 20 72 65 | 66 69 6e 65 6d 65 6e 74 |f new re|finement|
|00004c00| 73 3b 0d 0a 5c 69 74 65 | 6d 20 74 68 65 20 62 61 |s;..\ite|m the ba|
|00004c10| 63 6b 74 72 61 63 65 20 | 66 61 63 69 6c 69 74 79 |cktrace |facility|
|00004c20| 20 66 6f 72 20 73 65 6d | 61 6e 74 69 63 20 65 72 | for sem|antic er|
|00004c30| 72 6f 72 73 3b 0d 0a 5c | 69 74 65 6d 20 74 68 65 |rors;..\|item the|
|00004c40| 20 65 64 69 74 2d 6f 6e | 2d 74 68 65 20 66 6c 79 | edit-on|-the fly|
|00004c50| 20 75 70 6f 6e 20 64 65 | 74 65 63 74 69 6f 6e 20 | upon de|tection |
|00004c60| 6f 66 20 73 79 6e 74 61 | 63 74 69 63 20 6f 72 20 |of synta|ctic or |
|00004c70| 73 65 6d 61 6e 74 69 63 | 20 65 72 72 6f 72 73 3b |semantic| errors;|
|00004c80| 0d 0a 5c 69 74 65 6d 20 | 74 68 65 20 74 72 61 63 |..\item |the trac|
|00004c90| 65 20 66 61 63 69 6c 69 | 74 79 2e 0d 0a 5c 65 6e |e facili|ty...\en|
|00004ca0| 64 7b 69 74 65 6d 69 7a | 65 7d 0d 0a 0d 0a 5c 6e |d{itemiz|e}....\n|
|00004cb0| 6f 69 6e 64 65 6e 74 0d | 0a 57 65 20 68 61 76 65 |oindent.|.We have|
|00004cc0| 20 6e 6f 74 20 64 69 73 | 63 75 73 73 65 64 20 75 | not dis|cussed u|
|00004cd0| 73 65 66 75 6c 20 74 72 | 69 63 6b 73 2c 20 73 75 |seful tr|icks, su|
|00004ce0| 63 68 20 61 73 0d 0a 0d | 0a 5c 62 65 67 69 6e 7b |ch as...|.\begin{|
|00004cf0| 69 74 65 6d 69 7a 65 7d | 0d 0a 5c 69 74 65 6d 20 |itemize}|..\item |
|00004d00| 68 6f 77 20 74 6f 20 63 | 68 61 6e 67 65 20 74 68 |how to c|hange th|
|00004d10| 65 20 6e 61 6d 65 20 6f | 66 20 61 20 72 65 66 69 |e name o|f a refi|
|00004d20| 6e 65 6d 65 6e 74 20 28 | 74 61 6b 65 20 69 74 20 |nement (|take it |
|00004d30| 69 6e 74 6f 20 74 68 65 | 0d 0a 65 64 69 74 6f 72 |into the|..editor|
|00004d40| 2c 20 65 64 69 74 20 69 | 74 73 20 6e 61 6d 65 2c |, edit i|ts name,|
|00004d50| 20 64 65 6c 65 74 65 20 | 74 68 65 20 6f 72 69 67 | delete |the orig|
|00004d60| 69 6e 61 6c 29 3b 0d 0a | 5c 69 74 65 6d 20 68 6f |inal);..|\item ho|
|00004d70| 77 20 74 6f 20 69 6e 73 | 70 65 63 74 20 74 68 65 |w to ins|pect the|
|00004d80| 20 76 61 6c 75 65 20 6f | 66 20 61 20 76 61 72 69 | value o|f a vari|
|00004d90| 61 62 6c 65 20 6f 72 20 | 63 6f 6e 73 74 61 6e 74 |able or |constant|
|00004da0| 20 61 66 74 65 72 0d 0a | 65 78 65 63 75 74 69 6f | after..|executio|
|00004db0| 6e 20 6f 66 20 74 68 65 | 20 70 72 6f 67 72 61 6d |n of the| program|
|00004dc0| 20 28 66 6f 63 75 73 20 | 6f 6e 20 69 74 73 20 6e | (focus |on its n|
|00004dd0| 61 6d 65 20 61 6e 64 20 | 73 68 6f 77 20 69 74 29 |ame and |show it)|
|00004de0| 3b 0d 0a 5c 69 74 65 6d | 20 74 68 65 20 75 73 65 |;..\item| the use|
|00004df0| 20 6f 66 20 74 68 65 20 | 7b 5c 74 74 20 3c 42 52 | of the |{\tt <BR|
|00004e00| 45 41 4b 3e 7d 2d 6b 65 | 79 20 74 6f 20 68 61 6c |EAK>}-ke|y to hal|
|00004e10| 74 20 65 78 65 63 75 74 | 69 6f 6e 20 6f 72 20 69 |t execut|ion or i|
|00004e20| 6e 70 75 74 2e 0d 0a 5c | 65 6e 64 7b 69 74 65 6d |nput...\|end{item|
|00004e30| 69 7a 65 7d 0d 0a 0d 0a | 5c 6e 6f 69 6e 64 65 6e |ize}....|\noinden|
|00004e40| 74 0d 0a 53 69 6e 63 65 | 20 74 68 65 73 65 20 61 |t..Since| these a|
|00004e50| 72 65 20 61 6c 6c 20 63 | 6f 6e 73 65 71 75 65 6e |re all c|onsequen|
|00004e60| 63 65 73 20 6f 66 20 74 | 68 69 6e 67 73 20 64 65 |ces of t|hings de|
|00004e70| 73 63 72 69 62 65 64 20 | 69 6e 20 63 68 61 70 74 |scribed |in chapt|
|00004e80| 65 72 0d 0a 35 2c 20 69 | 74 20 6d 61 79 20 62 65 |er..5, i|t may be|
|00004e90| 20 75 73 65 66 75 6c 20 | 74 6f 20 72 65 61 64 20 | useful |to read |
|00004ea0| 74 68 61 74 20 63 68 61 | 70 74 65 72 20 61 67 61 |that cha|pter aga|
|00004eb0| 69 6e 2e 0d 0a 0d 0a | |in..... | |
+--------+-------------------------+-------------------------+--------+--------+