home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 1 / crawlyvol1.bin / program / compiler / elan1v5 / doc / h02.tex / node12_ct.html < prev    next >
LaTeX Document  |  1989-03-17  |  4.4 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: LaTeX Document (document/latex).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
90% dexvert Hypertext Markup Language File (text/html) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file HTML document text default (weak)
99% file LaTeX document text default
98% file exported SGML document text default
97% file exported SGML document, ASCII text, with CRLF, LF line terminators default
80% TrID HyperText Markup Language with DOCTYPE default
19% TrID HyperText Markup Language default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/281 LaTeX (Subdocument) default
100% gt2 HTML (Hyper Text Markup Language) Datei default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime text/html default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3c 21 44 4f 43 54 59 50 | 45 20 48 54 4d 4c 20 50 |<!DOCTYP|E HTML P|
|00000010| 55 42 4c 49 43 20 22 2d | 2f 2f 57 33 43 2f 2f 44 |UBLIC "-|//W3C//D|
|00000020| 54 44 20 48 54 4d 4c 20 | 33 2e 32 20 46 69 6e 61 |TD HTML |3.2 Fina|
|00000030| 6c 2f 2f 65 6e 22 3e 0a | 0a 3c 21 2d 2d 43 6f 6e |l//en">.|.<!--Con|
|00000040| 76 65 72 74 65 64 20 77 | 69 74 68 20 4c 61 54 65 |verted w|ith LaTe|
|00000050| 58 32 48 54 4d 4c 20 32 | 30 32 32 20 28 52 65 6c |X2HTML 2|022 (Rel|
|00000060| 65 61 73 65 64 20 4a 61 | 6e 75 61 72 79 20 31 2c |eased Ja|nuary 1,|
|00000070| 20 32 30 32 32 29 20 2d | 2d 3e 0a 3c 48 54 4d 4c | 2022) -|->.<HTML|
|00000080| 20 6c 61 6e 67 3d 22 65 | 6e 22 3e 0a 3c 48 45 41 | lang="e|n">.<HEA|
|00000090| 44 3e 0a 3c 54 49 54 4c | 45 3e 43 6f 6e 74 65 6e |D>.<TITL|E>Conten|
|000000a0| 74 73 20 6f 66 20 52 65 | 70 65 74 69 74 69 6f 6e |ts of Re|petition|
|000000b0| 3c 2f 54 49 54 4c 45 3e | 0a 0a 3c 4d 45 54 41 20 |</TITLE>|..<META |
|000000c0| 48 54 54 50 2d 45 51 55 | 49 56 3d 22 43 6f 6e 74 |HTTP-EQU|IV="Cont|
|000000d0| 65 6e 74 2d 54 79 70 65 | 22 20 43 4f 4e 54 45 4e |ent-Type|" CONTEN|
|000000e0| 54 3d 22 74 65 78 74 2f | 68 74 6d 6c 3b 20 63 68 |T="text/|html; ch|
|000000f0| 61 72 73 65 74 3d 75 74 | 66 2d 38 22 3e 0a 3c 4d |arset=ut|f-8">.<M|
|00000100| 45 54 41 20 4e 41 4d 45 | 3d 22 76 69 65 77 70 6f |ETA NAME|="viewpo|
|00000110| 72 74 22 20 43 4f 4e 54 | 45 4e 54 3d 22 77 69 64 |rt" CONT|ENT="wid|
|00000120| 74 68 3d 64 65 76 69 63 | 65 2d 77 69 64 74 68 2c |th=devic|e-width,|
|00000130| 20 69 6e 69 74 69 61 6c | 2d 73 63 61 6c 65 3d 31 | initial|-scale=1|
|00000140| 2e 30 22 3e 0a 3c 4d 45 | 54 41 20 4e 41 4d 45 3d |.0">.<ME|TA NAME=|
|00000150| 22 47 65 6e 65 72 61 74 | 6f 72 22 20 43 4f 4e 54 |"Generat|or" CONT|
|00000160| 45 4e 54 3d 22 4c 61 54 | 65 58 32 48 54 4d 4c 20 |ENT="LaT|eX2HTML |
|00000170| 76 32 30 32 32 22 3e 0a | 0a 3c 4c 49 4e 4b 20 52 |v2022">.|.<LINK R|
|00000180| 45 4c 3d 22 53 54 59 4c | 45 53 48 45 45 54 22 20 |EL="STYL|ESHEET" |
|00000190| 48 52 45 46 3d 22 68 30 | 32 2e 63 73 73 22 3e 0a |HREF="h0|2.css">.|
|000001a0| 0a 3c 4c 49 4e 4b 20 52 | 45 4c 3d 22 6e 65 78 74 |.<LINK R|EL="next|
|000001b0| 22 20 48 52 45 46 3d 22 | 6e 6f 64 65 31 33 5f 6d |" HREF="|node13_m|
|000001c0| 6e 2e 68 74 6d 6c 22 3e | 0a 3c 4c 49 4e 4b 20 52 |n.html">|.<LINK R|
|000001d0| 45 4c 3d 22 70 72 65 76 | 69 6f 75 73 22 20 48 52 |EL="prev|ious" HR|
|000001e0| 45 46 3d 22 6e 6f 64 65 | 31 31 5f 6d 6e 2e 68 74 |EF="node|11_mn.ht|
|000001f0| 6d 6c 22 3e 0a 3c 4c 49 | 4e 4b 20 52 45 4c 3d 22 |ml">.<LI|NK REL="|
|00000200| 75 70 22 20 48 52 45 46 | 3d 22 6e 6f 64 65 31 30 |up" HREF|="node10|
|00000210| 5f 6d 6e 2e 68 74 6d 6c | 22 3e 0a 3c 4c 49 4e 4b |_mn.html|">.<LINK|
|00000220| 20 52 45 4c 3d 22 6e 65 | 78 74 22 20 48 52 45 46 | REL="ne|xt" HREF|
|00000230| 3d 22 6e 6f 64 65 31 33 | 5f 6d 6e 2e 68 74 6d 6c |="node13|_mn.html|
|00000240| 22 3e 0a 3c 2f 48 45 41 | 44 3e 0a 20 0a 3c 42 4f |">.</HEA|D>. .<BO|
|00000250| 44 59 20 62 67 63 6f 6c | 6f 72 3d 22 23 66 66 66 |DY bgcol|or="#fff|
|00000260| 66 66 66 22 20 74 65 78 | 74 3d 22 23 30 30 30 30 |fff" tex|t="#0000|
|00000270| 30 30 22 20 6c 69 6e 6b | 3d 22 23 39 39 34 34 45 |00" link|="#9944E|
|00000280| 45 22 20 76 6c 69 6e 6b | 3d 22 23 30 30 30 30 66 |E" vlink|="#0000f|
|00000290| 66 22 20 61 6c 69 6e 6b | 3d 22 23 30 30 66 66 30 |f" alink|="#00ff0|
|000002a0| 30 22 3e 0a 0a 3c 48 33 | 3e 3c 41 20 49 44 3d 22 |0">..<H3|><A ID="|
|000002b0| 53 45 43 54 49 4f 4e 30 | 30 31 32 32 32 30 30 30 |SECTION0|01222000|
|000002c0| 30 30 30 30 30 30 30 30 | 30 30 30 22 3e 0a 52 65 |00000000|000">.Re|
|000002d0| 70 65 74 69 74 69 6f 6e | 3c 2f 41 3e 0a 3c 2f 48 |petition|</A>.</H|
|000002e0| 33 3e 0a 0a 3c 50 3e 0a | 52 65 70 65 74 69 74 69 |3>..<P>.|Repetiti|
|000002f0| 6f 6e 20 63 61 6e 20 62 | 65 20 65 78 70 72 65 73 |on can b|e expres|
|00000300| 73 65 64 20 69 6e 20 61 | 20 6e 75 6d 62 65 72 20 |sed in a| number |
|00000310| 6f 66 20 77 61 79 73 2e | 20 41 6e 20 69 6d 70 6f |of ways.| An impo|
|00000320| 72 74 61 6e 74 0d 0a 70 | 61 72 61 64 69 67 6d 20 |rtant..p|aradigm |
|00000330| 6f 66 20 72 65 70 65 74 | 69 74 69 6f 6e 20 69 73 |of repet|ition is|
|00000340| 20 74 68 65 20 77 68 69 | 6c 65 2d 6c 6f 6f 70 2c | the whi|le-loop,|
|00000350| 20 65 2e 67 2e 0a 0a 3c | 50 3e 0a 3c 42 52 3e 0a | e.g...<|P>.<BR>.|
|00000360| 3c 49 4d 47 0a 20 20 53 | 54 59 4c 45 3d 22 68 65 |<IMG. S|TYLE="he|
|00000370| 69 67 68 74 3a 20 32 2e | 31 30 65 78 3b 20 76 65 |ight: 2.|10ex; ve|
|00000380| 72 74 69 63 61 6c 2d 61 | 6c 69 67 6e 3a 20 31 37 |rtical-a|lign: 17|
|00000390| 36 2e 36 38 65 78 3b 20 | 22 20 53 52 43 3d 22 69 |6.68ex; |" SRC="i|
|000003a0| 6d 67 33 2e 70 6e 67 22 | 0a 20 41 4c 54 3d 22 5c |mg3.png"|. ALT="\|
|000003b0| 62 65 67 69 6e 7b 65 6c | 61 6e 7d 0a 57 48 49 4c |begin{el|an}.WHIL|
|000003c0| 45 0a 74 68 65 20 77 6f | 72 64 20 64 6f 65 73 20 |E.the wo|rd does |
|000003d0| 6e 6f 74 20 6f 63 63 75 | 72 20 6f 6e 20 74 68 69 |not occu|r on thi|
|000003e0| 73 20 70 61 67 65 0a 52 | 45 50 0a 6c 6f 6f 6b 20 |s page.R|EP.look |
|000003f0| 61 74 20 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |at the f|ollowing|
|00000400| 20 70 61 67 65 0a 45 4e | 44 52 45 50 0a 5c 65 6e | page.EN|DREP.\en|
|00000410| 64 7b 65 6c 61 6e 7d 22 | 3e 0a 3c 42 52 3e 0a 0a |d{elan}"|>.<BR>..|
|00000420| 3c 50 3e 0a 54 68 65 20 | 3c 45 4d 3e 63 6f 6e 64 |<P>.The |<EM>cond|
|00000430| 69 74 69 6f 6e 3c 2f 45 | 4d 3e 20 62 65 74 77 65 |ition</E|M> betwe|
|00000440| 65 6e 20 3c 54 54 3e 57 | 48 49 4c 45 3c 2f 54 54 |en <TT>W|HILE</TT|
|00000450| 3e 20 61 6e 64 20 3c 54 | 54 3e 52 45 50 3c 2f 54 |> and <T|T>REP</T|
|00000460| 54 3e 20 69 73 20 61 20 | 75 6e 69 74 0d 0a 77 68 |T> is a |unit..wh|
|00000470| 69 63 68 2c 20 75 70 6f | 6e 20 65 76 61 6c 75 61 |ich, upo|n evalua|
|00000480| 74 69 6f 6e 2c 20 79 69 | 65 6c 64 73 20 61 20 74 |tion, yi|elds a t|
|00000490| 72 75 74 68 20 76 61 6c | 75 65 20 28 74 72 75 65 |ruth val|ue (true|
|000004a0| 20 6f 72 20 66 61 6c 73 | 65 29 2e 0a 0a 3c 50 3e | or fals|e)...<P>|
|000004b0| 0a 54 68 65 20 70 61 72 | 61 67 72 61 70 68 20 62 |.The par|agraph b|
|000004c0| 65 74 77 65 65 6e 20 74 | 68 65 20 6b 65 79 77 6f |etween t|he keywo|
|000004d0| 72 64 73 20 3c 54 54 3e | 52 45 50 3c 2f 54 54 3e |rds <TT>|REP</TT>|
|000004e0| 20 61 6e 64 20 3c 54 54 | 3e 45 4e 44 52 45 50 3c | and <TT|>ENDREP<|
|000004f0| 2f 54 54 3e 0d 0a 69 73 | 20 65 78 65 63 75 74 65 |/TT>..is| execute|
|00000500| 64 20 6f 6e 6c 79 20 69 | 66 20 74 68 65 20 63 6f |d only i|f the co|
|00000510| 6e 64 69 74 69 6f 6e 20 | 79 69 65 6c 64 73 20 74 |ndition |yields t|
|00000520| 72 75 65 2e 20 41 66 74 | 65 72 20 74 68 65 20 65 |rue. Aft|er the e|
|00000530| 78 65 63 75 74 69 6f 6e | 0d 0a 6f 66 20 74 68 65 |xecution|..of the|
|00000540| 20 70 61 72 61 67 72 61 | 70 68 20 28 74 68 65 20 | paragra|ph (the |
|00000550| 60 60 6c 6f 6f 70 2d 62 | 6f 64 79 27 27 29 20 74 |``loop-b|ody'') t|
|00000560| 68 65 20 63 6f 6e 64 69 | 74 69 6f 6e 20 69 73 20 |he condi|tion is |
|00000570| 65 76 61 6c 75 61 74 65 | 64 0d 0a 61 67 61 69 6e |evaluate|d..again|
|00000580| 2c 20 61 6e 64 20 61 63 | 63 6f 72 64 69 6e 67 6c |, and ac|cordingl|
|00000590| 79 20 74 68 65 20 6c 6f | 6f 70 2d 62 6f 64 79 20 |y the lo|op-body |
|000005a0| 6d 61 79 20 62 65 20 65 | 78 65 63 75 74 65 64 20 |may be e|xecuted |
|000005b0| 72 65 70 65 61 74 65 64 | 6c 79 2e 0d 0a 54 68 65 |repeated|ly...The|
|000005c0| 20 65 78 65 63 75 74 69 | 6f 6e 20 65 6e 64 73 20 | executi|on ends |
|000005d0| 61 73 20 73 6f 6f 6e 20 | 61 73 20 74 68 65 20 63 |as soon |as the c|
|000005e0| 6f 6e 64 69 74 69 6f 6e | 20 75 70 6f 6e 20 65 76 |ondition| upon ev|
|000005f0| 61 6c 75 61 74 69 6f 6e | 20 79 69 65 6c 64 73 0d |aluation| yields.|
|00000600| 0a 66 61 6c 73 65 2e 20 | 46 6f 72 20 74 68 6f 73 |.false. |For thos|
|00000610| 65 20 77 68 6f 20 70 72 | 65 66 65 72 20 6d 6f 72 |e who pr|efer mor|
|00000620| 65 20 72 65 61 64 61 62 | 6c 65 20 6b 65 79 77 6f |e readab|le keywo|
|00000630| 72 64 73 2c 20 3c 54 54 | 3e 52 45 50 3c 2f 54 54 |rds, <TT|>REP</TT|
|00000640| 3e 0d 0a 6d 61 79 20 62 | 65 20 61 6c 73 6f 20 77 |>..may b|e also w|
|00000650| 72 69 74 74 65 6e 20 61 | 73 20 3c 54 54 3e 52 45 |ritten a|s <TT>RE|
|00000660| 50 45 41 54 3c 2f 54 54 | 3e 2c 20 61 6e 64 20 3c |PEAT</TT|>, and <|
|00000670| 54 54 3e 45 4e 44 52 45 | 50 3c 2f 54 54 3e 20 61 |TT>ENDRE|P</TT> a|
|00000680| 73 20 3c 54 54 3e 45 4e | 44 52 45 50 45 41 54 3c |s <TT>EN|DREPEAT<|
|00000690| 2f 54 54 3e 2e 0a 0a 3c | 50 3e 0a 0d 0a 3c 42 52 |/TT>...<|P>...<BR|
|000006a0| 3e 0a 3c 49 4d 47 0a 20 | 20 53 54 59 4c 45 3d 22 |>.<IMG. | STYLE="|
|000006b0| 68 65 69 67 68 74 3a 20 | 32 2e 31 37 65 78 3b 20 |height: |2.17ex; |
|000006c0| 76 65 72 74 69 63 61 6c | 2d 61 6c 69 67 6e 3a 20 |vertical|-align: |
|000006d0| 31 37 36 2e 36 38 65 78 | 3b 20 22 20 53 52 43 3d |176.68ex|; " SRC=|
|000006e0| 22 69 6d 67 34 2e 70 6e | 67 22 0a 20 41 4c 54 3d |"img4.pn|g". ALT=|
|000006f0| 22 5c 62 65 67 69 6e 7b | 65 6c 61 6e 7d 0a 57 48 |"\begin{|elan}.WH|
|00000700| 49 4c 45 0a 74 68 65 20 | 73 75 6e 20 69 73 20 73 |ILE.the |sun is s|
|00000710| 68 69 6e 69 6e 67 0a 52 | 45 50 0a 68 61 76 65 20 |hining.R|EP.have |
|00000720| 61 20 64 72 69 6e 6b 20 | 3b 0a 73 69 6e 67 20 61 |a drink |;.sing a|
|00000730| 6e 6f 74 68 65 72 20 73 | 6f 6e 67 0a 45 4e 44 52 |nother s|ong.ENDR|
|00000740| 45 50 0a 5c 65 6e 64 7b | 65 6c 61 6e 7d 22 3e 0a |EP.\end{|elan}">.|
|00000750| 3c 42 52 3e 0a 0a 3c 50 | 3e 0a 49 6e 20 74 68 69 |<BR>..<P|>.In thi|
|00000760| 73 20 6b 69 6e 64 20 6f | 66 20 72 65 70 65 74 69 |s kind o|f repeti|
|00000770| 74 69 6f 6e 20 61 20 74 | 65 73 74 20 6f 66 20 61 |tion a t|est of a|
|00000780| 70 70 6c 69 63 61 62 69 | 6c 69 74 79 20 69 73 20 |pplicabi|lity is |
|00000790| 70 65 72 66 6f 72 6d 65 | 64 0d 0a 62 65 66 6f 72 |performe|d..befor|
|000007a0| 65 20 65 61 63 68 20 63 | 79 63 6c 65 20 28 60 60 |e each c|ycle (``|
|000007b0| 70 72 65 2d 63 68 65 63 | 6b 65 64 2d 6c 6f 6f 70 |pre-chec|ked-loop|
|000007c0| 27 27 29 2e 20 49 66 20 | 69 6e 20 74 68 69 73 20 |''). If |in this |
|000007d0| 65 78 61 6d 70 6c 65 0d | 0a 69 74 20 69 73 20 72 |example.|.it is r|
|000007e0| 61 69 6e 79 2c 20 74 68 | 65 20 6c 6f 6f 70 2d 62 |ainy, th|e loop-b|
|000007f0| 6f 64 79 20 69 73 20 6e | 65 76 65 72 20 65 78 65 |ody is n|ever exe|
|00000800| 63 75 74 65 64 2c 20 61 | 6e 64 20 79 6f 75 20 68 |cuted, a|nd you h|
|00000810| 61 76 65 20 74 6f 0d 0a | 73 74 61 79 20 73 6f 62 |ave to..|stay sob|
|00000820| 65 72 2e 0a 0a 3c 50 3e | 0a 46 6f 72 20 63 61 73 |er...<P>|.For cas|
|00000830| 65 73 20 77 68 65 72 65 | 20 74 68 65 72 65 20 69 |es where| there i|
|00000840| 73 20 61 6c 77 61 79 73 | 20 73 6f 6d 65 74 68 69 |s always| somethi|
|00000850| 6e 67 20 74 6f 20 62 65 | 20 64 6f 6e 65 20 66 69 |ng to be| done fi|
|00000860| 72 73 74 2c 20 61 6e 64 | 0d 0a 63 68 65 63 6b 65 |rst, and|..checke|
|00000870| 64 20 66 6f 72 20 72 65 | 70 65 74 69 74 69 6f 6e |d for re|petition|
|00000880| 20 61 66 74 65 72 77 61 | 72 64 73 20 28 60 60 70 | afterwa|rds (``p|
|00000890| 6f 73 74 2d 63 68 65 63 | 6b 65 64 2d 6c 6f 6f 70 |ost-chec|ked-loop|
|000008a0| 27 27 29 20 45 6c 61 6e | 0d 0a 68 61 73 20 74 68 |'') Elan|..has th|
|000008b0| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 63 6f 6d 70 |e follow|ing comp|
|000008c0| 6c 65 6d 65 6e 74 61 72 | 79 20 72 65 70 65 74 69 |lementar|y repeti|
|000008d0| 74 69 76 65 20 63 6f 6e | 73 74 72 75 63 74 3a 0a |tive con|struct:.|
|000008e0| 0a 3c 50 3e 0a 3c 42 52 | 3e 0a 3c 49 4d 47 0a 20 |.<P>.<BR|>.<IMG. |
|000008f0| 20 53 54 59 4c 45 3d 22 | 68 65 69 67 68 74 3a 20 | STYLE="|height: |
|00000900| 32 2e 31 30 65 78 3b 20 | 76 65 72 74 69 63 61 6c |2.10ex; |vertical|
|00000910| 2d 61 6c 69 67 6e 3a 20 | 31 37 36 2e 36 38 65 78 |-align: |176.68ex|
|00000920| 3b 20 22 20 53 52 43 3d | 22 69 6d 67 35 2e 70 6e |; " SRC=|"img5.pn|
|00000930| 67 22 0a 20 41 4c 54 3d | 22 5c 62 65 67 69 6e 7b |g". ALT=|"\begin{|
|00000940| 65 6c 61 6e 7d 0a 52 45 | 50 0a 64 72 69 6e 6b 20 |elan}.RE|P.drink |
|00000950| 61 20 67 6c 61 73 73 20 | 6f 66 20 74 65 61 20 77 |a glass |of tea w|
|00000960| 69 74 68 20 72 75 6d 20 | 3b 0a 73 69 6e 67 20 61 |ith rum |;.sing a|
|00000970| 20 63 68 72 69 73 74 6d | 61 73 20 63 61 72 6f 6c | christm|as carol|
|00000980| 0a 55 4e 54 49 4c 0a 69 | 74 20 73 74 6f 70 73 20 |.UNTIL.i|t stops |
|00000990| 73 6e 6f 77 69 6e 67 0a | 45 4e 44 52 45 50 0a 5c |snowing.|ENDREP.\|
|000009a0| 65 6e 64 7b 65 6c 61 6e | 7d 22 3e 0a 3c 42 52 3e |end{elan|}">.<BR>|
|000009b0| 0a 0a 3c 50 3e 0a 49 6e | 20 74 68 69 73 20 63 61 |..<P>.In| this ca|
|000009c0| 73 65 20 74 68 65 20 63 | 6f 6e 64 69 74 69 6f 6e |se the c|ondition|
|000009d0| 20 77 68 69 63 68 20 73 | 74 61 6e 64 73 20 62 65 | which s|tands be|
|000009e0| 74 77 65 65 6e 20 3c 54 | 54 3e 55 4e 54 49 4c 3c |tween <T|T>UNTIL<|
|000009f0| 2f 54 54 3e 20 61 6e 64 | 0d 0a 3c 54 54 3e 45 4e |/TT> and|..<TT>EN|
|00000a00| 44 52 45 50 3c 2f 54 54 | 3e 20 69 73 20 65 78 65 |DREP</TT|> is exe|
|00000a10| 63 75 74 65 64 20 61 66 | 74 65 72 20 65 61 63 68 |cuted af|ter each|
|00000a20| 20 65 78 65 63 75 74 69 | 6f 6e 20 6f 66 20 74 68 | executi|on of th|
|00000a30| 65 20 66 69 72 73 74 20 | 70 61 72 61 67 72 61 70 |e first |paragrap|
|00000a40| 68 2c 0d 0a 74 68 65 20 | 72 65 70 65 74 69 74 69 |h,..the |repetiti|
|00000a50| 6f 6e 20 63 6f 6e 74 69 | 6e 75 65 73 20 69 66 20 |on conti|nues if |
|00000a60| 74 68 65 20 63 6f 6e 64 | 69 74 69 6f 6e 20 79 69 |the cond|ition yi|
|00000a70| 65 6c 64 73 20 66 61 6c | 73 65 20 61 6e 64 20 73 |elds fal|se and s|
|00000a80| 74 6f 70 73 0d 0a 69 66 | 20 74 68 65 20 63 6f 6e |tops..if| the con|
|00000a90| 64 69 74 69 6f 6e 20 79 | 69 65 6c 64 73 20 74 72 |dition y|ields tr|
|00000aa0| 75 65 2e 0a 0a 3c 50 3e | 0a 46 6f 72 20 63 61 73 |ue...<P>|.For cas|
|00000ab0| 65 73 20 77 68 65 72 65 | 20 74 68 65 20 6e 75 6d |es where| the num|
|00000ac0| 62 65 72 20 6f 66 20 72 | 65 70 65 74 69 74 69 6f |ber of r|epetitio|
|00000ad0| 6e 73 20 69 73 20 6b 6e | 6f 77 6e 20 69 6e 20 61 |ns is kn|own in a|
|00000ae0| 64 76 61 6e 63 65 2c 0d | 0a 45 6c 61 6e 20 6f 66 |dvance,.|.Elan of|
|00000af0| 66 65 72 73 20 61 20 60 | 60 63 6f 75 6e 74 69 6e |fers a `|`countin|
|00000b00| 67 2d 6c 6f 6f 70 27 27 | 2c 20 61 6c 73 6f 20 63 |g-loop''|, also c|
|00000b10| 61 6c 6c 65 64 20 66 6f | 72 2d 6c 6f 6f 70 2e 0a |alled fo|r-loop..|
|00000b20| 0a 3c 50 3e 0a 3c 42 52 | 3e 0a 3c 49 4d 47 0a 20 |.<P>.<BR|>.<IMG. |
|00000b30| 20 53 54 59 4c 45 3d 22 | 68 65 69 67 68 74 3a 20 | STYLE="|height: |
|00000b40| 32 2e 31 37 65 78 3b 20 | 76 65 72 74 69 63 61 6c |2.17ex; |vertical|
|00000b50| 2d 61 6c 69 67 6e 3a 20 | 31 37 36 2e 36 38 65 78 |-align: |176.68ex|
|00000b60| 3b 20 22 20 53 52 43 3d | 22 69 6d 67 36 2e 70 6e |; " SRC=|"img6.pn|
|00000b70| 67 22 0a 20 41 4c 54 3d | 22 5c 62 65 67 69 6e 7b |g". ALT=|"\begin{|
|00000b80| 65 6c 61 6e 7d 0a 46 4f | 52 20 69 20 46 52 4f 4d |elan}.FO|R i FROM|
|00000b90| 20 6d 69 6e 20 55 50 54 | 4f 20 6d 61 78 0a 52 45 | min UPT|O max.RE|
|00000ba0| 50 0a 74 61 6c 6c 79 20 | 69 20 74 68 20 65 6e 74 |P.tally |i th ent|
|00000bb0| 72 79 0a 45 4e 44 52 45 | 50 0a 5c 65 6e 64 7b 65 |ry.ENDRE|P.\end{e|
|00000bc0| 6c 61 6e 7d 22 3e 0a 3c | 42 52 3e 0a 0a 3c 50 3e |lan}">.<|BR>..<P>|
|00000bd0| 0a 54 68 65 20 75 6e 69 | 74 73 20 3c 54 54 3e 6d |.The uni|ts <TT>m|
|00000be0| 69 6e 3c 2f 54 54 3e 20 | 61 6e 64 20 3c 54 54 3e |in</TT> |and <TT>|
|00000bf0| 6d 61 78 3c 2f 54 54 3e | 20 79 69 65 6c 64 69 6e |max</TT>| yieldin|
|00000c00| 67 20 69 6e 74 65 67 65 | 72 73 20 61 72 65 20 65 |g intege|rs are e|
|00000c10| 76 61 6c 75 61 74 65 64 | 0d 0a 6f 6e 63 65 20 61 |valuated|..once a|
|00000c20| 74 20 74 68 65 20 62 65 | 67 69 6e 6e 69 6e 67 20 |t the be|ginning |
|00000c30| 6f 66 20 74 68 65 20 66 | 6f 72 2d 6c 6f 6f 70 2e |of the f|or-loop.|
|00000c40| 20 54 68 65 20 63 6f 6e | 74 72 6f 6c 6c 65 64 20 | The con|trolled |
|00000c50| 69 6e 74 65 67 65 72 20 | 76 61 72 69 61 62 6c 65 |integer |variable|
|00000c60| 0d 0a 3c 54 54 3e 69 3c | 2f 54 54 3e 20 67 65 74 |..<TT>i<|/TT> get|
|00000c70| 73 20 74 68 65 20 76 61 | 6c 75 65 20 6f 66 20 3c |s the va|lue of <|
|00000c80| 54 54 3e 6d 69 6e 3c 2f | 54 54 3e 2e 20 41 73 20 |TT>min</|TT>. As |
|00000c90| 6c 6f 6e 67 20 61 73 20 | 3c 54 54 3e 69 3c 2f 54 |long as |<TT>i</T|
|00000ca0| 54 3e 20 69 73 20 6c 65 | 73 73 0d 0a 6f 72 20 65 |T> is le|ss..or e|
|00000cb0| 71 75 61 6c 20 74 6f 20 | 3c 54 54 3e 6d 61 78 3c |qual to |<TT>max<|
|00000cc0| 2f 54 54 3e 2c 20 74 68 | 65 20 6c 6f 6f 70 2d 62 |/TT>, th|e loop-b|
|00000cd0| 6f 64 79 20 62 65 74 77 | 65 65 6e 20 3c 54 54 3e |ody betw|een <TT>|
|00000ce0| 52 45 50 3c 2f 54 54 3e | 20 61 6e 64 20 3c 54 54 |REP</TT>| and <TT|
|00000cf0| 3e 0d 0a 45 4e 44 52 45 | 50 3c 2f 54 54 3e 20 69 |>..ENDRE|P</TT> i|
|00000d00| 73 20 65 78 65 63 75 74 | 65 64 2c 20 66 6f 6c 6c |s execut|ed, foll|
|00000d10| 6f 77 65 64 20 62 79 20 | 61 6e 20 69 6e 63 72 65 |owed by |an incre|
|00000d20| 6d 65 6e 74 20 6f 66 20 | 74 68 65 20 60 60 6c 6f |ment of |the ``lo|
|00000d30| 6f 70 2d 76 61 72 69 61 | 62 6c 65 27 27 0d 0a 3c |op-varia|ble''..<|
|00000d40| 54 54 3e 69 3c 2f 54 54 | 3e 20 62 79 20 6f 6e 65 |TT>i</TT|> by one|
|00000d50| 2e 20 57 69 74 68 69 6e | 20 74 68 65 20 6c 6f 6f |. Within| the loo|
|00000d60| 70 2d 62 6f 64 79 20 3c | 54 54 3e 69 3c 2f 54 54 |p-body <|TT>i</TT|
|00000d70| 3e 20 6d 61 79 20 62 65 | 20 75 73 65 64 2c 20 62 |> may be| used, b|
|00000d80| 75 74 0d 0a 6e 6f 74 20 | 61 73 73 69 67 6e 65 64 |ut..not |assigned|
|00000d90| 20 74 6f 2e 20 49 74 73 | 20 76 61 6c 75 65 20 69 | to. Its| value i|
|00000da0| 73 20 75 6e 64 65 66 69 | 6e 65 64 20 61 66 74 65 |s undefi|ned afte|
|00000db0| 72 20 74 68 65 20 65 78 | 65 63 75 74 69 6f 6e 20 |r the ex|ecution |
|00000dc0| 6f 66 0d 0a 74 68 65 20 | 66 6f 72 2d 6c 6f 6f 70 |of..the |for-loop|
|00000dd0| 2e 0a 0a 3c 50 3e 0a 49 | 6e 20 63 61 73 65 20 79 |...<P>.I|n case y|
|00000de0| 6f 75 20 77 61 6e 74 20 | 74 6f 20 63 6f 75 6e 74 |ou want |to count|
|00000df0| 20 6e 6f 74 20 75 70 77 | 61 72 64 73 2c 20 62 75 | not upw|ards, bu|
|00000e00| 74 20 64 6f 77 6e 77 61 | 72 64 73 20 66 72 6f 6d |t downwa|rds from|
|00000e10| 20 61 20 6c 61 72 67 65 | 72 0d 0a 76 61 6c 75 65 | a large|r..value|
|00000e20| 20 74 6f 20 61 20 73 6d | 61 6c 6c 65 72 20 6f 6e | to a sm|aller on|
|00000e30| 65 2c 20 74 68 65 72 65 | 20 69 73 20 61 20 76 61 |e, there| is a va|
|00000e40| 72 69 61 6e 74 20 6f 66 | 20 74 68 65 20 63 6f 75 |riant of| the cou|
|00000e50| 6e 74 69 6e 67 2d 6c 6f | 6f 70 3a 0a 0a 3c 50 3e |nting-lo|op:..<P>|
|00000e60| 0a 3c 42 52 3e 0a 3c 49 | 4d 47 0a 20 20 53 54 59 |.<BR>.<I|MG. STY|
|00000e70| 4c 45 3d 22 68 65 69 67 | 68 74 3a 20 32 2e 31 37 |LE="heig|ht: 2.17|
|00000e80| 65 78 3b 20 76 65 72 74 | 69 63 61 6c 2d 61 6c 69 |ex; vert|ical-ali|
|00000e90| 67 6e 3a 20 31 37 37 2e | 31 33 65 78 3b 20 22 20 |gn: 177.|13ex; " |
|00000ea0| 53 52 43 3d 22 69 6d 67 | 37 2e 70 6e 67 22 0a 20 |SRC="img|7.png". |
|00000eb0| 41 4c 54 3d 22 5c 62 65 | 67 69 6e 7b 65 6c 61 6e |ALT="\be|gin{elan|
|00000ec0| 7d 0a 46 4f 52 20 6e 72 | 20 46 52 4f 4d 20 73 74 |}.FOR nr| FROM st|
|00000ed0| 6f 63 6b 20 44 4f 57 4e | 54 4f 20 6d 69 6e 69 6d |ock DOWN|TO minim|
|00000ee0| 75 6d 0a 52 45 50 0a 73 | 65 6c 6c 20 6f 6e 65 0a |um.REP.s|ell one.|
|00000ef0| 45 4e 44 52 45 50 0a 5c | 65 6e 64 7b 65 6c 61 6e |ENDREP.\|end{elan|
|00000f00| 7d 22 3e 0a 3c 42 52 3e | 0a 0a 3c 50 3e 0a 49 6e |}">.<BR>|..<P>.In|
|00000f10| 20 74 68 69 73 20 76 61 | 72 69 61 6e 74 2c 20 3c | this va|riant, <|
|00000f20| 54 54 3e 6e 72 3c 2f 54 | 54 3e 20 69 73 20 63 6f |TT>nr</T|T> is co|
|00000f30| 75 6e 74 65 64 20 64 6f | 77 6e 20 66 72 6f 6d 20 |unted do|wn from |
|00000f40| 3c 54 54 3e 73 74 6f 63 | 6b 3c 2f 54 54 3e 20 74 |<TT>stoc|k</TT> t|
|00000f50| 6f 0d 0a 3c 54 54 3e 6d | 69 6e 69 6d 75 6d 3c 2f |o..<TT>m|inimum</|
|00000f60| 54 54 3e 2e 20 49 66 20 | 3c 54 54 3e 73 74 6f 63 |TT>. If |<TT>stoc|
|00000f70| 6b 3c 2f 54 54 3e 20 77 | 61 73 20 61 6c 72 65 61 |k</TT> w|as alrea|
|00000f80| 64 79 20 62 65 6c 6f 77 | 20 3c 54 54 3e 6d 69 6e |dy below| <TT>min|
|00000f90| 69 6d 75 6d 3c 2f 54 54 | 3e 2c 0d 0a 74 68 65 6e |imum</TT|>,..then|
|00000fa0| 20 74 68 65 20 6c 6f 6f | 70 2d 62 6f 64 79 20 69 | the loo|p-body i|
|00000fb0| 73 20 6e 6f 74 20 65 78 | 65 63 75 74 65 64 2e 0a |s not ex|ecuted..|
|00000fc0| 0a 3c 50 3e 0a 49 6e 20 | 63 61 73 65 20 74 68 65 |.<P>.In |case the|
|00000fd0| 20 76 61 6c 75 65 20 6f | 66 20 74 68 65 20 66 72 | value o|f the fr|
|00000fe0| 6f 6d 2d 70 61 72 74 20 | 69 73 20 6f 6e 65 20 61 |om-part |is one a|
|00000ff0| 6e 64 20 74 68 65 20 63 | 6f 6e 74 72 6f 6c 6c 65 |nd the c|ontrolle|
|00001000| 64 0d 0a 76 61 72 69 61 | 62 6c 65 20 69 73 20 6f |d..varia|ble is o|
|00001010| 66 20 6e 6f 20 69 6e 74 | 65 72 65 73 74 2c 20 74 |f no int|erest, t|
|00001020| 68 65 20 66 6f 72 2d 20 | 61 6e 64 20 66 72 6f 6d |he for- |and from|
|00001030| 2d 70 61 72 74 73 20 6d | 61 79 20 62 65 20 6c 65 |-parts m|ay be le|
|00001040| 66 74 0d 0a 6f 75 74 2c | 20 6c 65 61 64 69 6e 67 |ft..out,| leading|
|00001050| 20 74 6f 20 74 68 65 20 | 73 68 6f 72 74 65 72 20 | to the |shorter |
|00001060| 66 6f 72 6d 0a 0a 3c 50 | 3e 0a 0d 0a 3c 42 52 3e |form..<P|>...<BR>|
|00001070| 0a 3c 49 4d 47 0a 20 20 | 53 54 59 4c 45 3d 22 68 |.<IMG. |STYLE="h|
|00001080| 65 69 67 68 74 3a 20 31 | 2e 37 35 65 78 3b 20 76 |eight: 1|.75ex; v|
|00001090| 65 72 74 69 63 61 6c 2d | 61 6c 69 67 6e 3a 20 31 |ertical-|align: 1|
|000010a0| 37 37 2e 31 30 65 78 3b | 20 22 20 53 52 43 3d 22 |77.10ex;| " SRC="|
|000010b0| 69 6d 67 38 2e 70 6e 67 | 22 0a 20 41 4c 54 3d 22 |img8.png|". ALT="|
|000010c0| 5c 62 65 67 69 6e 7b 65 | 6c 61 6e 7d 0a 55 50 54 |\begin{e|lan}.UPT|
|000010d0| 4f 20 32 30 0a 52 45 50 | 0a 68 69 74 20 68 69 6d |O 20.REP|.hit him|
|000010e0| 20 6f 76 65 72 20 74 68 | 65 20 68 65 61 64 20 3b | over th|e head ;|
|000010f0| 0a 70 69 63 6b 20 68 69 | 6d 20 75 70 0a 45 4e 44 |.pick hi|m up.END|
|00001100| 52 45 50 0a 5c 65 6e 64 | 7b 65 6c 61 6e 7d 22 3e |REP.\end|{elan}">|
|00001110| 0a 3c 42 52 3e 0a 0a 3c | 50 3e 0a 41 20 6c 61 74 |.<BR>..<|P>.A lat|
|00001120| 65 72 20 73 65 63 74 69 | 6f 6e 20 77 69 6c 6c 20 |er secti|on will |
|00001130| 64 65 6d 6f 6e 73 74 72 | 61 74 65 20 74 68 65 20 |demonstr|ate the |
|00001140| 75 73 65 20 6f 66 20 74 | 68 65 20 63 6f 75 6e 74 |use of t|he count|
|00001150| 69 6e 67 2d 6c 6f 6f 70 | 0d 0a 69 6e 20 70 72 6f |ing-loop|..in pro|
|00001160| 63 65 73 73 69 6e 67 20 | 72 6f 77 73 20 6f 66 20 |cessing |rows of |
|00001170| 64 61 74 61 20 65 6c 65 | 6d 65 6e 74 73 2e 0a 0a |data ele|ments...|
|00001180| 3c 50 3e 0a 0a 3c 48 52 | 3e 0a 0a 3c 2f 42 4f 44 |<P>..<HR|>..</BOD|
|00001190| 59 3e 0a 3c 2f 48 54 4d | 4c 3e 0a |Y>.</HTM|L>. |
+--------+-------------------------+-------------------------+--------+--------+