home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 0 / 0997 < prev    next >
SHell self-extracting ARchive  |  1990-12-28  |  61.5 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: SHell self-extracting ARchive (archive/shar).

You can browse this item here: 0997

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert SHell self-extracting ARchive (archive/shar) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news or mail, ASCII text default
100% TrID E-Mail message (Var. 2) default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/329 Shell Archive Format default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/rfc822 default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 46 72 6f 6d 3a 20 70 65 | 74 65 72 40 66 69 63 63 |From: pe|ter@ficc|
|00000010| 2e 75 75 2e 6e 65 74 20 | 28 50 65 74 65 72 20 64 |.uu.net |(Peter d|
|00000020| 61 20 53 69 6c 76 61 29 | 0a 4e 65 77 73 67 72 6f |a Silva)|.Newsgro|
|00000030| 75 70 73 3a 20 61 6c 74 | 2e 73 6f 75 72 63 65 73 |ups: alt|.sources|
|00000040| 0a 53 75 62 6a 65 63 74 | 3a 20 54 43 4c 20 64 6f |.Subject|: TCL do|
|00000050| 63 75 6d 65 6e 74 61 74 | 69 6f 6e 20 28 70 61 72 |cumentat|ion (par|
|00000060| 74 20 30 31 2f 30 32 29 | 0a 4d 65 73 73 61 67 65 |t 01/02)|.Message|
|00000070| 2d 49 44 3a 20 3c 38 54 | 33 32 33 2d 38 66 69 63 |-ID: <8T|323-8fic|
|00000080| 63 40 66 69 63 63 2e 75 | 75 2e 6e 65 74 3e 0a 44 |c@ficc.u|u.net>.D|
|00000090| 61 74 65 3a 20 39 20 4d | 61 72 20 39 30 20 30 33 |ate: 9 M|ar 90 03|
|000000a0| 3a 34 37 3a 34 35 20 47 | 4d 54 0a 0a 41 72 63 68 |:47:45 G|MT..Arch|
|000000b0| 69 76 65 2d 6e 61 6d 65 | 3a 20 74 63 6c 2f 44 6f |ive-name|: tcl/Do|
|000000c0| 63 50 61 72 74 30 31 0a | 0a 23 21 20 2f 62 69 6e |cPart01.|.#! /bin|
|000000d0| 2f 73 68 0a 23 20 54 68 | 69 73 20 69 73 20 61 20 |/sh.# Th|is is a |
|000000e0| 73 68 65 6c 6c 20 61 72 | 63 68 69 76 65 2e 20 20 |shell ar|chive. |
|000000f0| 52 65 6d 6f 76 65 20 61 | 6e 79 74 68 69 6e 67 20 |Remove a|nything |
|00000100| 62 65 66 6f 72 65 20 74 | 68 69 73 20 6c 69 6e 65 |before t|his line|
|00000110| 2c 20 74 68 65 6e 20 66 | 65 65 64 20 69 74 0a 23 |, then f|eed it.#|
|00000120| 20 69 6e 74 6f 20 61 20 | 73 68 65 6c 6c 20 76 69 | into a |shell vi|
|00000130| 61 20 22 73 68 20 66 69 | 6c 65 22 20 6f 72 20 73 |a "sh fi|le" or s|
|00000140| 69 6d 69 6c 61 72 2e 20 | 20 54 6f 20 6f 76 65 72 |imilar. | To over|
|00000150| 77 72 69 74 65 20 65 78 | 69 73 74 69 6e 67 20 66 |write ex|isting f|
|00000160| 69 6c 65 73 2c 0a 23 20 | 74 79 70 65 20 22 73 68 |iles,.# |type "sh|
|00000170| 20 66 69 6c 65 20 2d 63 | 22 2e 0a 23 20 54 68 65 | file -c|"..# The|
|00000180| 20 74 6f 6f 6c 20 74 68 | 61 74 20 67 65 6e 65 72 | tool th|at gener|
|00000190| 61 74 65 64 20 74 68 69 | 73 20 61 70 70 65 61 72 |ated thi|s appear|
|000001a0| 65 64 20 69 6e 20 74 68 | 65 20 63 6f 6d 70 2e 73 |ed in th|e comp.s|
|000001b0| 6f 75 72 63 65 73 2e 75 | 6e 69 78 20 6e 65 77 73 |ources.u|nix news|
|000001c0| 67 72 6f 75 70 3b 0a 23 | 20 73 65 6e 64 20 6d 61 |group;.#| send ma|
|000001d0| 69 6c 20 74 6f 20 63 6f | 6d 70 2d 73 6f 75 72 63 |il to co|mp-sourc|
|000001e0| 65 73 2d 75 6e 69 78 40 | 75 75 6e 65 74 2e 75 75 |es-unix@|uunet.uu|
|000001f0| 2e 6e 65 74 20 69 66 20 | 79 6f 75 20 77 61 6e 74 |.net if |you want|
|00000200| 20 74 68 61 74 20 74 6f | 6f 6c 2e 0a 23 20 49 66 | that to|ol..# If|
|00000210| 20 74 68 69 73 20 61 72 | 63 68 69 76 65 20 69 73 | this ar|chive is|
|00000220| 20 63 6f 6d 70 6c 65 74 | 65 2c 20 79 6f 75 20 77 | complet|e, you w|
|00000230| 69 6c 6c 20 73 65 65 20 | 74 68 65 20 66 6f 6c 6c |ill see |the foll|
|00000240| 6f 77 69 6e 67 20 6d 65 | 73 73 61 67 65 20 61 74 |owing me|ssage at|
|00000250| 20 74 68 65 20 65 6e 64 | 3a 0a 23 09 09 22 45 6e | the end|:.#.."En|
|00000260| 64 20 6f 66 20 61 72 63 | 68 69 76 65 20 31 20 28 |d of arc|hive 1 (|
|00000270| 6f 66 20 32 29 2e 22 0a | 23 20 43 6f 6e 74 65 6e |of 2).".|# Conten|
|00000280| 74 73 3a 20 20 4d 41 4e | 49 46 45 53 54 20 54 63 |ts: MAN|IFEST Tc|
|00000290| 6c 2e 31 20 74 6d 61 63 | 2e 73 70 72 69 74 65 0a |l.1 tmac|.sprite.|
|000002a0| 23 20 57 72 61 70 70 65 | 64 20 62 79 20 70 65 74 |# Wrappe|d by pet|
|000002b0| 65 72 40 66 69 63 63 2e | 75 75 2e 6e 65 74 20 6f |er@ficc.|uu.net o|
|000002c0| 6e 20 54 68 75 20 4d 61 | 72 20 20 38 20 32 31 3a |n Thu Ma|r 8 21:|
|000002d0| 34 35 3a 32 37 20 31 39 | 39 30 0a 50 41 54 48 3d |45:27 19|90.PATH=|
|000002e0| 2f 62 69 6e 3a 2f 75 73 | 72 2f 62 69 6e 3a 2f 75 |/bin:/us|r/bin:/u|
|000002f0| 73 72 2f 75 63 62 20 3b | 20 65 78 70 6f 72 74 20 |sr/ucb ;| export |
|00000300| 50 41 54 48 0a 69 66 20 | 74 65 73 74 20 2d 66 20 |PATH.if |test -f |
|00000310| 27 4d 41 4e 49 46 45 53 | 54 27 20 2d 61 20 22 24 |'MANIFES|T' -a "$|
|00000320| 7b 31 7d 22 20 21 3d 20 | 22 2d 63 22 20 3b 20 74 |{1}" != |"-c" ; t|
|00000330| 68 65 6e 20 0a 20 20 65 | 63 68 6f 20 73 68 61 72 |hen . e|cho shar|
|00000340| 3a 20 57 69 6c 6c 20 6e | 6f 74 20 63 6c 6f 62 62 |: Will n|ot clobb|
|00000350| 65 72 20 65 78 69 73 74 | 69 6e 67 20 66 69 6c 65 |er exist|ing file|
|00000360| 20 5c 22 27 4d 41 4e 49 | 46 45 53 54 27 5c 22 0a | \"'MANI|FEST'\".|
|00000370| 65 6c 73 65 0a 65 63 68 | 6f 20 73 68 61 72 3a 20 |else.ech|o shar: |
|00000380| 45 78 74 72 61 63 74 69 | 6e 67 20 5c 22 27 4d 41 |Extracti|ng \"'MA|
|00000390| 4e 49 46 45 53 54 27 5c | 22 20 5c 28 37 34 36 20 |NIFEST'\|" \(746 |
|000003a0| 63 68 61 72 61 63 74 65 | 72 73 5c 29 0a 73 65 64 |characte|rs\).sed|
|000003b0| 20 22 73 2f 5e 58 2f 2f | 22 20 3e 27 4d 41 4e 49 | "s/^X//|" >'MANI|
|000003c0| 46 45 53 54 27 20 3c 3c | 27 45 4e 44 5f 4f 46 5f |FEST' <<|'END_OF_|
|000003d0| 46 49 4c 45 27 0a 58 20 | 20 20 46 69 6c 65 20 4e |FILE'.X | File N|
|000003e0| 61 6d 65 09 09 41 72 63 | 68 69 76 65 20 23 09 44 |ame..Arc|hive #.D|
|000003f0| 65 73 63 72 69 70 74 69 | 6f 6e 0a 58 2d 2d 2d 2d |escripti|on.X----|
|00000400| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000410| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000420| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000430| 2d 2d 2d 2d 2d 2d 0a 58 | 20 4d 41 4e 49 46 45 53 |------.X| MANIFES|
|00000440| 54 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |T | |
|00000450| 20 20 20 20 31 09 0a 58 | 20 42 61 63 6b 73 6c 61 | 1..X| Backsla|
|00000460| 73 68 2e 33 20 20 20 20 | 20 20 20 20 20 20 20 20 |sh.3 | |
|00000470| 20 20 20 20 32 09 0a 58 | 20 43 72 65 61 74 65 43 | 2..X| CreateC|
|00000480| 6f 6d 6d 2e 33 20 20 20 | 20 20 20 20 20 20 20 20 |omm.3 | |
|00000490| 20 20 20 20 32 09 0a 58 | 20 43 72 65 61 74 65 49 | 2..X| CreateI|
|000004a0| 6e 74 65 2e 33 20 20 20 | 20 20 20 20 20 20 20 20 |nte.3 | |
|000004b0| 20 20 20 20 32 09 0a 58 | 20 43 72 65 61 74 65 54 | 2..X| CreateT|
|000004c0| 72 61 63 2e 33 20 20 20 | 20 20 20 20 20 20 20 20 |rac.3 | |
|000004d0| 20 20 20 20 32 09 0a 58 | 20 44 65 6c 65 74 65 43 | 2..X| DeleteC|
|000004e0| 6f 6d 6d 2e 33 20 20 20 | 20 20 20 20 20 20 20 20 |omm.3 | |
|000004f0| 20 20 20 20 32 09 0a 58 | 20 44 65 6c 65 74 65 49 | 2..X| DeleteI|
|00000500| 6e 74 65 2e 33 20 20 20 | 20 20 20 20 20 20 20 20 |nte.3 | |
|00000510| 20 20 20 20 32 09 0a 58 | 20 44 65 6c 65 74 65 54 | 2..X| DeleteT|
|00000520| 72 61 63 2e 33 20 20 20 | 20 20 20 20 20 20 20 20 |rac.3 | |
|00000530| 20 20 20 20 32 09 0a 58 | 20 45 76 61 6c 2e 33 20 | 2..X| Eval.3 |
|00000540| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000550| 20 20 20 20 32 09 0a 58 | 20 45 78 70 72 2e 33 20 | 2..X| Expr.3 |
|00000560| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000570| 20 20 20 20 32 09 0a 58 | 20 47 65 74 56 61 72 2e | 2..X| GetVar.|
|00000580| 33 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |3 | |
|00000590| 20 20 20 20 32 09 0a 58 | 20 49 6e 74 65 72 70 2e | 2..X| Interp.|
|000005a0| 33 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |3 | |
|000005b0| 20 20 20 20 32 09 0a 58 | 20 4d 61 6b 65 66 69 6c | 2..X| Makefil|
|000005c0| 65 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |e | |
|000005d0| 20 20 20 20 32 09 0a 58 | 20 4d 65 72 67 65 2e 33 | 2..X| Merge.3|
|000005e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000005f0| 20 20 20 20 32 09 0a 58 | 20 52 65 74 75 72 6e 2e | 2..X| Return.|
|00000600| 33 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |3 | |
|00000610| 20 20 20 20 32 09 0a 58 | 20 53 65 74 56 61 72 2e | 2..X| SetVar.|
|00000620| 33 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |3 | |
|00000630| 20 20 20 20 32 09 0a 58 | 20 53 70 6c 69 74 4c 69 | 2..X| SplitLi|
|00000640| 73 74 2e 33 20 20 20 20 | 20 20 20 20 20 20 20 20 |st.3 | |
|00000650| 20 20 20 20 32 09 0a 58 | 20 53 74 72 69 6e 67 4d | 2..X| StringM|
|00000660| 61 74 63 2e 33 20 20 20 | 20 20 20 20 20 20 20 20 |atc.3 | |
|00000670| 20 20 20 20 32 09 0a 58 | 20 54 63 6c 2e 31 20 20 | 2..X| Tcl.1 |
|00000680| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000690| 20 20 20 20 31 09 0a 58 | 20 57 61 74 63 68 49 6e | 1..X| WatchIn|
|000006a0| 74 65 72 2e 33 20 20 20 | 20 20 20 20 20 20 20 20 |ter.3 | |
|000006b0| 20 20 20 20 32 09 0a 58 | 20 74 6d 61 63 2e 73 70 | 2..X| tmac.sp|
|000006c0| 72 69 74 65 20 20 20 20 | 20 20 20 20 20 20 20 20 |rite | |
|000006d0| 20 20 20 20 31 09 0a 45 | 4e 44 5f 4f 46 5f 46 49 | 1..E|ND_OF_FI|
|000006e0| 4c 45 0a 69 66 20 74 65 | 73 74 20 37 34 36 20 2d |LE.if te|st 746 -|
|000006f0| 6e 65 20 60 77 63 20 2d | 63 20 3c 27 4d 41 4e 49 |ne `wc -|c <'MANI|
|00000700| 46 45 53 54 27 60 3b 20 | 74 68 65 6e 0a 20 20 20 |FEST'`; |then. |
|00000710| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 5c 22 27 4d | echo sh|ar: \"'M|
|00000720| 41 4e 49 46 45 53 54 27 | 5c 22 20 75 6e 70 61 63 |ANIFEST'|\" unpac|
|00000730| 6b 65 64 20 77 69 74 68 | 20 77 72 6f 6e 67 20 73 |ked with| wrong s|
|00000740| 69 7a 65 21 0a 66 69 0a | 23 20 65 6e 64 20 6f 66 |ize!.fi.|# end of|
|00000750| 20 27 4d 41 4e 49 46 45 | 53 54 27 0a 66 69 0a 69 | 'MANIFE|ST'.fi.i|
|00000760| 66 20 74 65 73 74 20 2d | 66 20 27 54 63 6c 2e 31 |f test -|f 'Tcl.1|
|00000770| 27 20 2d 61 20 22 24 7b | 31 7d 22 20 21 3d 20 22 |' -a "${|1}" != "|
|00000780| 2d 63 22 20 3b 20 74 68 | 65 6e 20 0a 20 20 65 63 |-c" ; th|en . ec|
|00000790| 68 6f 20 73 68 61 72 3a | 20 57 69 6c 6c 20 6e 6f |ho shar:| Will no|
|000007a0| 74 20 63 6c 6f 62 62 65 | 72 20 65 78 69 73 74 69 |t clobbe|r existi|
|000007b0| 6e 67 20 66 69 6c 65 20 | 5c 22 27 54 63 6c 2e 31 |ng file |\"'Tcl.1|
|000007c0| 27 5c 22 0a 65 6c 73 65 | 0a 65 63 68 6f 20 73 68 |'\".else|.echo sh|
|000007d0| 61 72 3a 20 45 78 74 72 | 61 63 74 69 6e 67 20 5c |ar: Extr|acting \|
|000007e0| 22 27 54 63 6c 2e 31 27 | 5c 22 20 5c 28 35 33 34 |"'Tcl.1'|\" \(534|
|000007f0| 34 34 20 63 68 61 72 61 | 63 74 65 72 73 5c 29 0a |44 chara|cters\).|
|00000800| 73 65 64 20 22 73 2f 5e | 58 2f 2f 22 20 3e 27 54 |sed "s/^|X//" >'T|
|00000810| 63 6c 2e 31 27 20 3c 3c | 27 45 4e 44 5f 4f 46 5f |cl.1' <<|'END_OF_|
|00000820| 46 49 4c 45 27 0a 58 27 | 5c 22 20 43 6f 70 79 72 |FILE'.X'|\" Copyr|
|00000830| 69 67 68 74 20 31 39 38 | 39 20 52 65 67 65 6e 74 |ight 198|9 Regent|
|00000840| 73 20 6f 66 20 74 68 65 | 20 55 6e 69 76 65 72 73 |s of the| Univers|
|00000850| 69 74 79 20 6f 66 20 43 | 61 6c 69 66 6f 72 6e 69 |ity of C|aliforni|
|00000860| 61 0a 58 27 5c 22 20 50 | 65 72 6d 69 73 73 69 6f |a.X'\" P|ermissio|
|00000870| 6e 20 74 6f 20 75 73 65 | 2c 20 63 6f 70 79 2c 20 |n to use|, copy, |
|00000880| 6d 6f 64 69 66 79 2c 20 | 61 6e 64 20 64 69 73 74 |modify, |and dist|
|00000890| 72 69 62 75 74 65 20 74 | 68 69 73 0a 58 27 5c 22 |ribute t|his.X'\"|
|000008a0| 20 64 6f 63 75 6d 65 6e | 74 61 74 69 6f 6e 20 66 | documen|tation f|
|000008b0| 6f 72 20 61 6e 79 20 70 | 75 72 70 6f 73 65 20 61 |or any p|urpose a|
|000008c0| 6e 64 20 77 69 74 68 6f | 75 74 20 66 65 65 20 69 |nd witho|ut fee i|
|000008d0| 73 20 68 65 72 65 62 79 | 0a 58 27 5c 22 20 67 72 |s hereby|.X'\" gr|
|000008e0| 61 6e 74 65 64 2c 20 70 | 72 6f 76 69 64 65 64 20 |anted, p|rovided |
|000008f0| 74 68 61 74 20 74 68 69 | 73 20 6e 6f 74 69 63 65 |that thi|s notice|
|00000900| 20 61 70 70 65 61 72 73 | 20 69 6e 20 61 6c 6c 20 | appears| in all |
|00000910| 63 6f 70 69 65 73 2e 0a | 58 27 5c 22 20 54 68 65 |copies..|X'\" The|
|00000920| 20 55 6e 69 76 65 72 73 | 69 74 79 20 6f 66 20 43 | Univers|ity of C|
|00000930| 61 6c 69 66 6f 72 6e 69 | 61 20 6d 61 6b 65 73 20 |aliforni|a makes |
|00000940| 6e 6f 20 72 65 70 72 65 | 73 65 6e 74 61 74 69 6f |no repre|sentatio|
|00000950| 6e 73 20 61 62 6f 75 74 | 0a 58 27 5c 22 20 74 68 |ns about|.X'\" th|
|00000960| 65 20 73 75 69 74 61 62 | 69 6c 69 74 79 20 6f 66 |e suitab|ility of|
|00000970| 20 74 68 69 73 20 6d 61 | 74 65 72 69 61 6c 20 66 | this ma|terial f|
|00000980| 6f 72 20 61 6e 79 20 70 | 75 72 70 6f 73 65 2e 20 |or any p|urpose. |
|00000990| 20 49 74 20 69 73 0a 58 | 27 5c 22 20 70 72 6f 76 | It is.X|'\" prov|
|000009a0| 69 64 65 64 20 22 61 73 | 20 69 73 22 20 77 69 74 |ided "as| is" wit|
|000009b0| 68 6f 75 74 20 65 78 70 | 72 65 73 73 20 6f 72 20 |hout exp|ress or |
|000009c0| 69 6d 70 6c 69 65 64 20 | 77 61 72 72 61 6e 74 79 |implied |warranty|
|000009d0| 2e 0a 58 27 5c 22 20 0a | 58 27 5c 22 20 24 48 65 |..X'\" .|X'\" $He|
|000009e0| 61 64 65 72 3a 20 2f 73 | 70 72 69 74 65 2f 73 72 |ader: /s|prite/sr|
|000009f0| 63 2f 6c 69 62 2f 74 63 | 6c 2f 52 43 53 2f 54 63 |c/lib/tc|l/RCS/Tc|
|00000a00| 6c 2e 6d 61 6e 2c 76 20 | 31 2e 31 39 20 39 30 2f |l.man,v |1.19 90/|
|00000a10| 30 31 2f 32 37 20 31 34 | 3a 34 37 3a 34 30 20 6f |01/27 14|:47:40 o|
|00000a20| 75 73 74 65 72 20 45 78 | 70 20 24 20 53 50 52 49 |uster Ex|p $ SPRI|
|00000a30| 54 45 20 28 42 65 72 6b | 65 6c 65 79 29 0a 58 27 |TE (Berk|eley).X'|
|00000a40| 0a 58 2e 73 6f 20 5c 2a | 28 5d 6c 74 6d 61 63 2e |.X.so \*|(]ltmac.|
|00000a50| 73 70 72 69 74 65 0a 58 | 2e 48 53 20 54 63 6c 20 |sprite.X|.HS Tcl |
|00000a60| 74 63 6c 0a 58 2e 42 53 | 0a 58 2e 53 48 20 4e 41 |tcl.X.BS|.X.SH NA|
|00000a70| 4d 45 0a 58 54 63 6c 20 | 5c 2d 20 6f 76 65 72 76 |ME.XTcl |\- overv|
|00000a80| 69 65 77 20 6f 66 20 74 | 6f 6f 6c 20 63 6f 6d 6d |iew of t|ool comm|
|00000a90| 61 6e 64 20 6c 61 6e 67 | 75 61 67 65 20 66 61 63 |and lang|uage fac|
|00000aa0| 69 6c 69 74 69 65 73 0a | 58 2e 42 45 0a 58 0a 58 |ilities.|X.BE.X.X|
|00000ab0| 2e 53 48 20 49 4e 54 52 | 4f 44 55 43 54 49 4f 4e |.SH INTR|ODUCTION|
|00000ac0| 0a 58 2e 50 50 0a 58 54 | 63 6c 20 73 74 61 6e 64 |.X.PP.XT|cl stand|
|00000ad0| 73 20 66 6f 72 20 60 60 | 74 6f 6f 6c 20 63 6f 6d |s for ``|tool com|
|00000ae0| 6d 61 6e 64 20 6c 61 6e | 67 75 61 67 65 27 27 20 |mand lan|guage'' |
|00000af0| 61 6e 64 20 69 73 20 70 | 72 6f 6e 6f 75 6e 63 65 |and is p|ronounce|
|00000b00| 64 20 60 60 74 69 63 6b | 6c 65 2e 27 27 0a 58 49 |d ``tick|le.''.XI|
|00000b10| 74 20 69 73 20 61 63 74 | 75 61 6c 6c 79 20 74 77 |t is act|ually tw|
|00000b20| 6f 20 74 68 69 6e 67 73 | 3a 0a 58 61 20 6c 61 6e |o things|:.Xa lan|
|00000b30| 67 75 61 67 65 20 61 6e | 64 20 61 20 6c 69 62 72 |guage an|d a libr|
|00000b40| 61 72 79 2e 0a 58 46 69 | 72 73 74 2c 20 54 63 6c |ary..XFi|rst, Tcl|
|00000b50| 20 69 73 20 61 20 73 69 | 6d 70 6c 65 20 74 65 78 | is a si|mple tex|
|00000b60| 74 75 61 6c 20 6c 61 6e | 67 75 61 67 65 2c 0a 58 |tual lan|guage,.X|
|00000b70| 69 6e 74 65 6e 64 65 64 | 20 70 72 69 6d 61 72 69 |intended| primari|
|00000b80| 6c 79 20 66 6f 72 20 69 | 73 73 75 69 6e 67 20 63 |ly for i|ssuing c|
|00000b90| 6f 6d 6d 61 6e 64 73 20 | 74 6f 20 69 6e 74 65 72 |ommands |to inter|
|00000ba0| 61 63 74 69 76 65 20 70 | 72 6f 67 72 61 6d 73 20 |active p|rograms |
|00000bb0| 73 75 63 68 0a 58 61 73 | 20 74 65 78 74 20 65 64 |such.Xas| text ed|
|00000bc0| 69 74 6f 72 73 2c 20 64 | 65 62 75 67 67 65 72 73 |itors, d|ebuggers|
|00000bd0| 2c 20 69 6c 6c 75 73 74 | 72 61 74 6f 72 73 2c 20 |, illust|rators, |
|00000be0| 61 6e 64 20 73 68 65 6c | 6c 73 2e 20 20 49 74 20 |and shel|ls. It |
|00000bf0| 68 61 73 0a 58 61 20 73 | 69 6d 70 6c 65 20 73 79 |has.Xa s|imple sy|
|00000c00| 6e 74 61 78 20 61 6e 64 | 20 69 73 20 61 6c 73 6f |ntax and| is also|
|00000c10| 20 70 72 6f 67 72 61 6d | 6d 61 62 6c 65 2c 20 73 | program|mable, s|
|00000c20| 6f 0a 58 54 63 6c 20 75 | 73 65 72 73 20 63 61 6e |o.XTcl u|sers can|
|00000c30| 20 77 72 69 74 65 20 63 | 6f 6d 6d 61 6e 64 20 70 | write c|ommand p|
|00000c40| 72 6f 63 65 64 75 72 65 | 73 20 74 6f 20 70 72 6f |rocedure|s to pro|
|00000c50| 76 69 64 65 20 6d 6f 72 | 65 20 70 6f 77 65 72 66 |vide mor|e powerf|
|00000c60| 75 6c 0a 58 63 6f 6d 6d | 61 6e 64 73 20 74 68 61 |ul.Xcomm|ands tha|
|00000c70| 6e 20 74 68 6f 73 65 20 | 69 6e 20 74 68 65 20 62 |n those |in the b|
|00000c80| 75 69 6c 74 2d 69 6e 20 | 73 65 74 2e 0a 58 2e 50 |uilt-in |set..X.P|
|00000c90| 50 0a 58 53 65 63 6f 6e | 64 2c 20 54 63 6c 20 69 |P.XSecon|d, Tcl i|
|00000ca0| 73 20 61 20 6c 69 62 72 | 61 72 79 20 70 61 63 6b |s a libr|ary pack|
|00000cb0| 61 67 65 20 74 68 61 74 | 20 63 61 6e 20 62 65 20 |age that| can be |
|00000cc0| 65 6d 62 65 64 64 65 64 | 20 69 6e 20 61 70 70 6c |embedded| in appl|
|00000cd0| 69 63 61 74 69 6f 6e 0a | 58 70 72 6f 67 72 61 6d |ication.|Xprogram|
|00000ce0| 73 2e 20 20 54 68 65 20 | 54 63 6c 20 6c 69 62 72 |s. The |Tcl libr|
|00000cf0| 61 72 79 20 63 6f 6e 73 | 69 73 74 73 20 6f 66 20 |ary cons|ists of |
|00000d00| 61 20 70 61 72 73 65 72 | 20 66 6f 72 20 74 68 65 |a parser| for the|
|00000d10| 20 54 63 6c 0a 58 6c 61 | 6e 67 75 61 67 65 2c 20 | Tcl.Xla|nguage, |
|00000d20| 72 6f 75 74 69 6e 65 73 | 20 74 6f 20 69 6d 70 6c |routines| to impl|
|00000d30| 65 6d 65 6e 74 20 74 68 | 65 20 54 63 6c 20 62 75 |ement th|e Tcl bu|
|00000d40| 69 6c 74 2d 69 6e 20 63 | 6f 6d 6d 61 6e 64 73 2c |ilt-in c|ommands,|
|00000d50| 20 61 6e 64 0a 58 70 72 | 6f 63 65 64 75 72 65 73 | and.Xpr|ocedures|
|00000d60| 20 74 68 61 74 20 61 6c | 6c 6f 77 20 65 61 63 68 | that al|low each|
|00000d70| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 74 6f 20 | applica|tion to |
|00000d80| 65 78 74 65 6e 64 20 54 | 63 6c 20 77 69 74 68 20 |extend T|cl with |
|00000d90| 61 64 64 69 74 69 6f 6e | 61 6c 0a 58 63 6f 6d 6d |addition|al.Xcomm|
|00000da0| 61 6e 64 73 20 73 70 65 | 63 69 66 69 63 20 74 6f |ands spe|cific to|
|00000db0| 20 74 68 61 74 20 61 70 | 70 6c 69 63 61 74 69 6f | that ap|plicatio|
|00000dc0| 6e 2e 20 20 54 68 65 20 | 61 70 70 6c 69 63 61 74 |n. The |applicat|
|00000dd0| 69 6f 6e 20 70 72 6f 67 | 72 61 6d 0a 58 67 65 6e |ion prog|ram.Xgen|
|00000de0| 65 72 61 74 65 73 20 54 | 63 6c 20 63 6f 6d 6d 61 |erates T|cl comma|
|00000df0| 6e 64 73 20 61 6e 64 20 | 70 61 73 73 65 73 20 74 |nds and |passes t|
|00000e00| 68 65 6d 20 74 6f 20 74 | 68 65 20 54 63 6c 20 70 |hem to t|he Tcl p|
|00000e10| 61 72 73 65 72 20 66 6f | 72 0a 58 65 78 65 63 75 |arser fo|r.Xexecu|
|00000e20| 74 69 6f 6e 2e 20 20 43 | 6f 6d 6d 61 6e 64 73 20 |tion. C|ommands |
|00000e30| 6d 61 79 20 62 65 20 67 | 65 6e 65 72 61 74 65 64 |may be g|enerated|
|00000e40| 0a 58 62 79 20 72 65 61 | 64 69 6e 67 20 63 68 61 |.Xby rea|ding cha|
|00000e50| 72 61 63 74 65 72 73 20 | 66 72 6f 6d 20 61 6e 20 |racters |from an |
|00000e60| 69 6e 70 75 74 0a 58 73 | 6f 75 72 63 65 2c 20 6f |input.Xs|ource, o|
|00000e70| 72 20 62 79 20 61 73 73 | 6f 63 69 61 74 69 6e 67 |r by ass|ociating|
|00000e80| 20 63 6f 6d 6d 61 6e 64 | 20 73 74 72 69 6e 67 73 | command| strings|
|00000e90| 20 77 69 74 68 20 65 6c | 65 6d 65 6e 74 73 20 6f | with el|ements o|
|00000ea0| 66 20 74 68 65 0a 58 61 | 70 70 6c 69 63 61 74 69 |f the.Xa|pplicati|
|00000eb0| 6f 6e 27 73 20 75 73 65 | 72 20 69 6e 74 65 72 66 |on's use|r interf|
|00000ec0| 61 63 65 2c 20 73 75 63 | 68 20 61 73 20 6d 65 6e |ace, suc|h as men|
|00000ed0| 75 20 65 6e 74 72 69 65 | 73 2c 20 62 75 74 74 6f |u entrie|s, butto|
|00000ee0| 6e 73 2c 20 6f 72 0a 58 | 6b 65 79 73 74 72 6f 6b |ns, or.X|keystrok|
|00000ef0| 65 73 2e 0a 58 57 68 65 | 6e 20 74 68 65 20 54 63 |es..XWhe|n the Tc|
|00000f00| 6c 20 6c 69 62 72 61 72 | 79 20 72 65 63 65 69 76 |l librar|y receiv|
|00000f10| 65 73 20 63 6f 6d 6d 61 | 6e 64 73 20 69 74 20 70 |es comma|nds it p|
|00000f20| 61 72 73 65 73 20 74 68 | 65 6d 0a 58 69 6e 74 6f |arses th|em.Xinto|
|00000f30| 20 63 6f 6d 70 6f 6e 65 | 6e 74 20 66 69 65 6c 64 | compone|nt field|
|00000f40| 73 20 61 6e 64 20 65 78 | 65 63 75 74 65 73 20 62 |s and ex|ecutes b|
|00000f50| 75 69 6c 74 2d 69 6e 20 | 63 6f 6d 6d 61 6e 64 73 |uilt-in |commands|
|00000f60| 20 64 69 72 65 63 74 6c | 79 2e 0a 58 46 6f 72 20 | directl|y..XFor |
|00000f70| 63 6f 6d 6d 61 6e 64 73 | 20 69 6d 70 6c 65 6d 65 |commands| impleme|
|00000f80| 6e 74 65 64 20 62 79 20 | 74 68 65 0a 58 61 70 70 |nted by |the.Xapp|
|00000f90| 6c 69 63 61 74 69 6f 6e | 2c 20 54 63 6c 20 63 61 |lication|, Tcl ca|
|00000fa0| 6c 6c 73 20 62 61 63 6b | 20 74 6f 20 74 68 65 20 |lls back| to the |
|00000fb0| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 74 6f 20 65 |applicat|ion to e|
|00000fc0| 78 65 63 75 74 65 20 74 | 68 65 0a 58 63 6f 6d 6d |xecute t|he.Xcomm|
|00000fd0| 61 6e 64 73 2e 20 20 49 | 6e 20 6d 61 6e 79 20 63 |ands. I|n many c|
|00000fe0| 61 73 65 73 20 63 6f 6d | 6d 61 6e 64 73 20 77 69 |ases com|mands wi|
|00000ff0| 6c 6c 20 69 6e 76 6f 6b | 65 20 72 65 63 75 72 73 |ll invok|e recurs|
|00001000| 69 76 65 20 69 6e 76 6f | 63 61 74 69 6f 6e 73 0a |ive invo|cations.|
|00001010| 58 6f 66 20 74 68 65 20 | 54 63 6c 20 69 6e 74 65 |Xof the |Tcl inte|
|00001020| 72 70 72 65 74 65 72 20 | 62 79 20 70 61 73 73 69 |rpreter |by passi|
|00001030| 6e 67 20 69 6e 20 61 64 | 64 69 74 69 6f 6e 61 6c |ng in ad|ditional|
|00001040| 20 73 74 72 69 6e 67 73 | 20 74 6f 20 65 78 65 63 | strings| to exec|
|00001050| 75 74 65 0a 58 28 70 72 | 6f 63 65 64 75 72 65 73 |ute.X(pr|ocedures|
|00001060| 2c 20 6c 6f 6f 70 69 6e | 67 20 63 6f 6d 6d 61 6e |, loopin|g comman|
|00001070| 64 73 2c 20 61 6e 64 20 | 63 6f 6e 64 69 74 69 6f |ds, and |conditio|
|00001080| 6e 61 6c 20 63 6f 6d 6d | 61 6e 64 73 20 61 6c 6c |nal comm|ands all|
|00001090| 20 77 6f 72 6b 0a 58 69 | 6e 20 74 68 69 73 20 77 | work.Xi|n this w|
|000010a0| 61 79 29 2e 0a 58 2e 50 | 50 0a 58 41 6e 20 61 70 |ay)..X.P|P.XAn ap|
|000010b0| 70 6c 69 63 61 74 69 6f | 6e 20 70 72 6f 67 72 61 |plicatio|n progra|
|000010c0| 6d 20 67 61 69 6e 73 20 | 74 68 72 65 65 20 61 64 |m gains |three ad|
|000010d0| 76 61 6e 74 61 67 65 73 | 20 62 79 20 75 73 69 6e |vantages| by usin|
|000010e0| 67 20 54 63 6c 20 66 6f | 72 0a 58 69 74 73 20 63 |g Tcl fo|r.Xits c|
|000010f0| 6f 6d 6d 61 6e 64 20 6c | 61 6e 67 75 61 67 65 2e |ommand l|anguage.|
|00001100| 20 20 46 69 72 73 74 2c | 20 54 63 6c 20 70 72 6f | First,| Tcl pro|
|00001110| 76 69 64 65 73 20 61 20 | 73 74 61 6e 64 61 72 64 |vides a |standard|
|00001120| 20 73 79 6e 74 61 78 3a | 20 20 6f 6e 63 65 0a 58 | syntax:| once.X|
|00001130| 75 73 65 72 73 20 6b 6e | 6f 77 20 54 63 6c 2c 20 |users kn|ow Tcl, |
|00001140| 74 68 65 79 20 77 69 6c | 6c 20 62 65 20 61 62 6c |they wil|l be abl|
|00001150| 65 20 74 6f 20 69 73 73 | 75 65 20 63 6f 6d 6d 61 |e to iss|ue comma|
|00001160| 6e 64 73 20 65 61 73 69 | 6c 79 0a 58 74 6f 20 61 |nds easi|ly.Xto a|
|00001170| 6e 79 20 54 63 6c 2d 62 | 61 73 65 64 20 61 70 70 |ny Tcl-b|ased app|
|00001180| 6c 69 63 61 74 69 6f 6e | 2e 20 20 53 65 63 6f 6e |lication|. Secon|
|00001190| 64 2c 20 54 63 6c 20 70 | 72 6f 76 69 64 65 73 20 |d, Tcl p|rovides |
|000011a0| 70 72 6f 67 72 61 6d 6d | 61 62 69 6c 69 74 79 2e |programm|ability.|
|000011b0| 0a 58 41 6c 6c 20 61 20 | 54 63 6c 20 61 70 70 6c |.XAll a |Tcl appl|
|000011c0| 69 63 61 74 69 6f 6e 20 | 6e 65 65 64 73 20 74 6f |ication |needs to|
|000011d0| 20 64 6f 20 69 73 20 74 | 6f 20 69 6d 70 6c 65 6d | do is t|o implem|
|000011e0| 65 6e 74 20 61 20 66 65 | 77 0a 58 61 70 70 6c 69 |ent a fe|w.Xappli|
|000011f0| 63 61 74 69 6f 6e 2d 73 | 70 65 63 69 66 69 63 20 |cation-s|pecific |
|00001200| 6c 6f 77 2d 6c 65 76 65 | 6c 20 63 6f 6d 6d 61 6e |low-leve|l comman|
|00001210| 64 73 2e 20 20 54 63 6c | 20 70 72 6f 76 69 64 65 |ds. Tcl| provide|
|00001220| 73 20 6d 61 6e 79 20 75 | 74 69 6c 69 74 79 0a 58 |s many u|tility.X|
|00001230| 63 6f 6d 6d 61 6e 64 73 | 20 70 6c 75 73 20 61 20 |commands| plus a |
|00001240| 67 65 6e 65 72 61 6c 20 | 70 72 6f 67 72 61 6d 6d |general |programm|
|00001250| 69 6e 67 20 69 6e 74 65 | 72 66 61 63 65 20 66 6f |ing inte|rface fo|
|00001260| 72 20 62 75 69 6c 64 69 | 6e 67 20 75 70 0a 58 63 |r buildi|ng up.Xc|
|00001270| 6f 6d 70 6c 65 78 20 63 | 6f 6d 6d 61 6e 64 20 70 |omplex c|ommand p|
|00001280| 72 6f 63 65 64 75 72 65 | 73 2e 20 20 42 79 20 75 |rocedure|s. By u|
|00001290| 73 69 6e 67 20 54 63 6c | 2c 20 61 70 70 6c 69 63 |sing Tcl|, applic|
|000012a0| 61 74 69 6f 6e 73 20 6e | 65 65 64 20 6e 6f 74 0a |ations n|eed not.|
|000012b0| 58 72 65 2d 69 6d 70 6c | 65 6d 65 6e 74 20 74 68 |Xre-impl|ement th|
|000012c0| 65 73 65 20 66 65 61 74 | 75 72 65 73 2e 20 20 54 |ese feat|ures. T|
|000012d0| 68 69 72 64 2c 20 54 63 | 6c 20 77 69 6c 6c 20 65 |hird, Tc|l will e|
|000012e0| 76 65 6e 74 75 61 6c 6c | 79 20 70 72 6f 76 69 64 |ventuall|y provid|
|000012f0| 65 0a 58 61 20 6d 65 63 | 68 61 6e 69 73 6d 20 66 |e.Xa mec|hanism f|
|00001300| 6f 72 20 63 6f 6d 6d 75 | 6e 69 63 61 74 69 6e 67 |or commu|nicating|
|00001310| 20 62 65 74 77 65 65 6e | 20 61 70 70 6c 69 63 61 | between| applica|
|00001320| 74 69 6f 6e 73 3a 20 20 | 69 74 20 77 69 6c 6c 20 |tions: |it will |
|00001330| 62 65 0a 58 70 6f 73 73 | 69 62 6c 65 20 74 6f 20 |be.Xposs|ible to |
|00001340| 73 65 6e 64 20 54 63 6c | 20 63 6f 6d 6d 61 6e 64 |send Tcl| command|
|00001350| 73 20 66 72 6f 6d 20 6f | 6e 65 20 61 70 70 6c 69 |s from o|ne appli|
|00001360| 63 61 74 69 6f 6e 20 74 | 6f 20 61 6e 6f 74 68 65 |cation t|o anothe|
|00001370| 72 2e 0a 58 54 68 65 20 | 63 6f 6d 6d 6f 6e 20 54 |r..XThe |common T|
|00001380| 63 6c 20 6c 61 6e 67 75 | 61 67 65 20 66 72 61 6d |cl langu|age fram|
|00001390| 65 77 6f 72 6b 20 77 69 | 6c 6c 20 6d 61 6b 65 20 |ework wi|ll make |
|000013a0| 69 74 20 65 61 73 69 65 | 72 20 66 6f 72 20 61 70 |it easie|r for ap|
|000013b0| 70 6c 69 63 61 74 69 6f | 6e 73 0a 58 74 6f 20 63 |plicatio|ns.Xto c|
|000013c0| 6f 6d 6d 75 6e 69 63 61 | 74 65 20 77 69 74 68 20 |ommunica|te with |
|000013d0| 6f 6e 65 20 61 6e 6f 74 | 68 65 72 2e 20 20 54 68 |one anot|her. Th|
|000013e0| 65 20 63 6f 6d 6d 75 6e | 69 63 61 74 69 6f 6e 20 |e commun|ication |
|000013f0| 66 65 61 74 75 72 65 73 | 20 61 72 65 20 6e 6f 74 |features| are not|
|00001400| 0a 58 69 6d 70 6c 65 6d | 65 6e 74 65 64 20 69 6e |.Ximplem|ented in|
|00001410| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 76 65 72 | the cur|rent ver|
|00001420| 73 69 6f 6e 20 6f 66 20 | 54 63 6c 2e 0a 58 2e 50 |sion of |Tcl..X.P|
|00001430| 50 0a 58 54 68 69 73 20 | 6d 61 6e 75 61 6c 20 70 |P.XThis |manual p|
|00001440| 61 67 65 20 66 6f 63 75 | 73 73 65 73 20 70 72 69 |age focu|sses pri|
|00001450| 6d 61 72 69 6c 79 20 6f | 6e 20 74 68 65 20 54 63 |marily o|n the Tc|
|00001460| 6c 20 6c 61 6e 67 75 61 | 67 65 2e 20 20 49 74 20 |l langua|ge. It |
|00001470| 64 65 73 63 72 69 62 65 | 73 0a 58 74 68 65 20 6c |describe|s.Xthe l|
|00001480| 61 6e 67 75 61 67 65 20 | 73 79 6e 74 61 78 20 61 |anguage |syntax a|
|00001490| 6e 64 20 74 68 65 20 62 | 75 69 6c 74 2d 69 6e 20 |nd the b|uilt-in |
|000014a0| 63 6f 6d 6d 61 6e 64 73 | 20 74 68 61 74 20 77 69 |commands| that wi|
|000014b0| 6c 6c 20 62 65 20 61 76 | 61 69 6c 61 62 6c 65 20 |ll be av|ailable |
|000014c0| 69 6e 0a 58 61 6e 79 20 | 61 70 70 6c 69 63 61 74 |in.Xany |applicat|
|000014d0| 69 6f 6e 20 62 61 73 65 | 64 20 6f 6e 20 54 63 6c |ion base|d on Tcl|
|000014e0| 2e 20 20 54 68 65 20 69 | 6e 64 69 76 69 64 75 61 |. The i|ndividua|
|000014f0| 6c 20 6c 69 62 72 61 72 | 79 0a 58 70 72 6f 63 65 |l librar|y.Xproce|
|00001500| 64 75 72 65 73 20 61 72 | 65 20 64 65 73 63 72 69 |dures ar|e descri|
|00001510| 62 65 64 20 69 6e 20 6d | 6f 72 65 20 64 65 74 61 |bed in m|ore deta|
|00001520| 69 6c 20 69 6e 20 73 65 | 70 61 72 61 74 65 20 6d |il in se|parate m|
|00001530| 61 6e 75 61 6c 20 70 61 | 67 65 73 2c 20 6f 6e 65 |anual pa|ges, one|
|00001540| 0a 58 70 65 72 20 70 72 | 6f 63 65 64 75 72 65 2e |.Xper pr|ocedure.|
|00001550| 0a 58 0a 58 2e 53 48 20 | 22 49 4e 54 45 52 50 52 |.X.X.SH |"INTERPR|
|00001560| 45 54 45 52 53 22 0a 58 | 2e 50 50 0a 58 54 68 65 |ETERS".X|.PP.XThe|
|00001570| 20 63 65 6e 74 72 61 6c | 20 64 61 74 61 20 73 74 | central| data st|
|00001580| 72 75 63 74 75 72 65 20 | 69 6e 20 54 63 6c 20 69 |ructure |in Tcl i|
|00001590| 73 20 61 6e 20 69 6e 74 | 65 72 70 72 65 74 65 72 |s an int|erpreter|
|000015a0| 20 28 43 20 74 79 70 65 | 0a 58 60 60 54 63 6c 5f | (C type|.X``Tcl_|
|000015b0| 49 6e 74 65 72 70 27 27 | 29 2e 20 20 41 6e 20 69 |Interp''|). An i|
|000015c0| 6e 74 65 72 70 72 65 74 | 65 72 20 63 6f 6e 73 69 |nterpret|er consi|
|000015d0| 73 74 73 20 6f 66 20 61 | 20 73 65 74 20 6f 66 20 |sts of a| set of |
|000015e0| 63 6f 6d 6d 61 6e 64 0a | 58 62 69 6e 64 69 6e 67 |command.|Xbinding|
|000015f0| 73 2c 20 61 20 73 65 74 | 20 6f 66 20 76 61 72 69 |s, a set| of vari|
|00001600| 61 62 6c 65 20 76 61 6c | 75 65 73 2c 20 61 6e 64 |able val|ues, and|
|00001610| 20 61 20 66 65 77 20 6f | 74 68 65 72 20 6d 69 73 | a few o|ther mis|
|00001620| 63 65 6c 6c 61 6e 65 6f | 75 73 0a 58 70 69 65 63 |cellaneo|us.Xpiec|
|00001630| 65 73 20 6f 66 20 73 74 | 61 74 65 2e 20 20 45 61 |es of st|ate. Ea|
|00001640| 63 68 20 54 63 6c 20 63 | 6f 6d 6d 61 6e 64 20 69 |ch Tcl c|ommand i|
|00001650| 73 20 69 6e 74 65 72 70 | 72 65 74 65 64 20 69 6e |s interp|reted in|
|00001660| 20 74 68 65 20 63 6f 6e | 74 65 78 74 0a 58 6f 66 | the con|text.Xof|
|00001670| 20 61 20 70 61 72 74 69 | 63 75 6c 61 72 20 69 6e | a parti|cular in|
|00001680| 74 65 72 70 72 65 74 65 | 72 2e 0a 58 53 6f 6d 65 |terprete|r..XSome|
|00001690| 20 54 63 6c 2d 62 61 73 | 65 64 20 61 70 70 6c 69 | Tcl-bas|ed appli|
|000016a0| 63 61 74 69 6f 6e 73 20 | 77 69 6c 6c 20 6d 61 69 |cations |will mai|
|000016b0| 6e 74 61 69 6e 0a 58 6d | 75 6c 74 69 70 6c 65 20 |ntain.Xm|ultiple |
|000016c0| 69 6e 74 65 72 70 72 65 | 74 65 72 73 20 73 69 6d |interpre|ters sim|
|000016d0| 75 6c 74 61 6e 65 6f 75 | 73 6c 79 2c 20 65 61 63 |ultaneou|sly, eac|
|000016e0| 68 20 61 73 73 6f 63 69 | 61 74 65 64 20 77 69 74 |h associ|ated wit|
|000016f0| 68 20 61 0a 58 64 69 66 | 66 65 72 65 6e 74 20 77 |h a.Xdif|ferent w|
|00001700| 69 64 67 65 74 20 6f 72 | 20 70 6f 72 74 69 6f 6e |idget or| portion|
|00001710| 20 6f 66 20 74 68 65 20 | 61 70 70 6c 69 63 61 74 | of the |applicat|
|00001720| 69 6f 6e 2e 0a 58 49 6e | 74 65 72 70 72 65 74 65 |ion..XIn|terprete|
|00001730| 72 73 20 61 72 65 20 72 | 65 6c 61 74 69 76 65 6c |rs are r|elativel|
|00001740| 79 20 6c 69 67 68 74 77 | 65 69 67 68 74 20 73 74 |y lightw|eight st|
|00001750| 72 75 63 74 75 72 65 73 | 2e 20 20 54 68 65 79 20 |ructures|. They |
|00001760| 63 61 6e 0a 58 62 65 20 | 63 72 65 61 74 65 64 20 |can.Xbe |created |
|00001770| 61 6e 64 20 64 65 6c 65 | 74 65 64 20 71 75 69 63 |and dele|ted quic|
|00001780| 6b 6c 79 2c 20 73 6f 20 | 61 70 70 6c 69 63 61 74 |kly, so |applicat|
|00001790| 69 6f 6e 20 70 72 6f 67 | 72 61 6d 6d 65 72 73 20 |ion prog|rammers |
|000017a0| 73 68 6f 75 6c 64 20 66 | 65 65 6c 20 66 72 65 65 |should f|eel free|
|000017b0| 20 74 6f 0a 58 75 73 65 | 20 6d 75 6c 74 69 70 6c | to.Xuse| multipl|
|000017c0| 65 20 69 6e 74 65 72 70 | 72 65 74 65 72 73 20 69 |e interp|reters i|
|000017d0| 66 20 74 68 61 74 20 73 | 69 6d 70 6c 69 66 69 65 |f that s|implifie|
|000017e0| 73 20 74 68 65 20 61 70 | 70 6c 69 63 61 74 69 6f |s the ap|plicatio|
|000017f0| 6e 2e 0a 58 45 76 65 6e | 74 75 61 6c 6c 79 20 54 |n..XEven|tually T|
|00001800| 63 6c 20 77 69 6c 6c 20 | 70 72 6f 76 69 64 65 20 |cl will |provide |
|00001810| 61 20 6d 65 63 68 61 6e | 69 73 6d 20 66 6f 72 20 |a mechan|ism for |
|00001820| 73 65 6e 64 69 6e 67 20 | 54 63 6c 20 63 6f 6d 6d |sending |Tcl comm|
|00001830| 61 6e 64 73 0a 58 61 6e | 64 20 72 65 73 75 6c 74 |ands.Xan|d result|
|00001840| 73 20 62 61 63 6b 20 61 | 6e 64 20 66 6f 72 74 68 |s back a|nd forth|
|00001850| 20 62 65 74 77 65 65 6e | 20 69 6e 74 65 72 70 72 | between| interpr|
|00001860| 65 74 65 72 73 2c 20 65 | 76 65 6e 20 69 66 20 74 |eters, e|ven if t|
|00001870| 68 65 0a 58 69 6e 74 65 | 72 70 72 65 74 65 72 73 |he.Xinte|rpreters|
|00001880| 20 61 72 65 20 6d 61 6e | 61 67 65 64 20 62 79 20 | are man|aged by |
|00001890| 64 69 66 66 65 72 65 6e | 74 20 70 72 6f 63 65 73 |differen|t proces|
|000018a0| 73 65 73 2e 0a 58 0a 58 | 2e 53 48 20 22 44 41 54 |ses..X.X|.SH "DAT|
|000018b0| 41 20 54 59 50 45 53 22 | 0a 58 2e 50 50 0a 58 54 |A TYPES"|.X.PP.XT|
|000018c0| 63 6c 20 73 75 70 70 6f | 72 74 73 20 6f 6e 6c 79 |cl suppo|rts only|
|000018d0| 20 6f 6e 65 20 74 79 70 | 65 20 6f 66 20 64 61 74 | one typ|e of dat|
|000018e0| 61 3a 20 20 73 74 72 69 | 6e 67 73 2e 20 20 41 6c |a: stri|ngs. Al|
|000018f0| 6c 20 63 6f 6d 6d 61 6e | 64 73 2c 0a 58 61 6c 6c |l comman|ds,.Xall|
|00001900| 20 61 72 67 75 6d 65 6e | 74 73 20 74 6f 20 63 6f | argumen|ts to co|
|00001910| 6d 6d 61 6e 64 73 2c 20 | 61 6c 6c 20 63 6f 6d 6d |mmands, |all comm|
|00001920| 61 6e 64 20 72 65 73 75 | 6c 74 73 2c 20 61 6e 64 |and resu|lts, and|
|00001930| 20 61 6c 6c 20 76 61 72 | 69 61 62 6c 65 20 76 61 | all var|iable va|
|00001940| 6c 75 65 73 0a 58 61 72 | 65 20 73 74 72 69 6e 67 |lues.Xar|e string|
|00001950| 73 2e 0a 58 57 68 65 72 | 65 20 63 6f 6d 6d 61 6e |s..XWher|e comman|
|00001960| 64 73 20 72 65 71 75 69 | 72 65 20 6e 75 6d 65 72 |ds requi|re numer|
|00001970| 69 63 20 61 72 67 75 6d | 65 6e 74 73 20 6f 72 20 |ic argum|ents or |
|00001980| 72 65 74 75 72 6e 20 6e | 75 6d 65 72 69 63 20 72 |return n|umeric r|
|00001990| 65 73 75 6c 74 73 2c 0a | 58 74 68 65 20 61 72 67 |esults,.|Xthe arg|
|000019a0| 75 6d 65 6e 74 73 20 61 | 6e 64 20 72 65 73 75 6c |uments a|nd resul|
|000019b0| 74 73 20 61 72 65 20 70 | 61 73 73 65 64 20 61 73 |ts are p|assed as|
|000019c0| 20 73 74 72 69 6e 67 73 | 2e 0a 58 4d 61 6e 79 20 | strings|..XMany |
|000019d0| 63 6f 6d 6d 61 6e 64 73 | 20 65 78 70 65 63 74 20 |commands| expect |
|000019e0| 74 68 65 69 72 20 73 74 | 72 69 6e 67 20 61 72 67 |their st|ring arg|
|000019f0| 75 6d 65 6e 74 73 20 74 | 6f 20 68 61 76 65 20 63 |uments t|o have c|
|00001a00| 65 72 74 61 69 6e 20 66 | 6f 72 6d 61 74 73 2c 0a |ertain f|ormats,.|
|00001a10| 58 62 75 74 20 74 68 69 | 73 20 69 6e 74 65 72 70 |Xbut thi|s interp|
|00001a20| 72 65 74 61 74 69 6f 6e | 20 69 73 0a 58 75 70 20 |retation| is.Xup |
|00001a30| 74 6f 20 74 68 65 20 69 | 6e 64 69 76 69 64 75 61 |to the i|ndividua|
|00001a40| 6c 20 63 6f 6d 6d 61 6e | 64 73 2e 20 20 46 6f 72 |l comman|ds. For|
|00001a50| 20 65 78 61 6d 70 6c 65 | 2c 20 61 72 67 75 6d 65 | example|, argume|
|00001a60| 6e 74 73 20 6f 66 74 65 | 6e 20 63 6f 6e 74 61 69 |nts ofte|n contai|
|00001a70| 6e 0a 58 54 63 6c 20 63 | 6f 6d 6d 61 6e 64 20 73 |n.XTcl c|ommand s|
|00001a80| 74 72 69 6e 67 73 2c 20 | 77 68 69 63 68 20 6d 61 |trings, |which ma|
|00001a90| 79 20 67 65 74 20 65 78 | 65 63 75 74 65 64 20 61 |y get ex|ecuted a|
|00001aa0| 73 20 70 61 72 74 20 6f | 66 20 74 68 65 20 63 6f |s part o|f the co|
|00001ab0| 6d 6d 61 6e 64 73 2e 0a | 58 54 68 65 20 65 61 73 |mmands..|XThe eas|
|00001ac0| 69 65 73 74 20 77 61 79 | 20 74 6f 20 75 6e 64 65 |iest way| to unde|
|00001ad0| 72 73 74 61 6e 64 20 74 | 68 65 20 54 63 6c 20 69 |rstand t|he Tcl i|
|00001ae0| 6e 74 65 72 70 72 65 74 | 65 72 20 69 73 20 74 6f |nterpret|er is to|
|00001af0| 20 72 65 6d 65 6d 62 65 | 72 20 74 68 61 74 0a 58 | remembe|r that.X|
|00001b00| 65 76 65 72 79 74 68 69 | 6e 67 20 69 73 20 6a 75 |everythi|ng is ju|
|00001b10| 73 74 20 61 6e 20 6f 70 | 65 72 61 74 69 6f 6e 20 |st an op|eration |
|00001b20| 6f 6e 20 61 20 73 74 72 | 69 6e 67 2e 20 20 49 6e |on a str|ing. In|
|00001b30| 20 6d 61 6e 79 20 63 61 | 73 65 73 20 54 63 6c 20 | many ca|ses Tcl |
|00001b40| 63 6f 6e 73 74 72 75 63 | 74 73 0a 58 77 69 6c 6c |construc|ts.Xwill|
|00001b50| 20 6c 6f 6f 6b 20 73 69 | 6d 69 6c 61 72 20 74 6f | look si|milar to|
|00001b60| 20 6d 6f 72 65 20 73 74 | 72 75 63 74 75 72 65 64 | more st|ructured|
|00001b70| 20 63 6f 6e 73 74 72 75 | 63 74 73 20 66 72 6f 6d | constru|cts from|
|00001b80| 20 6f 74 68 65 72 20 6c | 61 6e 67 75 61 67 65 73 | other l|anguages|
|00001b90| 2e 0a 58 48 6f 77 65 76 | 65 72 2c 20 74 68 65 20 |..XHowev|er, the |
|00001ba0| 54 63 6c 20 63 6f 6e 73 | 74 72 75 63 74 73 0a 58 |Tcl cons|tructs.X|
|00001bb0| 61 72 65 20 6e 6f 74 20 | 73 74 72 75 63 74 75 72 |are not |structur|
|00001bc0| 65 64 20 61 74 20 61 6c | 6c 3b 20 20 74 68 65 79 |ed at al|l; they|
|00001bd0| 20 61 72 65 20 6a 75 73 | 74 20 73 74 72 69 6e 67 | are jus|t string|
|00001be0| 73 20 6f 66 20 63 68 61 | 72 61 63 74 65 72 73 2c |s of cha|racters,|
|00001bf0| 20 61 6e 64 20 74 68 69 | 73 0a 58 67 69 76 65 73 | and thi|s.Xgives|
|00001c00| 20 74 68 65 6d 20 61 20 | 64 69 66 66 65 72 65 6e | them a |differen|
|00001c10| 74 20 62 65 68 61 76 69 | 6f 72 20 74 68 61 6e 20 |t behavi|or than |
|00001c20| 74 68 65 20 73 74 72 75 | 63 74 75 72 65 73 20 74 |the stru|ctures t|
|00001c30| 68 65 79 20 6d 61 79 20 | 6c 6f 6f 6b 20 6c 69 6b |hey may |look lik|
|00001c40| 65 2e 0a 58 2e 50 50 0a | 58 41 6c 74 68 6f 75 67 |e..X.PP.|XAlthoug|
|00001c50| 68 20 74 68 65 20 65 78 | 61 63 74 20 69 6e 74 65 |h the ex|act inte|
|00001c60| 72 70 72 65 74 61 74 69 | 6f 6e 20 6f 66 20 61 20 |rpretati|on of a |
|00001c70| 54 63 6c 20 73 74 72 69 | 6e 67 20 64 65 70 65 6e |Tcl stri|ng depen|
|00001c80| 64 73 20 6f 6e 20 77 68 | 6f 20 69 73 0a 58 64 6f |ds on wh|o is.Xdo|
|00001c90| 69 6e 67 20 74 68 65 20 | 69 6e 74 65 72 70 72 65 |ing the |interpre|
|00001ca0| 74 61 74 69 6f 6e 2c 20 | 74 68 65 72 65 20 61 72 |tation, |there ar|
|00001cb0| 65 20 74 68 72 65 65 20 | 63 6f 6d 6d 6f 6e 20 66 |e three |common f|
|00001cc0| 6f 72 6d 73 20 74 68 61 | 74 20 73 74 72 69 6e 67 |orms tha|t string|
|00001cd0| 73 0a 58 74 61 6b 65 3a | 20 20 63 6f 6d 6d 61 6e |s.Xtake:| comman|
|00001ce0| 64 73 2c 20 65 78 70 72 | 65 73 73 69 6f 6e 73 2c |ds, expr|essions,|
|00001cf0| 20 61 6e 64 20 6c 69 73 | 74 73 2e 20 20 54 68 65 | and lis|ts. The|
|00001d00| 20 6d 61 6a 6f 72 20 73 | 65 63 74 69 6f 6e 73 20 | major s|ections |
|00001d10| 62 65 6c 6f 77 0a 58 64 | 69 73 63 75 73 73 20 74 |below.Xd|iscuss t|
|00001d20| 68 65 73 65 20 74 68 72 | 65 65 20 66 6f 72 6d 73 |hese thr|ee forms|
|00001d30| 20 69 6e 20 6d 6f 72 65 | 20 64 65 74 61 69 6c 2e | in more| detail.|
|00001d40| 0a 58 0a 58 2e 53 48 20 | 22 42 41 53 49 43 20 43 |.X.X.SH |"BASIC C|
|00001d50| 4f 4d 4d 41 4e 44 20 53 | 59 4e 54 41 58 22 0a 58 |OMMAND S|YNTAX".X|
|00001d60| 2e 50 50 0a 58 54 68 65 | 20 54 63 6c 20 6c 61 6e |.PP.XThe| Tcl lan|
|00001d70| 67 75 61 67 65 20 68 61 | 73 20 73 79 6e 74 61 63 |guage ha|s syntac|
|00001d80| 74 69 63 20 73 69 6d 69 | 6c 61 72 69 74 69 65 73 |tic simi|larities|
|00001d90| 20 74 6f 20 62 6f 74 68 | 20 74 68 65 20 55 6e 69 | to both| the Uni|
|00001da0| 78 20 73 68 65 6c 6c 73 | 0a 58 61 6e 64 20 4c 69 |x shells|.Xand Li|
|00001db0| 73 70 2e 20 20 48 6f 77 | 65 76 65 72 2c 20 74 68 |sp. How|ever, th|
|00001dc0| 65 20 69 6e 74 65 72 70 | 72 65 74 61 74 69 6f 6e |e interp|retation|
|00001dd0| 20 6f 66 20 63 6f 6d 6d | 61 6e 64 73 20 69 73 20 | of comm|ands is |
|00001de0| 64 69 66 66 65 72 65 6e | 74 0a 58 69 6e 20 54 63 |differen|t.Xin Tc|
|00001df0| 6c 20 74 68 61 6e 20 69 | 6e 20 65 69 74 68 65 72 |l than i|n either|
|00001e00| 20 6f 66 20 74 68 6f 73 | 65 20 6f 74 68 65 72 20 | of thos|e other |
|00001e10| 74 77 6f 20 73 79 73 74 | 65 6d 73 2e 0a 58 41 20 |two syst|ems..XA |
|00001e20| 54 63 6c 20 63 6f 6d 6d | 61 6e 64 20 73 74 72 69 |Tcl comm|and stri|
|00001e30| 6e 67 20 63 6f 6e 73 69 | 73 74 73 20 6f 66 20 6f |ng consi|sts of o|
|00001e40| 6e 65 20 6f 72 20 6d 6f | 72 65 20 63 6f 6d 6d 61 |ne or mo|re comma|
|00001e50| 6e 64 73 20 73 65 70 61 | 72 61 74 65 64 0a 58 62 |nds sepa|rated.Xb|
|00001e60| 79 20 6e 65 77 6c 69 6e | 65 20 63 68 61 72 61 63 |y newlin|e charac|
|00001e70| 74 65 72 73 20 6f 72 20 | 73 65 6d 69 2d 63 6f 6c |ters or |semi-col|
|00001e80| 6f 6e 73 2e 0a 58 45 61 | 63 68 20 63 6f 6d 6d 61 |ons..XEa|ch comma|
|00001e90| 6e 64 20 63 6f 6e 73 69 | 73 74 73 20 6f 66 20 61 |nd consi|sts of a|
|00001ea0| 20 63 6f 6c 6c 65 63 74 | 69 6f 6e 20 6f 66 20 66 | collect|ion of f|
|00001eb0| 69 65 6c 64 73 20 73 65 | 70 61 72 61 74 65 64 20 |ields se|parated |
|00001ec0| 62 79 0a 58 77 68 69 74 | 65 20 73 70 61 63 65 20 |by.Xwhit|e space |
|00001ed0| 28 73 70 61 63 65 73 20 | 6f 72 20 74 61 62 73 29 |(spaces |or tabs)|
|00001ee0| 2e 0a 58 54 68 65 20 66 | 69 72 73 74 20 66 69 65 |..XThe f|irst fie|
|00001ef0| 6c 64 20 6d 75 73 74 20 | 62 65 20 74 68 65 20 6e |ld must |be the n|
|00001f00| 61 6d 65 20 6f 66 20 61 | 20 63 6f 6d 6d 61 6e 64 |ame of a| command|
|00001f10| 2c 20 61 6e 64 20 74 68 | 65 0a 58 61 64 64 69 74 |, and th|e.Xaddit|
|00001f20| 69 6f 6e 61 6c 20 66 69 | 65 6c 64 73 2c 20 69 66 |ional fi|elds, if|
|00001f30| 20 61 6e 79 2c 20 61 72 | 65 20 61 72 67 75 6d 65 | any, ar|e argume|
|00001f40| 6e 74 73 20 74 68 61 74 | 20 77 69 6c 6c 20 62 65 |nts that| will be|
|00001f50| 20 70 61 73 73 65 64 20 | 74 6f 0a 58 74 68 61 74 | passed |to.Xthat|
|00001f60| 20 63 6f 6d 6d 61 6e 64 | 2e 20 20 46 6f 72 20 65 | command|. For e|
|00001f70| 78 61 6d 70 6c 65 2c 20 | 74 68 65 20 63 6f 6d 6d |xample, |the comm|
|00001f80| 61 6e 64 0a 58 2e 44 53 | 0a 58 5c 66 42 73 65 74 |and.X.DS|.X\fBset|
|00001f90| 20 61 20 32 32 5c 66 52 | 0a 58 2e 44 45 0a 58 68 | a 22\fR|.X.DE.Xh|
|00001fa0| 61 73 20 74 68 72 65 65 | 20 66 69 65 6c 64 73 3a |as three| fields:|
|00001fb0| 20 20 74 68 65 20 66 69 | 72 73 74 2c 20 5c 66 42 | the fi|rst, \fB|
|00001fc0| 73 65 74 5c 66 52 2c 20 | 69 73 20 74 68 65 20 6e |set\fR, |is the n|
|00001fd0| 61 6d 65 20 6f 66 20 61 | 20 54 63 6c 20 63 6f 6d |ame of a| Tcl com|
|00001fe0| 6d 61 6e 64 2c 20 61 6e | 64 0a 58 74 68 65 20 6c |mand, an|d.Xthe l|
|00001ff0| 61 73 74 20 74 77 6f 2c | 20 5c 66 42 61 5c 66 52 |ast two,| \fBa\fR|
|00002000| 20 61 6e 64 20 5c 66 42 | 32 32 5c 66 52 2c 20 77 | and \fB|22\fR, w|
|00002010| 69 6c 6c 20 62 65 20 70 | 61 73 73 65 64 20 61 73 |ill be p|assed as|
|00002020| 20 61 72 67 75 6d 65 6e | 74 73 20 74 6f 0a 58 74 | argumen|ts to.Xt|
|00002030| 68 65 20 5c 66 42 73 65 | 74 5c 66 52 20 63 6f 6d |he \fBse|t\fR com|
|00002040| 6d 61 6e 64 2e 20 20 54 | 68 65 20 63 6f 6d 6d 61 |mand. T|he comma|
|00002050| 6e 64 20 6e 61 6d 65 20 | 6d 61 79 20 72 65 66 65 |nd name |may refe|
|00002060| 72 20 65 69 74 68 65 72 | 20 74 6f 20 61 20 62 75 |r either| to a bu|
|00002070| 69 6c 74 2d 69 6e 0a 58 | 54 63 6c 20 63 6f 6d 6d |ilt-in.X|Tcl comm|
|00002080| 61 6e 64 2c 20 61 6e 20 | 61 70 70 6c 69 63 61 74 |and, an |applicat|
|00002090| 69 6f 6e 2d 73 70 65 63 | 69 66 69 63 20 63 6f 6d |ion-spec|ific com|
|000020a0| 6d 61 6e 64 20 62 6f 75 | 6e 64 20 69 6e 20 77 69 |mand bou|nd in wi|
|000020b0| 74 68 20 74 68 65 20 6c | 69 62 72 61 72 79 0a 58 |th the l|ibrary.X|
|000020c0| 70 72 6f 63 65 64 75 72 | 65 20 5c 66 42 54 63 6c |procedur|e \fBTcl|
|000020d0| 5f 43 72 65 61 74 65 43 | 6f 6d 6d 61 6e 64 5c 66 |_CreateC|ommand\f|
|000020e0| 52 2c 20 6f 72 20 61 20 | 63 6f 6d 6d 61 6e 64 20 |R, or a |command |
|000020f0| 70 72 6f 63 65 64 75 72 | 65 20 64 65 66 69 6e 65 |procedur|e define|
|00002100| 64 20 77 69 74 68 20 74 | 68 65 0a 58 5c 66 42 70 |d with t|he.X\fBp|
|00002110| 72 6f 63 5c 66 52 20 62 | 75 69 6c 74 2d 69 6e 20 |roc\fR b|uilt-in |
|00002120| 63 6f 6d 6d 61 6e 64 2e | 0a 58 41 72 67 75 6d 65 |command.|.XArgume|
|00002130| 6e 74 73 20 61 72 65 20 | 70 61 73 73 65 64 20 6c |nts are |passed l|
|00002140| 69 74 65 72 61 6c 6c 79 | 20 61 73 0a 58 74 65 78 |iterally| as.Xtex|
|00002150| 74 20 73 74 72 69 6e 67 | 73 2e 20 20 49 6e 64 69 |t string|s. Indi|
|00002160| 76 69 64 75 61 6c 20 63 | 6f 6d 6d 61 6e 64 73 20 |vidual c|ommands |
|00002170| 6d 61 79 20 69 6e 74 65 | 72 70 72 65 74 20 74 68 |may inte|rpret th|
|00002180| 6f 73 65 20 73 74 72 69 | 6e 67 73 20 69 6e 20 61 |ose stri|ngs in a|
|00002190| 6e 79 0a 58 66 61 73 68 | 69 6f 6e 20 74 68 65 79 |ny.Xfash|ion they|
|000021a0| 20 77 69 73 68 2e 20 20 | 54 68 65 20 5c 66 42 73 | wish. |The \fBs|
|000021b0| 65 74 5c 66 52 20 63 6f | 6d 6d 61 6e 64 2c 20 66 |et\fR co|mmand, f|
|000021c0| 6f 72 20 65 78 61 6d 70 | 6c 65 2c 20 77 69 6c 6c |or examp|le, will|
|000021d0| 20 74 72 65 61 74 20 69 | 74 73 0a 58 66 69 72 73 | treat i|ts.Xfirs|
|000021e0| 74 20 61 72 67 75 6d 65 | 6e 74 20 61 73 20 74 68 |t argume|nt as th|
|000021f0| 65 20 6e 61 6d 65 20 6f | 66 20 61 20 76 61 72 69 |e name o|f a vari|
|00002200| 61 62 6c 65 20 61 6e 64 | 20 69 74 73 20 73 65 63 |able and| its sec|
|00002210| 6f 6e 64 20 61 72 67 75 | 6d 65 6e 74 20 61 73 20 |ond argu|ment as |
|00002220| 61 0a 58 73 74 72 69 6e | 67 20 76 61 6c 75 65 20 |a.Xstrin|g value |
|00002230| 74 6f 20 61 73 73 69 67 | 6e 20 74 6f 20 74 68 61 |to assig|n to tha|
|00002240| 74 20 76 61 72 69 61 62 | 6c 65 2e 20 20 46 6f 72 |t variab|le. For|
|00002250| 20 6f 74 68 65 72 20 63 | 6f 6d 6d 61 6e 64 73 20 | other c|ommands |
|00002260| 61 72 67 75 6d 65 6e 74 | 73 0a 58 6d 61 79 20 62 |argument|s.Xmay b|
|00002270| 65 20 69 6e 74 65 72 70 | 72 65 74 65 64 20 61 73 |e interp|reted as|
|00002280| 20 69 6e 74 65 67 65 72 | 73 2c 20 6c 69 73 74 73 | integer|s, lists|
|00002290| 2c 20 66 69 6c 65 20 6e | 61 6d 65 73 2c 20 6f 72 |, file n|ames, or|
|000022a0| 20 54 63 6c 20 63 6f 6d | 6d 61 6e 64 73 2e 0a 58 | Tcl com|mands..X|
|000022b0| 2e 50 50 0a 58 43 6f 6d | 6d 61 6e 64 20 6e 61 6d |.PP.XCom|mand nam|
|000022c0| 65 73 20 6d 61 79 20 62 | 65 20 61 62 62 72 65 76 |es may b|e abbrev|
|000022d0| 69 61 74 65 64 20 61 73 | 20 6c 6f 6e 67 20 61 73 |iated as| long as|
|000022e0| 20 74 68 65 20 61 62 62 | 72 65 76 69 61 74 69 6f | the abb|reviatio|
|000022f0| 6e 20 69 73 20 75 6e 69 | 71 75 65 2e 0a 58 48 6f |n is uni|que..XHo|
|00002300| 77 65 76 65 72 2c 20 69 | 74 27 73 20 70 72 6f 62 |wever, i|t's prob|
|00002310| 61 62 6c 79 20 61 20 62 | 61 64 20 69 64 65 61 20 |ably a b|ad idea |
|00002320| 74 6f 20 75 73 65 20 61 | 62 62 72 65 76 69 61 74 |to use a|bbreviat|
|00002330| 69 6f 6e 73 20 69 6e 20 | 63 6f 6d 6d 61 6e 64 20 |ions in |command |
|00002340| 73 63 72 69 70 74 73 0a | 58 61 6e 64 20 6f 74 68 |scripts.|Xand oth|
|00002350| 65 72 20 66 6f 72 6d 73 | 20 74 68 61 74 20 77 69 |er forms| that wi|
|00002360| 6c 6c 20 62 65 20 72 65 | 2d 75 73 65 64 20 6f 76 |ll be re|-used ov|
|00002370| 65 72 20 74 69 6d 65 3a | 20 20 63 68 61 6e 67 65 |er time:| change|
|00002380| 73 20 74 6f 20 74 68 65 | 20 63 6f 6d 6d 61 6e 64 |s to the| command|
|00002390| 0a 58 73 65 74 20 6d 61 | 79 20 63 61 75 73 65 20 |.Xset ma|y cause |
|000023a0| 61 62 62 72 65 76 69 61 | 74 69 6f 6e 73 20 74 6f |abbrevia|tions to|
|000023b0| 20 62 65 63 6f 6d 65 20 | 61 6d 62 69 67 75 6f 75 | become |ambiguou|
|000023c0| 73 2c 20 72 65 73 75 6c | 74 69 6e 67 20 69 6e 20 |s, resul|ting in |
|000023d0| 73 63 72 69 70 74 73 0a | 58 74 68 61 74 20 6e 6f |scripts.|Xthat no|
|000023e0| 20 6c 6f 6e 67 65 72 20 | 77 6f 72 6b 2e 20 20 41 | longer |work. A|
|000023f0| 62 62 72 65 76 69 61 74 | 69 6f 6e 73 20 61 72 65 |bbreviat|ions are|
|00002400| 20 69 6e 74 65 6e 64 65 | 64 20 70 72 69 6d 61 72 | intende|d primar|
|00002410| 69 6c 79 20 66 6f 72 0a | 58 63 6f 6d 6d 61 6e 64 |ily for.|Xcommand|
|00002420| 73 20 74 68 61 74 20 61 | 72 65 20 74 79 70 65 64 |s that a|re typed|
|00002430| 20 69 6e 74 65 72 61 63 | 74 69 76 65 6c 79 2c 20 | interac|tively, |
|00002440| 69 6e 76 6f 6b 65 64 20 | 6f 6e 63 65 2c 20 61 6e |invoked |once, an|
|00002450| 64 20 64 69 73 63 61 72 | 64 65 64 2e 0a 58 0a 58 |d discar|ded..X.X|
|00002460| 2e 53 48 20 22 43 4f 4d | 4d 45 4e 54 53 22 0a 58 |.SH "COM|MENTS".X|
|00002470| 2e 50 50 0a 58 49 66 20 | 74 68 65 20 66 69 72 73 |.PP.XIf |the firs|
|00002480| 74 20 6e 6f 6e 2d 62 6c | 61 6e 6b 20 63 68 61 72 |t non-bl|ank char|
|00002490| 61 63 74 65 72 20 69 6e | 20 61 20 63 6f 6d 6d 61 |acter in| a comma|
|000024a0| 6e 64 20 69 73 20 5c 66 | 42 23 5c 66 52 2c 20 74 |nd is \f|B#\fR, t|
|000024b0| 68 65 6e 20 65 76 65 72 | 79 74 68 69 6e 67 0a 58 |hen ever|ything.X|
|000024c0| 66 72 6f 6d 20 74 68 65 | 20 5c 66 42 23 5c 66 52 |from the| \fB#\fR|
|000024d0| 20 75 70 20 74 68 72 6f | 75 67 68 20 74 68 65 20 | up thro|ugh the |
|000024e0| 6e 65 78 74 20 6e 65 77 | 6c 69 6e 65 20 63 68 61 |next new|line cha|
|000024f0| 72 61 63 74 65 72 20 69 | 73 20 74 72 65 61 74 65 |racter i|s treate|
|00002500| 64 20 61 73 0a 58 61 20 | 63 6f 6d 6d 65 6e 74 20 |d as.Xa |comment |
|00002510| 61 6e 64 20 69 67 6e 6f | 72 65 64 2e 0a 58 0a 58 |and igno|red..X.X|
|00002520| 2e 53 48 20 22 47 52 4f | 55 50 49 4e 47 20 41 52 |.SH "GRO|UPING AR|
|00002530| 47 55 4d 45 4e 54 53 20 | 57 49 54 48 20 42 52 41 |GUMENTS |WITH BRA|
|00002540| 43 45 53 22 0a 58 2e 50 | 50 0a 58 4e 6f 72 6d 61 |CES".X.P|P.XNorma|
|00002550| 6c 6c 79 20 65 61 63 68 | 20 61 72 67 75 6d 65 6e |lly each| argumen|
|00002560| 74 20 66 69 65 6c 64 20 | 65 6e 64 73 20 61 74 20 |t field |ends at |
|00002570| 74 68 65 20 6e 65 78 74 | 20 77 68 69 74 65 20 73 |the next| white s|
|00002580| 70 61 63 65 2c 20 62 75 | 74 0a 58 63 75 72 6c 79 |pace, bu|t.Xcurly|
|00002590| 20 62 72 61 63 65 73 20 | 28 60 60 7b 27 27 20 61 | braces |(``{'' a|
|000025a0| 6e 64 20 60 60 7d 27 27 | 29 20 6d 61 79 0a 58 62 |nd ``}''|) may.Xb|
|000025b0| 65 20 75 73 65 64 20 74 | 6f 20 67 72 6f 75 70 20 |e used t|o group |
|000025c0| 61 72 67 75 6d 65 6e 74 | 73 20 69 6e 20 64 69 66 |argument|s in dif|
|000025d0| 66 65 72 65 6e 74 20 77 | 61 79 73 2e 20 20 49 66 |ferent w|ays. If|
|000025e0| 20 61 6e 20 61 72 67 75 | 6d 65 6e 74 0a 58 66 69 | an argu|ment.Xfi|
|000025f0| 65 6c 64 20 62 65 67 69 | 6e 73 20 77 69 74 68 20 |eld begi|ns with |
|00002600| 61 20 6c 65 66 74 20 62 | 72 61 63 65 2c 20 74 68 |a left b|race, th|
|00002610| 65 6e 20 74 68 65 20 61 | 72 67 75 6d 65 6e 74 20 |en the a|rgument |
|00002620| 69 73 6e 27 74 0a 58 74 | 65 72 6d 69 6e 61 74 65 |isn't.Xt|erminate|
|00002630| 64 20 62 79 20 77 68 69 | 74 65 20 73 70 61 63 65 |d by whi|te space|
|00002640| 3b 20 20 69 6e 73 74 65 | 61 64 20 69 74 20 65 6e |; inste|ad it en|
|00002650| 64 73 20 61 74 20 74 68 | 65 20 6d 61 74 63 68 69 |ds at th|e matchi|
|00002660| 6e 67 0a 58 72 69 67 68 | 74 20 62 72 61 63 65 2e |ng.Xrigh|t brace.|
|00002670| 20 20 54 63 6c 20 77 69 | 6c 6c 20 73 74 72 69 70 | Tcl wi|ll strip|
|00002680| 20 6f 66 66 20 74 68 65 | 20 6f 75 74 65 72 6d 6f | off the| outermo|
|00002690| 73 74 20 6c 61 79 65 72 | 20 6f 66 20 62 72 61 63 |st layer| of brac|
|000026a0| 65 73 0a 58 62 65 66 6f | 72 65 20 70 61 73 73 69 |es.Xbefo|re passi|
|000026b0| 6e 67 20 74 68 65 20 61 | 72 67 75 6d 65 6e 74 20 |ng the a|rgument |
|000026c0| 74 6f 20 74 68 65 20 63 | 6f 6d 6d 61 6e 64 2e 20 |to the c|ommand. |
|000026d0| 20 54 68 69 73 20 70 72 | 6f 76 69 64 65 73 20 61 | This pr|ovides a|
|000026e0| 20 73 69 6d 70 6c 65 20 | 6d 65 63 68 61 6e 69 73 | simple |mechanis|
|000026f0| 6d 0a 58 66 6f 72 20 69 | 6e 63 6c 75 64 69 6e 67 |m.Xfor i|ncluding|
|00002700| 20 77 68 69 74 65 20 73 | 70 61 63 65 20 69 6e 20 | white s|pace in |
|00002710| 61 72 67 75 6d 65 6e 74 | 73 2e 20 20 46 6f 72 20 |argument|s. For |
|00002720| 65 78 61 6d 70 6c 65 2c | 20 74 68 65 0a 58 63 6f |example,| the.Xco|
|00002730| 6d 6d 61 6e 64 0a 58 2e | 44 53 0a 58 5c 66 42 73 |mmand.X.|DS.X\fBs|
|00002740| 65 74 20 61 20 7b 54 68 | 69 73 20 69 73 20 61 20 |et a {Th|is is a |
|00002750| 73 69 6e 67 6c 65 20 61 | 72 67 75 6d 65 6e 74 7d |single a|rgument}|
|00002760| 5c 66 52 0a 58 2e 44 45 | 0a 58 77 69 6c 6c 20 70 |\fR.X.DE|.Xwill p|
|00002770| 61 73 73 20 74 77 6f 20 | 61 72 67 75 6d 65 6e 74 |ass two |argument|
|00002780| 73 20 74 6f 20 5c 66 42 | 73 65 74 5c 66 52 3a 20 |s to \fB|set\fR: |
|00002790| 20 5c 66 42 61 5c 66 52 | 20 61 6e 64 0a 58 5c 66 | \fBa\fR| and.X\f|
|000027a0| 42 54 68 69 73 20 69 73 | 20 61 20 73 69 6e 67 6c |BThis is| a singl|
|000027b0| 65 20 61 72 67 75 6d 65 | 6e 74 5c 66 52 2e 20 20 |e argume|nt\fR. |
|000027c0| 49 6e 20 74 68 65 20 63 | 6f 6d 6d 61 6e 64 0a 58 |In the c|ommand.X|
|000027d0| 2e 44 53 0a 58 5c 66 42 | 73 65 74 20 61 20 7b 78 |.DS.X\fB|set a {x|
|000027e0| 79 7a 20 61 20 7b 62 20 | 63 20 64 7d 7d 5c 66 52 |yz a {b |c d}}\fR|
|000027f0| 0a 58 2e 44 45 0a 58 74 | 68 65 20 5c 66 42 73 65 |.X.DE.Xt|he \fBse|
|00002800| 74 5c 66 52 20 63 6f 6d | 6d 61 6e 64 20 77 69 6c |t\fR com|mand wil|
|00002810| 6c 20 72 65 63 65 69 76 | 65 20 74 77 6f 20 61 72 |l receiv|e two ar|
|00002820| 67 75 6d 65 6e 74 73 3a | 20 5c 66 42 61 5c 66 52 |guments:| \fBa\fR|
|00002830| 0a 58 61 6e 64 20 5c 66 | 42 78 79 7a 20 61 20 7b |.Xand \f|Bxyz a {|
|00002840| 62 20 63 20 64 7d 5c 66 | 52 2e 0a 58 2e 50 50 0a |b c d}\f|R..X.PP.|
|00002850| 58 57 68 65 6e 20 62 72 | 61 63 65 73 20 61 72 65 |XWhen br|aces are|
|00002860| 20 69 6e 20 65 66 66 65 | 63 74 2c 20 74 68 65 20 | in effe|ct, the |
|00002870| 6d 61 74 63 68 69 6e 67 | 20 62 72 61 63 65 20 6e |matching| brace n|
|00002880| 65 65 64 20 6e 6f 74 20 | 62 65 20 6f 6e 0a 58 74 |eed not |be on.Xt|
|00002890| 68 65 20 73 61 6d 65 20 | 6c 69 6e 65 20 61 73 20 |he same |line as |
|000028a0| 74 68 65 20 73 74 61 72 | 74 69 6e 67 20 71 75 6f |the star|ting quo|
|000028b0| 74 65 20 6f 72 20 62 72 | 61 63 65 3b 20 20 69 6e |te or br|ace; in|
|000028c0| 20 74 68 69 73 20 63 61 | 73 65 0a 58 74 68 65 20 | this ca|se.Xthe |
|000028d0| 6e 65 77 6c 69 6e 65 20 | 77 69 6c 6c 20 62 65 0a |newline |will be.|
|000028e0| 58 69 6e 63 6c 75 64 65 | 64 20 69 6e 20 74 68 65 |Xinclude|d in the|
|000028f0| 20 61 72 67 75 6d 65 6e | 74 20 66 69 65 6c 64 20 | argumen|t field |
|00002900| 61 6c 6f 6e 67 20 77 69 | 74 68 20 61 6e 79 20 6f |along wi|th any o|
|00002910| 74 68 65 72 20 63 68 61 | 72 61 63 74 65 72 73 20 |ther cha|racters |
|00002920| 75 70 20 74 6f 20 74 68 | 65 0a 58 6d 61 74 63 68 |up to th|e.Xmatch|
|00002930| 69 6e 67 20 71 75 6f 74 | 65 20 6f 72 20 62 72 61 |ing quot|e or bra|
|00002940| 63 65 2e 20 20 46 6f 72 | 20 65 78 61 6d 70 6c 65 |ce. For| example|
|00002950| 2c 20 74 68 65 20 5c 66 | 42 65 76 61 6c 5c 66 52 |, the \f|Beval\fR|
|00002960| 20 63 6f 6d 6d 61 6e 64 | 0a 58 74 61 6b 65 73 20 | command|.Xtakes |
|00002970| 6f 6e 65 0a 58 61 72 67 | 75 6d 65 6e 74 2c 20 77 |one.Xarg|ument, w|
|00002980| 68 69 63 68 20 69 73 20 | 61 20 63 6f 6d 6d 61 6e |hich is |a comman|
|00002990| 64 20 73 74 72 69 6e 67 | 3b 20 20 5c 66 42 65 76 |d string|; \fBev|
|000029a0| 61 6c 5c 66 52 20 69 6e | 76 6f 6b 65 73 20 74 68 |al\fR in|vokes th|
|000029b0| 65 20 54 63 6c 0a 58 69 | 6e 74 65 72 70 72 65 74 |e Tcl.Xi|nterpret|
|000029c0| 65 72 20 74 6f 20 65 78 | 65 63 75 74 65 20 74 68 |er to ex|ecute th|
|000029d0| 65 20 63 6f 6d 6d 61 6e | 64 20 73 74 72 69 6e 67 |e comman|d string|
|000029e0| 2e 20 20 54 68 65 20 63 | 6f 6d 6d 61 6e 64 0a 58 |. The c|ommand.X|
|000029f0| 2e 44 53 0a 58 5c 66 42 | 65 76 61 6c 20 7b 0a 58 |.DS.X\fB|eval {.X|
|00002a00| 09 73 65 74 20 61 20 32 | 32 0a 58 09 73 65 74 20 |.set a 2|2.X.set |
|00002a10| 62 20 33 33 0a 58 7d 5c | 66 52 0a 58 2e 44 45 0a |b 33.X}\|fR.X.DE.|
|00002a20| 58 77 69 6c 6c 20 61 73 | 73 69 67 6e 20 74 68 65 |Xwill as|sign the|
|00002a30| 20 76 61 6c 75 65 20 5c | 66 42 32 32 5c 66 52 20 | value \|fB22\fR |
|00002a40| 74 6f 20 5c 66 42 61 5c | 66 52 20 61 6e 64 20 5c |to \fBa\|fR and \|
|00002a50| 66 42 33 33 5c 66 52 20 | 74 6f 20 5c 66 42 62 5c |fB33\fR |to \fBb\|
|00002a60| 66 52 2e 0a 58 2e 50 50 | 0a 58 57 68 65 6e 20 61 |fR..X.PP|.XWhen a|
|00002a70| 6e 20 61 72 67 75 6d 65 | 6e 74 20 69 73 20 69 6e |n argume|nt is in|
|00002a80| 20 62 72 61 63 65 73 2c | 20 74 68 65 6e 20 63 6f | braces,| then co|
|00002a90| 6d 6d 61 6e 64 2c 20 76 | 61 72 69 61 62 6c 65 2c |mmand, v|ariable,|
|00002aa0| 0a 58 61 6e 64 20 62 61 | 63 6b 73 6c 61 73 68 0a |.Xand ba|ckslash.|
|00002ab0| 58 73 75 62 73 74 69 74 | 75 74 69 6f 6e 73 20 64 |Xsubstit|utions d|
|00002ac0| 6f 20 6e 6f 74 20 6f 63 | 63 75 72 20 61 73 20 64 |o not oc|cur as d|
|00002ad0| 65 73 63 72 69 62 65 64 | 20 62 65 6c 6f 77 3b 20 |escribed| below; |
|00002ae0| 20 61 6c 6c 20 54 63 6c | 20 64 6f 65 73 20 69 73 | all Tcl| does is|
|00002af0| 20 74 6f 0a 58 73 74 72 | 69 70 20 6f 66 66 20 74 | to.Xstr|ip off t|
|00002b00| 68 65 20 6f 75 74 65 72 | 20 6c 61 79 65 72 20 6f |he outer| layer o|
|00002b10| 66 20 62 72 61 63 65 73 | 20 61 6e 64 20 70 61 73 |f braces| and pas|
|00002b20| 73 20 74 68 65 0a 58 63 | 6f 6e 74 65 6e 74 73 20 |s the.Xc|ontents |
|00002b30| 74 6f 20 74 68 65 20 63 | 6f 6d 6d 61 6e 64 2e 0a |to the c|ommand..|
|00002b40| 58 2e 50 50 0a 58 49 66 | 20 74 68 65 20 66 69 72 |X.PP.XIf| the fir|
|00002b50| 73 74 20 63 68 61 72 61 | 63 74 65 72 20 6f 66 20 |st chara|cter of |
|00002b60| 61 20 63 6f 6d 6d 61 6e | 64 20 66 69 65 6c 64 20 |a comman|d field |
|00002b70| 69 73 6e 27 74 20 61 20 | 6c 65 66 74 0a 58 62 72 |isn't a |left.Xbr|
|00002b80| 61 63 65 2c 20 74 68 65 | 6e 20 6e 65 69 74 68 65 |ace, the|n neithe|
|00002b90| 72 20 6c 65 66 74 20 6e | 6f 72 20 72 69 67 68 74 |r left n|or right|
|00002ba0| 0a 58 62 72 61 63 65 73 | 20 69 6e 20 74 68 65 20 |.Xbraces| in the |
|00002bb0| 66 69 65 6c 64 20 77 69 | 6c 6c 20 62 65 20 74 72 |field wi|ll be tr|
|00002bc0| 65 61 74 65 64 20 73 70 | 65 63 69 61 6c 6c 79 20 |eated sp|ecially |
|00002bd0| 28 65 78 63 65 70 74 20 | 61 73 20 70 61 72 74 20 |(except |as part |
|00002be0| 6f 66 0a 58 76 61 72 69 | 61 62 6c 65 20 73 75 62 |of.Xvari|able sub|
|00002bf0| 73 74 69 74 75 74 69 6f | 6e 3b 20 20 73 65 65 20 |stitutio|n; see |
|00002c00| 62 65 6c 6f 77 29 2e 0a | 58 0a 58 2e 53 48 20 22 |below)..|X.X.SH "|
|00002c10| 43 4f 4d 4d 41 4e 44 20 | 53 55 42 53 54 49 54 55 |COMMAND |SUBSTITU|
|00002c20| 54 49 4f 4e 20 57 49 54 | 48 20 42 52 41 43 4b 45 |TION WIT|H BRACKE|
|00002c30| 54 53 22 0a 58 2e 50 50 | 0a 58 49 66 20 61 6e 20 |TS".X.PP|.XIf an |
|00002c40| 6f 70 65 6e 20 62 72 61 | 63 6b 65 74 20 6f 63 63 |open bra|cket occ|
|00002c50| 75 72 73 20 69 6e 20 61 | 6e 79 20 6f 66 20 74 68 |urs in a|ny of th|
|00002c60| 65 20 66 69 65 6c 64 73 | 20 6f 66 20 61 20 63 6f |e fields| of a co|
|00002c70| 6d 6d 61 6e 64 2c 20 74 | 68 65 6e 0a 58 63 6f 6d |mmand, t|hen.Xcom|
|00002c80| 6d 61 6e 64 20 73 75 62 | 73 74 69 74 75 74 69 6f |mand sub|stitutio|
|00002c90| 6e 20 6f 63 63 75 72 73 | 2e 20 20 41 6c 6c 20 6f |n occurs|. All o|
|00002ca0| 66 20 74 68 65 20 74 65 | 78 74 20 75 70 20 74 6f |f the te|xt up to|
|00002cb0| 20 74 68 65 20 6d 61 74 | 63 68 69 6e 67 0a 58 63 | the mat|ching.Xc|
|00002cc0| 6c 6f 73 65 20 62 72 61 | 63 6b 65 74 20 69 73 20 |lose bra|cket is |
|00002cd0| 74 72 65 61 74 65 64 20 | 61 73 20 61 20 54 63 6c |treated |as a Tcl|
|00002ce0| 20 63 6f 6d 6d 61 6e 64 | 20 61 6e 64 20 65 78 65 | command| and exe|
|00002cf0| 63 75 74 65 64 20 69 6d | 6d 65 64 69 61 74 65 6c |cuted im|mediatel|
|00002d00| 79 2e 0a 58 54 68 65 6e | 20 74 68 65 20 72 65 73 |y..XThen| the res|
|00002d10| 75 6c 74 20 6f 66 20 74 | 68 61 74 20 63 6f 6d 6d |ult of t|hat comm|
|00002d20| 61 6e 64 20 69 73 20 73 | 75 62 73 74 69 74 75 74 |and is s|ubstitut|
|00002d30| 65 64 20 66 6f 72 20 74 | 68 65 20 62 72 61 63 6b |ed for t|he brack|
|00002d40| 65 74 65 64 0a 58 74 65 | 78 74 2e 20 20 46 6f 72 |eted.Xte|xt. For|
|00002d50| 20 65 78 61 6d 70 6c 65 | 2c 20 63 6f 6e 73 69 64 | example|, consid|
|00002d60| 65 72 20 74 68 65 20 63 | 6f 6d 6d 61 6e 64 0a 58 |er the c|ommand.X|
|00002d70| 2e 44 53 0a 58 5c 66 42 | 73 65 74 20 61 20 5b 73 |.DS.X\fB|set a [s|
|00002d80| 65 74 20 62 5d 5c 66 52 | 0a 58 2e 44 45 0a 58 57 |et b]\fR|.X.DE.XW|
|00002d90| 68 65 6e 20 74 68 65 20 | 5c 66 42 73 65 74 5c 66 |hen the |\fBset\f|
|00002da0| 52 20 63 6f 6d 6d 61 6e | 64 20 68 61 73 20 6f 6e |R comman|d has on|
|00002db0| 6c 79 20 61 20 73 69 6e | 67 6c 65 20 61 72 67 75 |ly a sin|gle argu|
|00002dc0| 6d 65 6e 74 2c 20 69 74 | 20 69 73 20 74 68 65 0a |ment, it| is the.|
|00002dd0| 58 6e 61 6d 65 20 6f 66 | 20 61 20 76 61 72 69 61 |Xname of| a varia|
|00002de0| 62 6c 65 20 61 6e 64 20 | 5c 66 42 73 65 74 5c 66 |ble and |\fBset\f|
|00002df0| 52 20 72 65 74 75 72 6e | 73 20 74 68 65 20 63 6f |R return|s the co|
|00002e00| 6e 74 65 6e 74 73 20 6f | 66 20 74 68 61 74 0a 58 |ntents o|f that.X|
|00002e10| 76 61 72 69 61 62 6c 65 | 2e 20 20 49 6e 20 74 68 |variable|. In th|
|00002e20| 69 73 20 63 61 73 65 2c | 20 69 66 20 76 61 72 69 |is case,| if vari|
|00002e30| 61 62 6c 65 20 5c 66 42 | 62 5c 66 52 20 68 61 73 |able \fB|b\fR has|
|00002e40| 20 74 68 65 20 76 61 6c | 75 65 20 5c 66 42 66 6f | the val|ue \fBfo|
|00002e50| 6f 5c 66 52 2c 0a 58 74 | 68 65 6e 20 74 68 65 20 |o\fR,.Xt|hen the |
|00002e60| 63 6f 6d 6d 61 6e 64 20 | 61 62 6f 76 65 20 69 73 |command |above is|
|00002e70| 20 65 71 75 69 76 61 6c | 65 6e 74 20 74 6f 20 74 | equival|ent to t|
|00002e80| 68 65 20 63 6f 6d 6d 61 | 6e 64 0a 58 2e 44 53 0a |he comma|nd.X.DS.|
|00002e90| 58 5c 66 42 73 65 74 20 | 61 20 66 6f 6f 5c 66 52 |X\fBset |a foo\fR|
|00002ea0| 0a 58 2e 44 45 0a 58 42 | 72 61 63 6b 65 74 73 20 |.X.DE.XB|rackets |
|00002eb0| 63 61 6e 20 62 65 20 75 | 73 65 64 20 69 6e 20 6d |can be u|sed in m|
|00002ec0| 6f 72 65 20 63 6f 6d 70 | 6c 65 78 20 77 61 79 73 |ore comp|lex ways|
|00002ed0| 2e 20 20 46 6f 72 20 65 | 78 61 6d 70 6c 65 2c 20 |. For e|xample, |
|00002ee0| 69 66 20 74 68 65 0a 58 | 76 61 72 69 61 62 6c 65 |if the.X|variable|
|00002ef0| 20 5c 66 42 62 5c 66 52 | 20 68 61 73 20 74 68 65 | \fBb\fR| has the|
|00002f00| 20 76 61 6c 75 65 20 5c | 66 42 66 6f 6f 5c 66 52 | value \|fBfoo\fR|
|00002f10| 20 61 6e 64 20 74 68 65 | 20 76 61 72 69 61 62 6c | and the| variabl|
|00002f20| 65 20 5c 66 42 63 5c 66 | 52 0a 58 68 61 73 20 74 |e \fBc\f|R.Xhas t|
|00002f30| 68 65 20 76 61 6c 75 65 | 20 5c 66 42 67 6f 72 70 |he value| \fBgorp|
|00002f40| 5c 66 52 2c 20 74 68 65 | 6e 20 74 68 65 20 63 6f |\fR, the|n the co|
|00002f50| 6d 6d 61 6e 64 0a 58 2e | 44 53 0a 58 5c 66 42 73 |mmand.X.|DS.X\fBs|
|00002f60| 65 74 20 61 20 78 79 7a | 5b 73 65 74 20 62 5d 2e |et a xyz|[set b].|
|00002f70| 5b 73 65 74 20 63 5d 5c | 66 52 0a 58 2e 44 45 0a |[set c]\|fR.X.DE.|
|00002f80| 58 69 73 20 65 71 75 69 | 76 61 6c 65 6e 74 20 74 |Xis equi|valent t|
|00002f90| 6f 20 74 68 65 20 63 6f | 6d 6d 61 6e 64 0a 58 2e |o the co|mmand.X.|
|00002fa0| 44 53 0a 58 5c 66 42 73 | 65 74 20 61 20 78 79 7a |DS.X\fBs|et a xyz|
|00002fb0| 66 6f 6f 2e 67 6f 72 70 | 5c 66 52 0a 58 2e 44 45 |foo.gorp|\fR.X.DE|
|00002fc0| 0a 58 41 20 62 72 61 63 | 6b 65 74 65 64 20 63 6f |.XA brac|keted co|
|00002fd0| 6d 6d 61 6e 64 20 6e 65 | 65 64 20 6e 6f 74 20 62 |mmand ne|ed not b|
|00002fe0| 65 20 61 6c 6c 20 6f 6e | 20 6f 6e 65 20 6c 69 6e |e all on| one lin|
|00002ff0| 65 3a 20 20 6e 65 77 6c | 69 6e 65 73 20 77 69 74 |e: newl|ines wit|
|00003000| 68 69 6e 0a 58 62 72 61 | 63 6b 65 74 73 20 61 72 |hin.Xbra|ckets ar|
|00003010| 65 20 74 72 65 61 74 65 | 64 20 61 73 20 61 72 67 |e treate|d as arg|
|00003020| 75 6d 65 6e 74 20 73 65 | 70 61 72 61 74 6f 72 73 |ument se|parators|
|00003030| 2c 20 6e 6f 74 20 63 6f | 6d 6d 61 6e 64 20 73 65 |, not co|mmand se|
|00003040| 70 61 72 61 74 6f 72 73 | 2e 0a 58 49 66 20 61 20 |parators|..XIf a |
|00003050| 66 69 65 6c 64 20 69 73 | 20 65 6e 63 6c 6f 73 65 |field is| enclose|
|00003060| 64 20 69 6e 20 62 72 61 | 63 65 73 20 74 68 65 6e |d in bra|ces then|
|00003070| 20 74 68 65 20 62 72 61 | 63 6b 65 74 73 20 61 6e | the bra|ckets an|
|00003080| 64 20 74 68 65 20 63 68 | 61 72 61 63 74 65 72 73 |d the ch|aracters|
|00003090| 0a 58 62 65 74 77 65 65 | 6e 20 74 68 65 6d 20 61 |.Xbetwee|n them a|
|000030a0| 72 65 20 6e 6f 74 20 69 | 6e 74 65 72 70 72 65 74 |re not i|nterpret|
|000030b0| 65 64 20 73 70 65 63 69 | 61 6c 6c 79 3b 20 20 74 |ed speci|ally; t|
|000030c0| 68 65 79 20 61 72 65 20 | 70 61 73 73 65 64 20 74 |hey are |passed t|
|000030d0| 68 72 6f 75 67 68 0a 58 | 74 6f 20 74 68 65 20 61 |hrough.X|to the a|
|000030e0| 72 67 75 6d 65 6e 74 20 | 76 65 72 62 61 74 69 6d |rgument |verbatim|
|000030f0| 2e 0a 58 0a 58 2e 53 48 | 20 22 56 41 52 49 41 42 |..X.X.SH| "VARIAB|
|00003100| 4c 45 20 53 55 42 53 54 | 49 54 55 54 49 4f 4e 20 |LE SUBST|ITUTION |
|00003110| 57 49 54 48 20 24 22 0a | 58 2e 50 50 0a 58 54 68 |WITH $".|X.PP.XTh|
|00003120| 65 20 64 6f 6c 6c 61 72 | 20 73 69 67 6e 20 28 5c |e dollar| sign (\|
|00003130| 66 42 24 5c 66 52 29 20 | 6d 61 79 20 62 65 20 75 |fB$\fR) |may be u|
|00003140| 73 65 64 20 61 73 20 61 | 20 73 70 65 63 69 61 6c |sed as a| special|
|00003150| 20 73 68 6f 72 74 68 61 | 6e 64 20 66 6f 72 6d 0a | shortha|nd form.|
|00003160| 58 66 6f 72 20 73 75 62 | 73 74 69 74 75 74 69 6e |Xfor sub|stitutin|
|00003170| 67 20 76 61 72 69 61 62 | 6c 65 73 2e 20 20 49 66 |g variab|les. If|
|00003180| 20 5c 66 42 24 5c 66 52 | 20 61 70 70 65 61 72 73 | \fB$\fR| appears|
|00003190| 20 69 6e 20 61 6e 20 61 | 72 67 75 6d 65 6e 74 20 | in an a|rgument |
|000031a0| 74 68 61 74 0a 58 69 73 | 6e 27 74 20 65 6e 63 6c |that.Xis|n't encl|
|000031b0| 6f 73 65 64 20 69 6e 20 | 62 72 61 63 65 73 0a 58 |osed in |braces.X|
|000031c0| 74 68 65 6e 20 76 61 72 | 69 61 62 6c 65 20 73 75 |then var|iable su|
|000031d0| 62 73 74 69 74 75 74 69 | 6f 6e 20 77 69 6c 6c 20 |bstituti|on will |
|000031e0| 6f 63 63 75 72 2e 20 20 | 54 68 65 20 63 68 61 72 |occur. |The char|
|000031f0| 61 63 74 65 72 73 20 61 | 66 74 65 72 0a 58 74 68 |acters a|fter.Xth|
|00003200| 65 20 5c 66 42 24 5c 66 | 52 2c 20 75 70 20 74 6f |e \fB$\f|R, up to|
|00003210| 20 74 68 65 20 66 69 72 | 73 74 20 63 68 61 72 61 | the fir|st chara|
|00003220| 63 74 65 72 20 74 68 61 | 74 20 69 73 6e 27 74 20 |cter tha|t isn't |
|00003230| 61 20 6e 75 6d 62 65 72 | 2c 20 6c 65 74 74 65 72 |a number|, letter|
|00003240| 2c 20 6f 72 0a 58 75 6e | 64 65 72 73 63 6f 72 65 |, or.Xun|derscore|
|00003250| 2c 20 61 72 65 20 74 61 | 6b 65 6e 20 61 73 20 61 |, are ta|ken as a|
|00003260| 20 76 61 72 69 61 62 6c | 65 20 6e 61 6d 65 20 61 | variabl|e name a|
|00003270| 6e 64 20 74 68 65 20 73 | 74 72 69 6e 67 20 76 61 |nd the s|tring va|
|00003280| 6c 75 65 20 6f 66 20 74 | 68 61 74 0a 58 76 61 72 |lue of t|hat.Xvar|
|00003290| 69 61 62 6c 65 20 69 73 | 20 73 75 62 73 74 69 74 |iable is| substit|
|000032a0| 75 74 65 64 20 66 6f 72 | 20 74 68 65 20 6e 61 6d |uted for| the nam|
|000032b0| 65 2e 20 20 4f 72 2c 20 | 69 66 20 74 68 65 20 64 |e. Or, |if the d|
|000032c0| 6f 6c 6c 61 72 20 73 69 | 67 6e 20 69 73 20 66 6f |ollar si|gn is fo|
|000032d0| 6c 6c 6f 77 65 64 0a 58 | 62 79 20 61 6e 20 6f 70 |llowed.X|by an op|
|000032e0| 65 6e 20 63 75 72 6c 79 | 20 62 72 61 63 65 20 74 |en curly| brace t|
|000032f0| 68 65 6e 20 74 68 65 20 | 76 61 72 69 61 62 6c 65 |hen the |variable|
|00003300| 20 6e 61 6d 65 20 63 6f | 6e 73 69 73 74 73 20 6f | name co|nsists o|
|00003310| 66 20 61 6c 6c 20 74 68 | 65 20 63 68 61 72 61 63 |f all th|e charac|
|00003320| 74 65 72 73 0a 58 75 70 | 20 74 6f 20 74 68 65 20 |ters.Xup| to the |
|00003330| 6e 65 78 74 20 63 6c 6f | 73 65 20 63 75 72 6c 79 |next clo|se curly|
|00003340| 20 62 72 61 63 65 2e 20 | 20 46 6f 72 20 65 78 61 | brace. | For exa|
|00003350| 6d 70 6c 65 2c 20 69 66 | 20 76 61 72 69 61 62 6c |mple, if| variabl|
|00003360| 65 20 5c 66 42 66 6f 6f | 5c 66 52 0a 58 68 61 73 |e \fBfoo|\fR.Xhas|
|00003370| 20 74 68 65 20 76 61 6c | 75 65 20 5c 66 42 74 65 | the val|ue \fBte|
|00003380| 73 74 5c 66 52 2c 20 74 | 68 65 6e 20 74 68 65 20 |st\fR, t|hen the |
|00003390| 63 6f 6d 6d 61 6e 64 0a | 58 2e 44 53 20 43 0a 58 |command.|X.DS C.X|
|000033a0| 5c 66 42 73 65 74 20 61 | 20 24 66 6f 6f 2e 63 5c |\fBset a| $foo.c\|
|000033b0| 66 52 0a 58 2e 44 45 0a | 58 69 73 20 65 71 75 69 |fR.X.DE.|Xis equi|
|000033c0| 76 61 6c 65 6e 74 20 74 | 6f 20 74 68 65 20 63 6f |valent t|o the co|
|000033d0| 6d 6d 61 6e 64 0a 58 2e | 44 53 20 43 0a 58 5c 66 |mmand.X.|DS C.X\f|
|000033e0| 42 73 65 74 20 61 20 74 | 65 73 74 2e 63 5c 66 52 |Bset a t|est.c\fR|
|000033f0| 0a 58 2e 44 45 0a 58 61 | 6e 64 20 74 68 65 20 63 |.X.DE.Xa|nd the c|
|00003400| 6f 6d 6d 61 6e 64 0a 58 | 2e 44 53 20 43 0a 58 5c |ommand.X|.DS C.X\|
|00003410| 66 42 73 65 74 20 61 20 | 61 62 63 24 7b 66 6f 6f |fBset a |abc${foo|
|00003420| 7d 62 61 72 5c 66 52 0a | 58 2e 44 45 0a 58 69 73 |}bar\fR.|X.DE.Xis|
|00003430| 20 65 71 75 69 76 61 6c | 65 6e 74 20 74 6f 20 74 | equival|ent to t|
|00003440| 68 65 20 63 6f 6d 6d 61 | 6e 64 0a 58 2e 44 53 20 |he comma|nd.X.DS |
|00003450| 43 0a 58 5c 66 42 73 65 | 74 20 61 20 61 62 63 74 |C.X\fBse|t a abct|
|00003460| 65 73 74 62 61 72 5c 66 | 52 0a 58 2e 44 45 0a 58 |estbar\f|R.X.DE.X|
|00003470| 56 61 72 69 61 62 6c 65 | 20 73 75 62 73 74 69 74 |Variable| substit|
|00003480| 75 74 69 6f 6e 20 64 6f | 65 73 20 6e 6f 74 20 6f |ution do|es not o|
|00003490| 63 63 75 72 20 69 6e 20 | 61 72 67 75 6d 65 6e 74 |ccur in |argument|
|000034a0| 73 20 74 68 61 74 20 61 | 72 65 20 65 6e 63 6c 6f |s that a|re enclo|
|000034b0| 73 65 64 0a 58 69 6e 20 | 62 72 61 63 65 73 3a 20 |sed.Xin |braces: |
|000034c0| 20 74 68 65 0a 58 64 6f | 6c 6c 61 72 20 73 69 67 | the.Xdo|llar sig|
|000034d0| 6e 20 61 6e 64 20 76 61 | 72 69 61 62 6c 65 20 6e |n and va|riable n|
|000034e0| 61 6d 65 20 61 72 65 20 | 70 61 73 73 65 64 20 74 |ame are |passed t|
|000034f0| 68 72 6f 75 67 68 20 74 | 6f 20 74 68 65 20 61 72 |hrough t|o the ar|
|00003500| 67 75 6d 65 6e 74 20 76 | 65 72 62 61 74 69 6d 2e |gument v|erbatim.|
|00003510| 0a 58 2e 50 50 0a 58 54 | 68 65 20 64 6f 6c 6c 61 |.X.PP.XT|he dolla|
|00003520| 72 20 73 69 67 6e 20 61 | 62 62 72 65 76 69 61 74 |r sign a|bbreviat|
|00003530| 69 6f 6e 20 69 73 20 73 | 69 6d 70 6c 79 20 61 20 |ion is s|imply a |
|00003540| 73 68 6f 72 74 68 61 6e | 64 20 66 6f 72 6d 2e 20 |shorthan|d form. |
|00003550| 20 5c 66 42 24 61 5c 66 | 52 20 69 73 0a 58 63 6f | \fB$a\f|R is.Xco|
|00003560| 6d 70 6c 65 74 65 6c 79 | 20 65 71 75 69 76 61 6c |mpletely| equival|
|00003570| 65 6e 74 20 74 6f 20 5c | 66 42 5b 73 65 74 20 61 |ent to \|fB[set a|
|00003580| 5d 5c 66 52 3b 20 20 69 | 74 20 69 73 20 70 72 6f |]\fR; i|t is pro|
|00003590| 76 69 64 65 64 20 61 73 | 20 61 20 63 6f 6e 76 65 |vided as| a conve|
|000035a0| 6e 69 65 6e 63 65 0a 58 | 74 6f 20 72 65 64 75 63 |nience.X|to reduc|
|000035b0| 65 20 74 79 70 69 6e 67 | 2e 0a 58 0a 58 2e 56 53 |e typing|..X.X.VS|
|000035c0| 0a 58 2e 53 48 20 22 53 | 45 50 41 52 41 54 49 4e |.X.SH "S|EPARATIN|
|000035d0| 47 20 43 4f 4d 4d 41 4e | 44 53 20 57 49 54 48 20 |G COMMAN|DS WITH |
|000035e0| 53 45 4d 49 2d 43 4f 4c | 4f 4e 53 22 0a 58 2e 50 |SEMI-COL|ONS".X.P|
|000035f0| 50 0a 58 4e 6f 72 6d 61 | 6c 6c 79 2c 20 65 61 63 |P.XNorma|lly, eac|
|00003600| 68 20 63 6f 6d 6d 61 6e | 64 20 6f 63 63 75 70 69 |h comman|d occupi|
|00003610| 65 73 20 6f 6e 65 20 6c | 69 6e 65 20 28 74 68 65 |es one l|ine (the|
|00003620| 20 63 6f 6d 6d 61 6e 64 | 20 69 73 20 74 65 72 6d | command| is term|
|00003630| 69 6e 61 74 65 64 20 62 | 79 0a 58 61 20 6e 65 77 |inated b|y.Xa new|
|00003640| 6c 69 6e 65 20 63 68 61 | 72 61 63 74 65 72 29 2e |line cha|racter).|
|00003650| 20 20 48 6f 77 65 76 65 | 72 2c 20 73 65 6d 69 2d | Howeve|r, semi-|
|00003660| 63 6f 6c 6f 6e 20 28 60 | 60 3b 27 27 29 20 69 73 |colon (`|`;'') is|
|00003670| 20 74 72 65 61 74 65 64 | 0a 58 61 73 20 61 20 63 | treated|.Xas a c|
|00003680| 6f 6d 6d 61 6e 64 20 73 | 65 70 61 72 61 74 6f 72 |ommand s|eparator|
|00003690| 20 63 68 61 72 61 63 74 | 65 72 3b 20 20 6d 75 6c | charact|er; mul|
|000036a0| 74 69 70 6c 65 20 63 6f | 6d 6d 61 6e 64 73 20 6d |tiple co|mmands m|
|000036b0| 61 79 20 62 65 20 70 6c | 61 63 65 64 0a 58 6f 6e |ay be pl|aced.Xon|
|000036c0| 20 6f 6e 65 20 6c 69 6e | 65 20 62 79 20 73 65 70 | one lin|e by sep|
|000036d0| 61 72 61 74 69 6e 67 20 | 74 68 65 6d 20 77 69 74 |arating |them wit|
|000036e0| 68 20 61 20 73 65 6d 69 | 2d 63 6f 6c 6f 6e 2e 0a |h a semi|-colon..|
|000036f0| 58 2e 56 45 0a 58 0a 58 | 2e 53 48 20 22 42 41 43 |X.VE.X.X|.SH "BAC|
|00003700| 4b 53 4c 41 53 48 20 53 | 55 42 53 54 49 54 55 54 |KSLASH S|UBSTITUT|
|00003710| 49 4f 4e 22 0a 58 2e 50 | 50 0a 58 42 61 63 6b 73 |ION".X.P|P.XBacks|
|00003720| 6c 61 73 68 65 73 20 6d | 61 79 20 62 65 20 75 73 |lashes m|ay be us|
|00003730| 65 64 20 74 6f 20 69 6e | 73 65 72 74 20 6e 6f 6e |ed to in|sert non|
|00003740| 2d 70 72 69 6e 74 69 6e | 67 20 63 68 61 72 61 63 |-printin|g charac|
|00003750| 74 65 72 73 20 69 6e 74 | 6f 0a 58 63 6f 6d 6d 61 |ters int|o.Xcomma|
|00003760| 6e 64 20 66 69 65 6c 64 | 73 20 61 6e 64 20 61 6c |nd field|s and al|
|00003770| 73 6f 20 74 6f 20 69 6e | 73 65 72 74 20 73 70 65 |so to in|sert spe|
|00003780| 63 69 61 6c 20 63 68 61 | 72 61 63 74 65 72 73 20 |cial cha|racters |
|00003790| 6c 69 6b 65 0a 58 62 72 | 61 63 65 73 20 61 6e 64 |like.Xbr|aces and|
|000037a0| 20 62 72 61 63 6b 65 74 | 73 20 69 6e 74 6f 20 66 | bracket|s into f|
|000037b0| 69 65 6c 64 73 0a 58 77 | 69 74 68 6f 75 74 20 74 |ields.Xw|ithout t|
|000037c0| 68 65 6d 20 62 65 69 6e | 67 20 69 6e 74 65 72 70 |hem bein|g interp|
|000037d0| 72 65 74 65 64 20 73 70 | 65 63 69 61 6c 6c 79 20 |reted sp|ecially |
|000037e0| 61 73 20 64 65 73 63 72 | 69 62 65 64 20 61 62 6f |as descr|ibed abo|
|000037f0| 76 65 2e 0a 58 54 68 65 | 20 62 61 63 6b 73 6c 61 |ve..XThe| backsla|
|00003800| 73 68 20 73 65 71 75 65 | 6e 63 65 73 20 75 6e 64 |sh seque|nces und|
|00003810| 65 72 73 74 6f 6f 64 20 | 62 79 20 74 68 65 20 54 |erstood |by the T|
|00003820| 63 6c 20 69 6e 74 65 72 | 70 72 65 74 65 72 20 61 |cl inter|preter a|
|00003830| 72 65 0a 58 6c 69 73 74 | 65 64 20 62 65 6c 6f 77 |re.Xlist|ed below|
|00003840| 2e 20 20 49 6e 20 65 61 | 63 68 20 63 61 73 65 2c |. In ea|ch case,|
|00003850| 20 74 68 65 20 62 61 63 | 6b 73 6c 61 73 68 0a 58 | the bac|kslash.X|
|00003860| 73 65 71 75 65 6e 63 65 | 20 69 73 20 72 65 70 6c |sequence| is repl|
|00003870| 61 63 65 64 20 62 79 20 | 74 68 65 20 67 69 76 65 |aced by |the give|
|00003880| 6e 20 63 68 61 72 61 63 | 74 65 72 3a 0a 58 2e 54 |n charac|ter:.X.T|
|00003890| 50 20 32 30 0a 58 5c 66 | 42 5c 65 62 5c 66 52 0a |P 20.X\f|B\eb\fR.|
|000038a0| 58 42 61 63 6b 73 70 61 | 63 65 20 28 6f 63 74 61 |XBackspa|ce (octa|
|000038b0| 6c 20 31 30 29 2e 0a 58 | 2e 54 50 20 32 30 0a 58 |l 10)..X|.TP 20.X|
|000038c0| 5c 66 42 5c 65 65 5c 66 | 52 0a 58 45 73 63 61 70 |\fB\ee\f|R.XEscap|
|000038d0| 65 20 28 6f 63 74 61 6c | 20 33 33 29 2e 0a 58 2e |e (octal| 33)..X.|
|000038e0| 54 50 20 32 30 0a 58 5c | 66 42 5c 65 6e 5c 66 52 |TP 20.X\|fB\en\fR|
|000038f0| 0a 58 4e 65 77 6c 69 6e | 65 20 28 6f 63 74 61 6c |.XNewlin|e (octal|
|00003900| 20 31 35 29 2e 0a 58 2e | 54 50 20 32 30 0a 58 5c | 15)..X.|TP 20.X\|
|00003910| 66 42 5c 65 74 5c 66 52 | 0a 58 54 61 62 20 28 6f |fB\et\fR|.XTab (o|
|00003920| 63 74 61 6c 20 31 31 29 | 2e 0a 58 2e 54 50 20 32 |ctal 11)|..X.TP 2|
|00003930| 30 0a 58 5c 66 42 5c 65 | 7b 5c 66 52 0a 58 4c 65 |0.X\fB\e|{\fR.XLe|
|00003940| 66 74 20 62 72 61 63 65 | 20 28 60 60 7b 27 27 29 |ft brace| (``{'')|
|00003950| 2e 0a 58 2e 54 50 20 32 | 30 0a 58 5c 66 42 5c 65 |..X.TP 2|0.X\fB\e|
|00003960| 7d 5c 66 52 0a 58 52 69 | 67 68 74 20 62 72 61 63 |}\fR.XRi|ght brac|
|00003970| 65 20 28 60 60 7d 27 27 | 29 2e 0a 58 2e 54 50 20 |e (``}''|)..X.TP |
|00003980| 32 30 0a 58 5c 66 42 5c | 65 5b 5c 66 52 0a 58 4f |20.X\fB\|e[\fR.XO|
|00003990| 70 65 6e 20 62 72 61 63 | 6b 65 74 20 28 60 60 5b |pen brac|ket (``[|
|000039a0| 27 27 29 2e 0a 58 2e 54 | 50 20 32 30 0a 58 5c 66 |'')..X.T|P 20.X\f|
|000039b0| 42 5c 65 5d 5c 66 52 0a | 58 43 6c 6f 73 65 20 62 |B\e]\fR.|XClose b|
|000039c0| 72 61 63 6b 65 74 20 28 | 60 60 5d 27 27 29 2e 0a |racket (|``]'')..|
|000039d0| 58 2e 54 50 20 32 30 0a | 58 5c 66 42 5c 65 3c 73 |X.TP 20.|X\fB\e<s|
|000039e0| 70 61 63 65 3e 5c 66 52 | 0a 58 53 70 61 63 65 20 |pace>\fR|.XSpace |
|000039f0| 28 60 60 20 27 27 29 3a | 20 64 6f 65 73 6e 27 74 |(`` ''):| doesn't|
|00003a00| 20 74 65 72 6d 69 6e 61 | 74 65 20 61 72 67 75 6d | termina|te argum|
|00003a10| 65 6e 74 2e 0a 58 2e 62 | 72 0a 58 2e 56 53 0a 58 |ent..X.b|r.X.VS.X|
|00003a20| 2e 54 50 20 32 30 0a 58 | 5c 66 42 5c 65 3b 5c 66 |.TP 20.X|\fB\e;\f|
|00003a30| 52 0a 58 53 65 6d 69 2d | 63 6f 6c 6f 6e 3a 20 64 |R.XSemi-|colon: d|
|00003a40| 6f 65 73 6e 27 74 20 74 | 65 72 6d 69 6e 61 74 65 |oesn't t|erminate|
|00003a50| 20 63 6f 6d 6d 61 6e 64 | 2e 0a 58 2e 54 50 20 32 | command|..X.TP 2|
|00003a60| 30 0a 58 5c 66 42 5c 65 | 22 5c 66 52 0a 58 44 6f |0.X\fB\e|"\fR.XDo|
|00003a70| 75 62 6c 65 2d 71 75 6f | 74 65 2e 0a 58 2e 54 50 |uble-quo|te..X.TP|
|00003a80| 20 32 30 0a 58 5c 66 42 | 5c 65 3c 6e 65 77 6c 69 | 20.X\fB|\e<newli|
|00003a90| 6e 65 3e 5c 66 52 0a 58 | 4e 6f 74 68 69 6e 67 3a |ne>\fR.X|Nothing:|
|00003aa0| 20 20 74 68 69 73 20 65 | 66 66 65 63 74 69 76 65 | this e|ffective|
|00003ab0| 6c 79 20 6a 6f 69 6e 73 | 20 74 77 6f 20 6c 69 6e |ly joins| two lin|
|00003ac0| 65 73 20 74 6f 67 65 74 | 68 65 72 0a 58 69 6e 74 |es toget|her.Xint|
|00003ad0| 6f 20 61 20 73 69 6e 67 | 6c 65 20 6c 69 6e 65 2e |o a sing|le line.|
|00003ae0| 20 20 54 68 69 73 20 62 | 61 63 6b 73 6c 61 73 68 | This b|ackslash|
|00003af0| 20 66 65 61 74 75 72 65 | 20 69 73 20 6f 6e 6c 79 | feature| is only|
|00003b00| 20 70 72 6f 76 69 64 65 | 64 0a 58 77 68 65 6e 20 | provide|d.Xwhen |
|00003b10| 70 61 72 73 69 6e 67 20 | 54 63 6c 20 63 6f 6d 6d |parsing |Tcl comm|
|00003b20| 61 6e 64 73 3b 20 20 69 | 74 20 69 73 20 6e 6f 74 |ands; i|t is not|
|00003b30| 20 73 75 70 70 6f 72 74 | 65 64 20 62 79 20 74 68 | support|ed by th|
|00003b40| 65 0a 58 54 63 6c 5f 42 | 61 63 6b 73 6c 61 73 68 |e.XTcl_B|ackslash|
|00003b50| 20 70 72 6f 63 65 64 75 | 72 65 2e 0a 58 2e 56 45 | procedu|re..X.VE|
|00003b60| 0a 58 2e 54 50 20 32 30 | 0a 58 5c 66 42 5c 65 5c |.X.TP 20|.X\fB\e\|
|00003b70| 65 5c 66 52 0a 58 42 61 | 63 6b 73 6c 61 73 68 20 |e\fR.XBa|ckslash |
|00003b80| 28 60 60 5c 65 27 27 29 | 2e 0a 58 2e 54 50 20 32 |(``\e'')|..X.TP 2|
|00003b90| 30 0a 58 5c 66 42 5c 65 | 43 5c 66 49 78 5c 66 52 |0.X\fB\e|C\fIx\fR|
|00003ba0| 0a 58 43 6f 6e 74 72 6f | 6c 2d 5c 66 49 78 5c 66 |.XContro|l-\fIx\f|
|00003bb0| 52 20 28 5c 66 49 78 5c | 66 52 20 41 4e 44 20 6f |R (\fIx\|fR AND o|
|00003bc0| 63 74 61 6c 20 30 33 37 | 29 2c 20 66 6f 72 20 61 |ctal 037|), for a|
|00003bd0| 6e 79 20 41 53 43 49 49 | 20 5c 66 49 78 5c 66 52 |ny ASCII| \fIx\fR|
|00003be0| 20 65 78 63 65 70 74 20 | 5c 66 42 4d 5c 66 52 0a | except |\fBM\fR.|
|00003bf0| 58 28 73 65 65 20 62 65 | 6c 6f 77 29 2e 0a 58 2e |X(see be|low)..X.|
|00003c00| 54 50 20 32 30 0a 58 5c | 66 42 5c 65 4d 5c 66 49 |TP 20.X\|fB\eM\fI|
|00003c10| 78 5c 66 52 0a 58 4d 65 | 74 61 2d 5c 66 49 78 5c |x\fR.XMe|ta-\fIx\|
|00003c20| 66 52 20 28 5c 66 49 78 | 5c 66 52 20 4f 52 20 6f |fR (\fIx|\fR OR o|
|00003c30| 63 74 61 6c 20 32 30 30 | 29 2c 20 66 6f 72 20 61 |ctal 200|), for a|
|00003c40| 6e 79 20 41 53 43 49 49 | 20 5c 66 49 78 5c 66 52 |ny ASCII| \fIx\fR|
|00003c50| 2e 0a 58 2e 54 50 20 32 | 30 0a 58 5c 66 42 5c 65 |..X.TP 2|0.X\fB\e|
|00003c60| 43 4d 5c 66 49 78 5c 66 | 52 0a 58 43 6f 6e 74 72 |CM\fIx\f|R.XContr|
|00003c70| 6f 6c 2d 6d 65 74 61 2d | 5c 66 49 78 5c 66 52 20 |ol-meta-|\fIx\fR |
|00003c80| 28 28 5c 66 49 78 5c 66 | 52 20 41 4e 44 20 6f 63 |((\fIx\f|R AND oc|
|00003c90| 74 61 6c 20 30 33 37 29 | 20 4f 52 20 6f 63 74 61 |tal 037)| OR octa|
|00003ca0| 6c 20 30 32 30 30 29 2c | 20 66 6f 72 0a 58 61 6e |l 0200),| for.Xan|
|00003cb0| 79 20 41 53 43 49 49 20 | 5c 66 49 78 5c 66 52 2e |y ASCII |\fIx\fR.|
|00003cc0| 0a 58 2e 54 50 20 32 30 | 0a 58 5c 66 42 5c 65 5c |.X.TP 20|.X\fB\e\|
|00003cd0| 66 49 64 64 64 5c 66 52 | 0a 58 54 68 65 20 64 69 |fIddd\fR|.XThe di|
|00003ce0| 67 69 74 73 20 5c 66 49 | 64 64 64 5c 66 52 20 28 |gits \fI|ddd\fR (|
|00003cf0| 6f 6e 65 2c 20 74 77 6f | 2c 20 6f 72 20 74 68 72 |one, two|, or thr|
|00003d00| 65 65 20 6f 66 20 74 68 | 65 6d 29 20 67 69 76 65 |ee of th|em) give|
|00003d10| 20 74 68 65 20 6f 63 74 | 61 6c 20 76 61 6c 75 65 | the oct|al value|
|00003d20| 20 6f 66 0a 58 74 68 65 | 20 63 68 61 72 61 63 74 | of.Xthe| charact|
|00003d30| 65 72 2e 0a 58 2e 50 50 | 0a 58 46 6f 72 20 65 78 |er..X.PP|.XFor ex|
|00003d40| 61 6d 70 6c 65 2c 20 69 | 6e 20 74 68 65 20 63 6f |ample, i|n the co|
|00003d50| 6d 6d 61 6e 64 0a 58 2e | 44 53 0a 58 5c 66 42 73 |mmand.X.|DS.X\fBs|
|00003d60| 65 74 20 61 20 5c 65 7b | 78 5c 65 5b 5c 65 5c 30 |et a \e{|x\e[\e\0|
|00003d70| 79 7a 5c 65 31 34 31 5c | 66 52 0a 58 2e 44 45 0a |yz\e141\|fR.X.DE.|
|00003d80| 58 74 68 65 20 73 65 63 | 6f 6e 64 20 61 72 67 75 |Xthe sec|ond argu|
|00003d90| 6d 65 6e 74 20 74 6f 20 | 5c 66 42 73 65 74 5c 66 |ment to |\fBset\f|
|00003da0| 52 20 77 69 6c 6c 20 62 | 65 20 60 60 5c 66 42 7b |R will b|e ``\fB{|
|00003db0| 78 5b 5c 30 79 7a 61 5c | 66 52 27 27 2e 0a 58 2e |x[\0yza\|fR''..X.|
|00003dc0| 50 50 0a 58 49 66 20 61 | 20 62 61 63 6b 73 6c 61 |PP.XIf a| backsla|
|00003dd0| 73 68 20 69 73 20 66 6f | 6c 6c 6f 77 65 64 20 62 |sh is fo|llowed b|
|00003de0| 79 20 73 6f 6d 65 74 68 | 69 6e 67 20 6f 74 68 65 |y someth|ing othe|
|00003df0| 72 20 74 68 61 6e 20 6f | 6e 65 20 6f 66 20 74 68 |r than o|ne of th|
|00003e00| 65 20 6f 70 74 69 6f 6e | 73 0a 58 64 65 73 63 72 |e option|s.Xdescr|
|00003e10| 69 62 65 64 20 61 62 6f | 76 65 2c 20 74 68 65 6e |ibed abo|ve, then|
|00003e20| 20 74 68 65 20 62 61 63 | 6b 73 6c 61 73 68 20 69 | the bac|kslash i|
|00003e30| 73 20 74 72 61 6e 73 6d | 69 74 74 65 64 20 74 6f |s transm|itted to|
|00003e40| 20 74 68 65 20 61 72 67 | 75 6d 65 6e 74 0a 58 66 | the arg|ument.Xf|
|00003e50| 69 65 6c 64 20 77 69 74 | 68 6f 75 74 20 61 6e 79 |ield wit|hout any|
|00003e60| 20 73 70 65 63 69 61 6c | 20 70 72 6f 63 65 73 73 | special| process|
|00003e70| 69 6e 67 2c 20 61 6e 64 | 20 74 68 65 20 54 63 6c |ing, and| the Tcl|
|00003e80| 20 73 63 61 6e 6e 65 72 | 20 63 6f 6e 74 69 6e 75 | scanner| continu|
|00003e90| 65 73 0a 58 6e 6f 72 6d | 61 6c 20 70 72 6f 63 65 |es.Xnorm|al proce|
|00003ea0| 73 73 69 6e 67 20 77 69 | 74 68 20 74 68 65 20 6e |ssing wi|th the n|
|00003eb0| 65 78 74 20 63 68 61 72 | 61 63 74 65 72 2e 20 20 |ext char|acter. |
|00003ec0| 46 6f 72 20 65 78 61 6d | 70 6c 65 2c 20 69 6e 20 |For exam|ple, in |
|00003ed0| 74 68 65 0a 58 63 6f 6d | 6d 61 6e 64 0a 58 2e 44 |the.Xcom|mand.X.D|
|00003ee0| 53 0a 58 5c 66 42 73 65 | 74 20 5c 65 2a 61 20 5c |S.X\fBse|t \e*a \|
|00003ef0| 65 5c 65 5c 65 7b 66 6f | 6f 5c 66 52 0a 58 2e 44 |e\e\e{fo|o\fR.X.D|
|00003f00| 45 0a 58 54 68 65 20 66 | 69 72 73 74 20 61 72 67 |E.XThe f|irst arg|
|00003f10| 75 6d 65 6e 74 20 74 6f | 20 5c 66 42 73 65 74 5c |ument to| \fBset\|
|00003f20| 66 52 20 77 69 6c 6c 20 | 62 65 20 5c 66 42 5c 65 |fR will |be \fB\e|
|00003f30| 2a 61 5c 66 52 20 61 6e | 64 20 74 68 65 20 73 65 |*a\fR an|d the se|
|00003f40| 63 6f 6e 64 0a 58 61 72 | 67 75 6d 65 6e 74 20 77 |cond.Xar|gument w|
|00003f50| 69 6c 6c 20 62 65 20 5c | 66 42 5c 65 7b 66 6f 6f |ill be \|fB\e{foo|
|00003f60| 5c 66 52 2e 0a 58 2e 50 | 50 0a 58 49 66 20 61 6e |\fR..X.P|P.XIf an|
|00003f70| 20 61 72 67 75 6d 65 6e | 74 20 69 73 20 65 6e 63 | argumen|t is enc|
|00003f80| 6c 6f 73 65 64 20 69 6e | 20 62 72 61 63 65 73 2c |losed in| braces,|
|00003f90| 20 74 68 65 6e 20 62 61 | 63 6b 73 6c 61 73 68 20 | then ba|ckslash |
|00003fa0| 73 65 71 75 65 6e 63 65 | 73 20 69 6e 73 69 64 65 |sequence|s inside|
|00003fb0| 0a 58 74 68 65 20 61 72 | 67 75 6d 65 6e 74 20 61 |.Xthe ar|gument a|
|00003fc0| 72 65 20 70 61 72 73 65 | 64 20 62 75 74 20 6e 6f |re parse|d but no|
|00003fd0| 20 73 75 62 73 74 69 74 | 75 74 69 6f 6e 20 6f 63 | substit|ution oc|
|00003fe0| 63 75 72 73 3a 20 20 74 | 68 65 20 62 61 63 6b 73 |curs: t|he backs|
|00003ff0| 6c 61 73 68 0a 58 73 65 | 71 75 65 6e 63 65 20 69 |lash.Xse|quence i|
|00004000| 73 20 70 61 73 73 65 64 | 20 74 68 72 6f 75 67 68 |s passed| through|
|00004010| 20 74 6f 20 74 68 65 20 | 61 72 67 75 6d 65 6e 74 | to the |argument|
|00004020| 20 61 73 20 69 73 2c 20 | 77 69 74 68 6f 75 74 20 | as is, |without |
|00004030| 6d 61 6b 69 6e 67 0a 58 | 61 6e 79 20 73 70 65 63 |making.X|any spec|
|00004040| 69 61 6c 20 69 6e 74 65 | 72 70 72 65 74 61 74 69 |ial inte|rpretati|
|00004050| 6f 6e 20 6f 66 20 74 68 | 65 20 63 68 61 72 61 63 |on of th|e charac|
|00004060| 74 65 72 73 20 69 6e 20 | 74 68 65 20 62 61 63 6b |ters in |the back|
|00004070| 73 6c 61 73 68 20 73 65 | 71 75 65 6e 63 65 2e 0a |slash se|quence..|
|00004080| 58 49 6e 20 70 61 72 74 | 69 63 75 6c 61 72 2c 20 |XIn part|icular, |
|00004090| 62 61 63 6b 73 6c 61 73 | 68 65 64 20 62 72 61 63 |backslas|hed brac|
|000040a0| 65 73 20 61 72 65 20 6e | 6f 74 20 63 6f 75 6e 74 |es are n|ot count|
|000040b0| 65 64 20 69 6e 20 6c 6f | 63 61 74 69 6e 67 20 74 |ed in lo|cating t|
|000040c0| 68 65 0a 58 6d 61 74 63 | 68 69 6e 67 20 72 69 67 |he.Xmatc|hing rig|
|000040d0| 68 74 20 62 72 61 63 65 | 20 74 68 61 74 20 74 65 |ht brace| that te|
|000040e0| 72 6d 69 6e 61 74 65 73 | 20 74 68 65 20 61 72 67 |rminates| the arg|
|000040f0| 75 6d 65 6e 74 2e 0a 58 | 46 6f 72 20 65 78 61 6d |ument..X|For exam|
|00004100| 70 6c 65 2c 20 69 6e 20 | 74 68 65 0a 58 63 6f 6d |ple, in |the.Xcom|
|00004110| 6d 61 6e 64 0a 58 2e 44 | 53 0a 58 5c 66 42 73 65 |mand.X.D|S.X\fBse|
|00004120| 74 20 61 20 7b 5c 65 7b | 61 62 63 7d 5c 66 52 0a |t a {\e{|abc}\fR.|
|00004130| 58 2e 44 45 0a 58 74 68 | 65 20 73 65 63 6f 6e 64 |X.DE.Xth|e second|
|00004140| 20 61 72 67 75 6d 65 6e | 74 20 74 6f 20 5c 66 42 | argumen|t to \fB|
|00004150| 73 65 74 5c 66 52 20 77 | 69 6c 6c 20 62 65 20 5c |set\fR w|ill be \|
|00004160| 66 42 5c 65 7b 61 62 63 | 5c 66 52 2e 0a 58 2e 50 |fB\e{abc|\fR..X.P|
|00004170| 50 0a 58 54 68 69 73 20 | 62 61 63 6b 73 6c 61 73 |P.XThis |backslas|
|00004180| 68 20 6d 65 63 68 61 6e | 69 73 6d 20 69 73 20 6e |h mechan|ism is n|
|00004190| 6f 74 20 73 75 66 66 69 | 63 69 65 6e 74 20 74 6f |ot suffi|cient to|
|000041a0| 20 67 65 6e 65 72 61 74 | 65 20 61 62 73 6f 6c 75 | generat|e absolu|
|000041b0| 74 65 6c 79 0a 58 61 6e | 79 20 61 72 67 75 6d 65 |tely.Xan|y argume|
|000041c0| 6e 74 20 73 74 72 75 63 | 74 75 72 65 3b 20 20 69 |nt struc|ture; i|
|000041d0| 74 20 6f 6e 6c 79 20 63 | 6f 76 65 72 73 20 74 68 |t only c|overs th|
|000041e0| 65 0a 58 6d 6f 73 74 20 | 63 6f 6d 6d 6f 6e 20 63 |e.Xmost |common c|
|000041f0| 61 73 65 73 2e 20 20 54 | 6f 20 70 72 6f 64 75 63 |ases. T|o produc|
|00004200| 65 20 70 61 72 74 69 63 | 75 6c 61 72 6c 79 20 63 |e partic|ularly c|
|00004210| 6f 6d 70 6c 69 63 61 74 | 65 64 20 61 72 67 75 6d |omplicat|ed argum|
|00004220| 65 6e 74 73 0a 58 69 74 | 20 77 69 6c 6c 20 70 72 |ents.Xit| will pr|
|00004230| 6f 62 61 62 6c 79 20 62 | 65 20 65 61 73 69 65 73 |obably b|e easies|
|00004240| 74 20 74 6f 20 75 73 65 | 20 74 68 65 20 5c 66 42 |t to use| the \fB|
|00004250| 66 6f 72 6d 61 74 5c 66 | 52 20 63 6f 6d 6d 61 6e |format\f|R comman|
|00004260| 64 20 61 6c 6f 6e 67 20 | 77 69 74 68 0a 58 63 6f |d along |with.Xco|
|00004270| 6d 6d 61 6e 64 20 73 75 | 62 73 74 69 74 75 74 69 |mmand su|bstituti|
|00004280| 6f 6e 2e 0a 58 0a 58 2e | 53 48 20 22 43 4f 4d 4d |on..X.X.|SH "COMM|
|00004290| 41 4e 44 20 53 55 4d 4d | 41 52 59 22 0a 58 2e 49 |AND SUMM|ARY".X.I|
|000042a0| 50 20 5b 31 5d 0a 58 41 | 20 63 6f 6d 6d 61 6e 64 |P [1].XA| command|
|000042b0| 20 69 73 20 6a 75 73 74 | 20 61 20 73 74 72 69 6e | is just| a strin|
|000042c0| 67 2e 0a 58 2e 49 50 20 | 5b 32 5d 0a 58 57 69 74 |g..X.IP |[2].XWit|
|000042d0| 68 69 6e 20 61 20 73 74 | 72 69 6e 67 20 63 6f 6d |hin a st|ring com|
|000042e0| 6d 61 6e 64 73 20 61 72 | 65 20 73 65 70 61 72 61 |mands ar|e separa|
|000042f0| 74 65 64 20 62 79 20 6e | 65 77 6c 69 6e 65 73 20 |ted by n|ewlines |
|00004300| 6f 72 20 73 65 6d 69 2d | 63 6f 6c 6f 6e 73 0a 58 |or semi-|colons.X|
|00004310| 28 75 6e 6c 65 73 73 20 | 74 68 65 20 6e 65 77 6c |(unless |the newl|
|00004320| 69 6e 65 20 6f 72 20 73 | 65 6d 69 2d 63 6f 6c 6f |ine or s|emi-colo|
|00004330| 6e 20 69 73 20 77 69 74 | 68 69 6e 20 62 72 61 63 |n is wit|hin brac|
|00004340| 65 73 20 6f 72 20 62 72 | 61 63 6b 65 74 73 0a 58 |es or br|ackets.X|
|00004350| 6f 72 20 69 73 20 62 61 | 63 6b 73 6c 61 73 68 65 |or is ba|ckslashe|
|00004360| 64 29 2e 0a 58 2e 49 50 | 20 5b 33 5d 0a 58 41 20 |d)..X.IP| [3].XA |
|00004370| 63 6f 6d 6d 61 6e 64 20 | 63 6f 6e 73 69 73 74 73 |command |consists|
|00004380| 20 6f 66 20 66 69 65 6c | 64 73 2e 20 20 54 68 65 | of fiel|ds. The|
|00004390| 20 66 69 72 73 74 20 66 | 69 65 6c 64 20 69 73 20 | first f|ield is |
|000043a0| 74 68 65 20 6e 61 6d 65 | 20 6f 66 20 74 68 65 20 |the name| of the |
|000043b0| 63 6f 6d 6d 61 6e 64 2c | 0a 58 61 6e 64 20 6d 61 |command,|.Xand ma|
|000043c0| 79 20 62 65 20 61 62 62 | 72 65 76 69 61 74 65 64 |y be abb|reviated|
|000043d0| 2e 0a 58 54 68 65 20 6f | 74 68 65 72 20 66 69 65 |..XThe o|ther fie|
|000043e0| 6c 64 73 20 61 72 65 20 | 73 74 72 69 6e 67 73 20 |lds are |strings |
|000043f0| 74 68 61 74 20 61 72 65 | 20 70 61 73 73 65 64 20 |that are| passed |
|00004400| 74 6f 20 74 68 61 74 20 | 63 6f 6d 6d 61 6e 64 20 |to that |command |
|00004410| 61 73 20 61 72 67 75 6d | 65 6e 74 73 2e 0a 58 2e |as argum|ents..X.|
|00004420| 49 50 20 5b 34 5d 0a 58 | 46 69 65 6c 64 73 20 61 |IP [4].X|Fields a|
|00004430| 72 65 20 6e 6f 72 6d 61 | 6c 6c 79 20 73 65 70 61 |re norma|lly sepa|
|00004440| 72 61 74 65 64 20 62 79 | 20 77 68 69 74 65 20 73 |rated by| white s|
|00004450| 70 61 63 65 2e 0a 58 2e | 49 50 20 5b 35 5d 0a 58 |pace..X.|IP [5].X|
|00004460| 42 72 61 63 65 73 20 64 | 65 66 65 72 20 69 6e 74 |Braces d|efer int|
|00004470| 65 72 70 72 65 74 61 74 | 69 6f 6e 20 6f 66 20 73 |erpretat|ion of s|
|00004480| 70 65 63 69 61 6c 20 63 | 68 61 72 61 63 74 65 72 |pecial c|haracter|
|00004490| 73 2e 0a 58 49 66 20 61 | 20 66 69 65 6c 64 20 62 |s..XIf a| field b|
|000044a0| 65 67 69 6e 73 20 77 69 | 74 68 20 61 20 6c 65 66 |egins wi|th a lef|
|000044b0| 74 20 62 72 61 63 65 2c | 20 74 68 65 6e 20 69 74 |t brace,| then it|
|000044c0| 20 63 6f 6e 73 69 73 74 | 73 20 6f 66 20 65 76 65 | consist|s of eve|
|000044d0| 72 79 74 68 69 6e 67 0a | 58 62 65 74 77 65 65 6e |rything.|Xbetween|
|000044e0| 20 74 68 65 20 6c 65 66 | 74 20 62 72 61 63 65 20 | the lef|t brace |
|000044f0| 61 6e 64 20 74 68 65 20 | 6d 61 74 63 68 69 6e 67 |and the |matching|
|00004500| 20 72 69 67 68 74 20 62 | 72 61 63 65 2e 20 54 68 | right b|race. Th|
|00004510| 65 0a 58 62 72 61 63 65 | 73 20 74 68 65 6d 73 65 |e.Xbrace|s themse|
|00004520| 6c 76 65 73 20 61 72 65 | 20 6e 6f 74 20 69 6e 63 |lves are| not inc|
|00004530| 6c 75 64 65 64 20 69 6e | 20 74 68 65 20 61 72 67 |luded in| the arg|
|00004540| 75 6d 65 6e 74 2e 0a 58 | 4e 6f 20 66 75 72 74 68 |ument..X|No furth|
|00004550| 65 72 20 70 72 6f 63 65 | 73 73 69 6e 67 20 69 73 |er proce|ssing is|
|00004560| 20 64 6f 6e 65 20 6f 6e | 20 74 68 65 20 69 6e 66 | done on| the inf|
|00004570| 6f 72 6d 61 74 69 6f 6e | 20 62 65 74 77 65 65 6e |ormation| between|
|00004580| 20 74 68 65 20 62 72 61 | 63 65 73 2e 0a 58 2e 49 | the bra|ces..X.I|
|00004590| 50 20 5b 36 5d 0a 58 44 | 6f 75 62 6c 65 2d 71 75 |P [6].XD|ouble-qu|
|000045a0| 6f 74 65 73 20 61 63 74 | 20 74 68 65 20 73 61 6d |otes act| the sam|
|000045b0| 65 20 61 73 20 62 72 61 | 63 65 73 20 65 78 63 65 |e as bra|ces exce|
|000045c0| 70 74 20 74 68 61 74 20 | 74 68 65 79 20 63 61 6e |pt that |they can|
|000045d0| 6e 6f 74 20 62 65 20 6e | 65 73 74 65 64 2e 0a 58 |not be n|ested..X|
|000045e0| 2e 49 50 20 5b 37 5d 0a | 58 49 66 20 61 20 66 69 |.IP [7].|XIf a fi|
|000045f0| 65 6c 64 20 64 6f 65 73 | 6e 27 74 20 62 65 67 69 |eld does|n't begi|
|00004600| 6e 20 77 69 74 68 20 61 | 20 6c 65 66 74 20 62 72 |n with a| left br|
|00004610| 61 63 65 20 6f 72 20 64 | 6f 75 62 6c 65 2d 71 75 |ace or d|ouble-qu|
|00004620| 6f 74 65 2c 20 74 68 65 | 6e 20 62 61 63 6b 73 6c |ote, the|n backsl|
|00004630| 61 73 68 2c 0a 58 76 61 | 72 69 61 62 6c 65 2c 20 |ash,.Xva|riable, |
|00004640| 61 6e 64 20 63 6f 6d 6d | 61 6e 64 20 73 75 62 73 |and comm|and subs|
|00004650| 74 69 74 75 74 69 6f 6e | 20 61 72 65 20 64 6f 6e |titution| are don|
|00004660| 65 20 6f 6e 20 74 68 65 | 20 66 69 65 6c 64 2e 20 |e on the| field. |
|00004670| 20 4f 6e 6c 79 20 61 0a | 58 73 69 6e 67 6c 65 20 | Only a.|Xsingle |
|00004680| 6c 65 76 65 6c 20 6f 66 | 20 70 72 6f 63 65 73 73 |level of| process|
|00004690| 69 6e 67 20 69 73 20 64 | 6f 6e 65 3a 20 20 74 68 |ing is d|one: th|
|000046a0| 65 20 72 65 73 75 6c 74 | 73 20 6f 66 20 6f 6e 65 |e result|s of one|
|000046b0| 20 73 75 62 73 74 69 74 | 75 74 69 6f 6e 0a 58 61 | substit|ution.Xa|
|000046c0| 72 65 20 6e 6f 74 20 73 | 63 61 6e 6e 65 64 20 61 |re not s|canned a|
|000046d0| 67 61 69 6e 20 66 6f 72 | 20 66 75 72 74 68 65 72 |gain for| further|
|000046e0| 20 73 75 62 73 74 69 74 | 75 74 69 6f 6e 73 20 6f | substit|utions o|
|000046f0| 72 20 61 6e 79 20 6f 74 | 68 65 72 0a 58 73 70 65 |r any ot|her.Xspe|
|00004700| 63 69 61 6c 20 74 72 65 | 61 74 6d 65 6e 74 2e 20 |cial tre|atment. |
|00004710| 20 53 75 62 73 74 69 74 | 75 74 69 6f 6e 20 63 61 | Substit|ution ca|
|00004720| 6e 0a 58 6f 63 63 75 72 | 20 6f 6e 20 5c 66 49 61 |n.Xoccur| on \fIa|
|00004730| 6e 79 5c 66 52 20 66 69 | 65 6c 64 20 6f 66 20 61 |ny\fR fi|eld of a|
|00004740| 20 63 6f 6d 6d 61 6e 64 | 2c 20 69 6e 63 6c 75 64 | command|, includ|
|00004750| 69 6e 67 20 74 68 65 20 | 63 6f 6d 6d 61 6e 64 20 |ing the |command |
|00004760| 6e 61 6d 65 0a 58 61 73 | 20 77 65 6c 6c 20 61 73 |name.Xas| well as|
|00004770| 20 74 68 65 20 61 72 67 | 75 6d 65 6e 74 73 2e 0a | the arg|uments..|
|00004780| 58 2e 49 50 20 5b 38 5d | 0a 58 49 66 20 74 68 65 |X.IP [8]|.XIf the|
|00004790| 20 66 69 72 73 74 20 6e | 6f 6e 2d 62 6c 61 6e 6b | first n|on-blank|
|000047a0| 20 63 68 61 72 61 63 74 | 65 72 20 6f 66 20 61 20 | charact|er of a |
|000047b0| 63 6f 6d 6d 61 6e 64 20 | 69 73 20 61 20 5c 66 42 |command |is a \fB|
|000047c0| 23 5c 66 52 2c 20 65 76 | 65 72 79 74 68 69 6e 67 |#\fR, ev|erything|
|000047d0| 0a 58 66 72 6f 6d 20 74 | 68 65 20 5c 66 42 23 5c |.Xfrom t|he \fB#\|
|000047e0| 66 52 20 75 70 20 74 68 | 72 6f 75 67 68 20 74 68 |fR up th|rough th|
|000047f0| 65 20 6e 65 78 74 20 6e | 65 77 6c 69 6e 65 20 69 |e next n|ewline i|
|00004800| 73 20 74 72 65 61 74 65 | 64 20 61 73 20 61 20 63 |s treate|d as a c|
|00004810| 6f 6d 6d 65 6e 74 0a 58 | 61 6e 64 20 69 67 6e 6f |omment.X|and igno|
|00004820| 72 65 64 2e 0a 58 0a 58 | 2e 53 48 20 22 45 58 50 |red..X.X|.SH "EXP|
|00004830| 52 45 53 53 49 4f 4e 53 | 22 0a 58 2e 50 50 0a 58 |RESSIONS|".X.PP.X|
|00004840| 54 68 65 20 73 65 63 6f | 6e 64 20 6d 61 6a 6f 72 |The seco|nd major|
|00004850| 20 69 6e 74 65 72 70 72 | 65 74 61 74 69 6f 6e 20 | interpr|etation |
|00004860| 61 70 70 6c 69 65 64 20 | 74 6f 20 73 74 72 69 6e |applied |to strin|
|00004870| 67 73 20 69 6e 20 54 63 | 6c 20 69 73 0a 58 61 73 |gs in Tc|l is.Xas|
|00004880| 20 65 78 70 72 65 73 73 | 69 6f 6e 73 2e 20 20 53 | express|ions. S|
|00004890| 65 76 65 72 61 6c 20 63 | 6f 6d 6d 61 6e 64 73 2c |everal c|ommands,|
|000048a0| 20 73 75 63 68 20 61 73 | 20 5c 66 42 65 78 70 72 | such as| \fBexpr|
|000048b0| 5c 66 52 2c 20 5c 66 42 | 66 6f 72 5c 66 52 2c 0a |\fR, \fB|for\fR,.|
|000048c0| 58 61 6e 64 20 5c 66 42 | 69 66 5c 66 52 2c 20 74 |Xand \fB|if\fR, t|
|000048d0| 72 65 61 74 20 73 6f 6d | 65 20 6f 66 20 74 68 65 |reat som|e of the|
|000048e0| 69 72 20 61 72 67 75 6d | 65 6e 74 73 20 61 73 20 |ir argum|ents as |
|000048f0| 65 78 70 72 65 73 73 69 | 6f 6e 73 20 61 6e 64 0a |expressi|ons and.|
|00004900| 58 63 61 6c 6c 20 74 68 | 65 20 54 63 6c 20 65 78 |Xcall th|e Tcl ex|
|00004910| 70 72 65 73 73 69 6f 6e | 20 70 72 6f 63 65 73 73 |pression| process|
|00004920| 6f 72 20 28 5c 66 42 54 | 63 6c 5f 45 78 70 72 5c |or (\fBT|cl_Expr\|
|00004930| 66 52 29 20 74 6f 20 65 | 76 61 6c 75 61 74 65 20 |fR) to e|valuate |
|00004940| 74 68 65 6d 2e 0a 58 41 | 20 54 63 6c 20 65 78 70 |them..XA| Tcl exp|
|00004950| 72 65 73 73 69 6f 6e 20 | 68 61 73 20 43 2d 6c 69 |ression |has C-li|
|00004960| 6b 65 20 73 79 6e 74 61 | 78 20 61 6e 64 20 65 76 |ke synta|x and ev|
|00004970| 61 6c 75 61 74 65 73 20 | 74 6f 20 61 6e 20 69 6e |aluates |to an in|
|00004980| 74 65 67 65 72 0a 58 72 | 65 73 75 6c 74 2e 20 20 |teger.Xr|esult. |
|00004990| 45 78 70 72 65 73 73 69 | 6f 6e 73 0a 58 6d 61 79 |Expressi|ons.Xmay|
|000049a0| 20 63 6f 6e 74 61 69 6e | 20 69 6e 74 65 67 65 72 | contain| integer|
|000049b0| 20 76 61 6c 75 65 73 2c | 20 76 61 72 69 61 62 6c | values,| variabl|
|000049c0| 65 20 6e 61 6d 65 73 20 | 69 6e 20 5c 66 42 24 5c |e names |in \fB$\|
|000049d0| 66 52 20 6e 6f 74 61 74 | 69 6f 6e 0a 58 28 74 68 |fR notat|ion.X(th|
|000049e0| 65 20 76 61 72 69 61 62 | 6c 65 73 27 20 76 61 6c |e variab|les' val|
|000049f0| 75 65 73 20 6d 75 73 74 | 20 62 65 20 69 6e 74 65 |ues must| be inte|
|00004a00| 67 65 72 20 73 74 72 69 | 6e 67 73 29 2c 0a 58 63 |ger stri|ngs),.Xc|
|00004a10| 6f 6d 6d 61 6e 64 73 20 | 28 65 6d 62 65 64 64 65 |ommands |(embedde|
|00004a20| 64 20 69 6e 20 62 72 61 | 63 6b 65 74 73 29 20 74 |d in bra|ckets) t|
|00004a30| 68 61 74 20 70 72 6f 64 | 75 63 65 20 69 6e 74 65 |hat prod|uce inte|
|00004a40| 67 65 72 20 73 74 72 69 | 6e 67 20 72 65 73 75 6c |ger stri|ng resul|
|00004a50| 74 73 2c 0a 58 70 61 72 | 65 6e 74 68 65 73 65 73 |ts,.Xpar|entheses|
|00004a60| 20 66 6f 72 20 67 72 6f | 75 70 69 6e 67 2c 20 61 | for gro|uping, a|
|00004a70| 6e 64 20 6f 70 65 72 61 | 74 6f 72 73 2e 20 20 4e |nd opera|tors. N|
|00004a80| 75 6d 65 72 69 63 20 76 | 61 6c 75 65 73 2c 20 77 |umeric v|alues, w|
|00004a90| 68 65 74 68 65 72 20 74 | 68 65 79 0a 58 61 72 65 |hether t|hey.Xare|
|00004aa0| 20 70 61 73 73 65 64 20 | 64 69 72 65 63 74 6c 79 | passed |directly|
|00004ab0| 20 6f 72 20 74 68 72 6f | 75 67 68 20 76 61 72 69 | or thro|ugh vari|
|00004ac0| 61 62 6c 65 20 6f 72 20 | 63 6f 6d 6d 61 6e 64 20 |able or |command |
|00004ad0| 73 75 62 73 74 69 74 75 | 74 69 6f 6e 2c 20 6d 61 |substitu|tion, ma|
|00004ae0| 79 0a 58 62 65 20 73 70 | 65 63 69 66 69 65 64 20 |y.Xbe sp|ecified |
|00004af0| 65 69 74 68 65 72 20 69 | 6e 20 64 65 63 69 6d 61 |either i|n decima|
|00004b00| 6c 20 28 74 68 65 20 6e | 6f 72 6d 61 6c 20 63 61 |l (the n|ormal ca|
|00004b10| 73 65 29 2c 20 69 6e 20 | 6f 63 74 61 6c 20 28 69 |se), in |octal (i|
|00004b20| 66 20 74 68 65 0a 58 66 | 69 72 73 74 20 63 68 61 |f the.Xf|irst cha|
|00004b30| 72 61 63 74 65 72 20 6f | 66 20 74 68 65 20 76 61 |racter o|f the va|
|00004b40| 6c 75 65 20 69 73 20 5c | 66 42 30 5c 66 52 29 2c |lue is \|fB0\fR),|
|00004b50| 20 6f 72 20 69 6e 20 68 | 65 78 61 64 65 63 69 6d | or in h|exadecim|
|00004b60| 61 6c 20 28 69 66 20 74 | 68 65 20 66 69 72 73 74 |al (if t|he first|
|00004b70| 0a 58 74 77 6f 20 63 68 | 61 72 61 63 74 65 72 73 |.Xtwo ch|aracters|
|00004b80| 20 6f 66 20 74 68 65 20 | 76 61 6c 75 65 20 61 72 | of the |value ar|
|00004b90| 65 20 5c 66 42 30 78 5c | 66 52 29 2e 0a 58 54 68 |e \fB0x\|fR)..XTh|
|00004ba0| 65 20 76 61 6c 69 64 20 | 6f 70 65 72 61 74 6f 72 |e valid |operator|
|00004bb0| 73 20 61 72 65 20 6c 69 | 73 74 65 64 0a 58 62 65 |s are li|sted.Xbe|
|00004bc0| 6c 6f 77 2c 20 67 72 6f | 75 70 65 64 20 69 6e 20 |low, gro|uped in |
|00004bd0| 64 65 63 72 65 61 73 69 | 6e 67 20 6f 72 64 65 72 |decreasi|ng order|
|00004be0| 20 6f 66 20 70 72 65 63 | 65 64 65 6e 63 65 3a 0a | of prec|edence:.|
|00004bf0| 58 2e 54 50 20 32 30 0a | 58 5c 66 42 5c 2d 5c 30 |X.TP 20.|X\fB\-\0|
|00004c00| 5c 30 7e 5c 30 5c 30 21 | 5c 66 52 0a 58 55 6e 61 |\0~\0\0!|\fR.XUna|
|00004c10| 72 79 20 6d 69 6e 75 73 | 2c 20 62 69 74 2d 77 69 |ry minus|, bit-wi|
|00004c20| 73 65 20 4e 4f 54 2c 20 | 6c 6f 67 69 63 61 6c 20 |se NOT, |logical |
|00004c30| 4e 4f 54 2e 0a 58 2e 54 | 50 20 32 30 0a 58 5c 66 |NOT..X.T|P 20.X\f|
|00004c40| 42 2a 5c 30 5c 30 2f 5c | 30 5c 30 25 5c 66 52 0a |B*\0\0/\|0\0%\fR.|
|00004c50| 58 4d 75 6c 74 69 70 6c | 79 2c 20 64 69 76 69 64 |XMultipl|y, divid|
|00004c60| 65 2c 20 72 65 6d 61 69 | 6e 64 65 72 2e 0a 58 2e |e, remai|nder..X.|
|00004c70| 54 50 20 32 30 0a 58 5c | 66 42 2b 5c 30 5c 30 5c |TP 20.X\|fB+\0\0\|
|00004c80| 2d 5c 66 52 0a 58 41 64 | 64 20 61 6e 64 20 73 75 |-\fR.XAd|d and su|
|00004c90| 62 74 72 61 63 74 2e 0a | 58 2e 54 50 20 32 30 0a |btract..|X.TP 20.|
|00004ca0| 58 5c 66 42 3c 3c 5c 30 | 5c 30 3e 3e 5c 66 52 0a |X\fB<<\0|\0>>\fR.|
|00004cb0| 58 4c 65 66 74 20 61 6e | 64 20 72 69 67 68 74 20 |XLeft an|d right |
|00004cc0| 73 68 69 66 74 2e 0a 58 | 2e 54 50 20 32 30 0a 58 |shift..X|.TP 20.X|
|00004cd0| 5c 66 42 3c 5c 30 5c 30 | 3e 5c 30 5c 30 3c 3d 5c |\fB<\0\0|>\0\0<=\|
|00004ce0| 30 5c 30 3e 3d 5c 66 52 | 0a 58 42 6f 6f 6c 65 61 |0\0>=\fR|.XBoolea|
|00004cf0| 6e 20 6c 65 73 73 2c 20 | 67 72 65 61 74 65 72 2c |n less, |greater,|
|00004d00| 20 6c 65 73 73 20 74 68 | 61 6e 20 6f 72 20 65 71 | less th|an or eq|
|00004d10| 75 61 6c 2c 20 61 6e 64 | 20 67 72 65 61 74 65 72 |ual, and| greater|
|00004d20| 20 74 68 61 6e 20 6f 72 | 20 65 71 75 61 6c 2e 0a | than or| equal..|
|00004d30| 58 45 61 63 68 20 6f 70 | 65 72 61 74 6f 72 20 70 |XEach op|erator p|
|00004d40| 72 6f 64 75 63 65 73 20 | 31 20 69 66 20 74 68 65 |roduces |1 if the|
|00004d50| 20 63 6f 6e 64 69 74 69 | 6f 6e 20 69 73 20 74 72 | conditi|on is tr|
|00004d60| 75 65 2c 20 30 20 6f 74 | 68 65 72 77 69 73 65 2e |ue, 0 ot|herwise.|
|00004d70| 0a 58 2e 54 50 20 32 30 | 0a 58 5c 66 42 3d 3d 5c |.X.TP 20|.X\fB==\|
|00004d80| 30 5c 30 21 3d 5c 66 52 | 0a 58 42 6f 6f 6c 65 61 |0\0!=\fR|.XBoolea|
|00004d90| 6e 20 65 71 75 61 6c 20 | 61 6e 64 20 6e 6f 74 20 |n equal |and not |
|00004da0| 65 71 75 61 6c 2e 20 20 | 45 61 63 68 20 6f 70 65 |equal. |Each ope|
|00004db0| 72 61 74 6f 72 20 70 72 | 6f 64 75 63 65 73 20 61 |rator pr|oduces a|
|00004dc0| 20 7a 65 72 6f 2f 6f 6e | 65 20 72 65 73 75 6c 74 | zero/on|e result|
|00004dd0| 2e 0a 58 2e 54 50 20 32 | 30 0a 58 5c 66 42 26 5c |..X.TP 2|0.X\fB&\|
|00004de0| 66 52 0a 58 42 69 74 2d | 77 69 73 65 20 41 4e 44 |fR.XBit-|wise AND|
|00004df0| 2e 0a 58 2e 54 50 20 32 | 30 0a 58 5c 66 42 5e 5c |..X.TP 2|0.X\fB^\|
|00004e00| 66 52 0a 58 42 69 74 2d | 77 69 73 65 20 65 78 63 |fR.XBit-|wise exc|
|00004e10| 6c 75 73 69 76 65 20 4f | 52 2e 0a 58 2e 54 50 20 |lusive O|R..X.TP |
|00004e20| 32 30 0a 58 5c 66 42 7c | 5c 66 52 0a 58 42 69 74 |20.X\fB||\fR.XBit|
|00004e30| 2d 77 69 73 65 20 4f 52 | 2e 0a 58 2e 54 50 20 32 |-wise OR|..X.TP 2|
|00004e40| 30 0a 58 5c 66 42 26 26 | 5c 66 52 0a 58 4c 6f 67 |0.X\fB&&|\fR.XLog|
|00004e50| 69 63 61 6c 20 41 4e 44 | 2e 20 20 50 72 6f 64 75 |ical AND|. Produ|
|00004e60| 63 65 73 20 61 20 31 20 | 72 65 73 75 6c 74 20 69 |ces a 1 |result i|
|00004e70| 66 20 62 6f 74 68 20 6f | 70 65 72 61 6e 64 73 20 |f both o|perands |
|00004e80| 61 72 65 20 6e 6f 6e 2d | 7a 65 72 6f 2c 20 30 20 |are non-|zero, 0 |
|00004e90| 6f 74 68 65 72 77 69 73 | 65 2e 0a 58 2e 54 50 20 |otherwis|e..X.TP |
|00004ea0| 32 30 0a 58 5c 66 42 7c | 7c 5c 66 52 0a 58 4c 6f |20.X\fB|||\fR.XLo|
|00004eb0| 67 69 63 61 6c 20 4f 52 | 2e 20 20 50 72 6f 64 75 |gical OR|. Produ|
|00004ec0| 63 65 73 20 61 20 30 20 | 72 65 73 75 6c 74 20 69 |ces a 0 |result i|
|00004ed0| 66 20 62 6f 74 68 20 6f | 70 65 72 61 6e 64 73 20 |f both o|perands |
|00004ee0| 61 72 65 20 7a 65 72 6f | 2c 20 31 20 6f 74 68 65 |are zero|, 1 othe|
|00004ef0| 72 77 69 73 65 2e 0a 58 | 2e 50 50 0a 58 53 65 65 |rwise..X|.PP.XSee|
|00004f00| 20 74 68 65 20 43 20 6d | 61 6e 75 61 6c 20 66 6f | the C m|anual fo|
|00004f10| 72 20 6d 6f 72 65 20 64 | 65 74 61 69 6c 73 20 6f |r more d|etails o|
|00004f20| 6e 20 74 68 65 20 72 65 | 73 75 6c 74 73 0a 58 70 |n the re|sults.Xp|
|00004f30| 72 6f 64 75 63 65 64 20 | 62 79 20 65 61 63 68 20 |roduced |by each |
|00004f40| 6f 70 65 72 61 74 6f 72 | 2e 0a 58 41 6c 6c 20 6f |operator|..XAll o|
|00004f50| 66 20 74 68 65 20 62 69 | 6e 61 72 79 20 6f 70 65 |f the bi|nary ope|
|00004f60| 72 61 74 6f 72 73 20 67 | 72 6f 75 70 20 6c 65 66 |rators g|roup lef|
|00004f70| 74 2d 74 6f 2d 72 69 67 | 68 74 20 77 69 74 68 69 |t-to-rig|ht withi|
|00004f80| 6e 20 74 68 65 20 73 61 | 6d 65 0a 58 70 72 65 63 |n the sa|me.Xprec|
|00004f90| 65 64 65 6e 63 65 20 6c | 65 76 65 6c 2e 20 20 46 |edence l|evel. F|
|00004fa0| 6f 72 20 65 78 61 6d 70 | 6c 65 2c 20 74 68 65 20 |or examp|le, the |
|00004fb0| 65 78 70 72 65 73 73 69 | 6f 6e 0a 58 2e 44 53 0a |expressi|on.X.DS.|
|00004fc0| 58 5c 66 42 28 34 2a 32 | 29 20 3c 20 37 5c 66 52 |X\fB(4*2|) < 7\fR|
|00004fd0| 0a 58 2e 44 45 0a 58 65 | 76 61 6c 75 61 74 65 73 |.X.DE.Xe|valuates|
|00004fe0| 20 74 6f 20 30 2e 20 20 | 45 76 61 6c 75 61 74 69 | to 0. |Evaluati|
|00004ff0| 6e 67 20 74 68 65 20 65 | 78 70 72 65 73 73 69 6f |ng the e|xpressio|
|00005000| 6e 20 73 74 72 69 6e 67 | 0a 58 2e 44 53 0a 58 5c |n string|.X.DS.X\|
|00005010| 66 42 28 24 61 20 2b 20 | 33 29 20 3c 20 5b 73 65 |fB($a + |3) < [se|
|00005020| 74 20 62 5d 5c 66 52 0a | 58 2e 44 45 0a 58 77 69 |t b]\fR.|X.DE.Xwi|
|00005030| 6c 6c 20 63 61 75 73 65 | 20 74 68 65 20 76 61 6c |ll cause| the val|
|00005040| 75 65 73 20 6f 66 20 74 | 68 65 20 76 61 72 69 61 |ues of t|he varia|
|00005050| 62 6c 65 73 20 5c 66 42 | 61 5c 66 52 20 61 6e 64 |bles \fB|a\fR and|
|00005060| 20 5c 66 42 62 5c 66 52 | 20 74 6f 20 62 65 0a 58 | \fBb\fR| to be.X|
|00005070| 65 78 61 6d 69 6e 65 64 | 3b 20 20 74 68 65 20 72 |examined|; the r|
|00005080| 65 73 75 6c 74 20 77 69 | 6c 6c 20 62 65 20 31 0a |esult wi|ll be 1.|
|00005090| 58 69 66 20 5c 66 42 62 | 5c 66 52 20 69 73 20 67 |Xif \fBb|\fR is g|
|000050a0| 72 65 61 74 65 72 20 74 | 68 61 6e 20 61 20 62 79 |reater t|han a by|
|000050b0| 20 61 74 20 6c 65 61 73 | 74 20 33 3b 20 20 6f 74 | at leas|t 3; ot|
|000050c0| 68 65 72 77 69 73 65 20 | 74 68 65 20 72 65 73 75 |herwise |the resu|
|000050d0| 6c 74 0a 58 77 69 6c 6c | 20 62 65 20 30 2e 0a 58 |lt.Xwill| be 0..X|
|000050e0| 2e 50 50 0a 58 49 6e 20 | 67 65 6e 65 72 61 6c 20 |.PP.XIn |general |
|000050f0| 69 74 20 69 73 20 73 61 | 66 65 73 74 20 74 6f 20 |it is sa|fest to |
|00005100| 65 6e 63 6c 6f 73 65 20 | 61 6e 20 65 78 70 72 65 |enclose |an expre|
|00005110| 73 73 69 6f 6e 20 69 6e | 20 62 72 61 63 65 73 20 |ssion in| braces |
|00005120| 77 68 65 6e 0a 58 65 6e | 74 65 72 69 6e 67 20 69 |when.Xen|tering i|
|00005130| 74 20 69 6e 20 61 20 63 | 6f 6d 6d 61 6e 64 3a 20 |t in a c|ommand: |
|00005140| 20 6f 74 68 65 72 77 69 | 73 65 2c 20 69 66 20 74 | otherwi|se, if t|
|00005150| 68 65 20 65 78 70 72 65 | 73 73 69 6f 6e 20 63 6f |he expre|ssion co|
|00005160| 6e 74 61 69 6e 73 0a 58 | 61 6e 79 20 77 68 69 74 |ntains.X|any whit|
|00005170| 65 20 73 70 61 63 65 20 | 74 68 65 6e 20 74 68 65 |e space |then the|
|00005180| 20 54 63 6c 20 69 6e 74 | 65 72 70 72 65 74 65 72 | Tcl int|erpreter|
|00005190| 20 77 69 6c 6c 20 73 70 | 6c 69 74 20 69 74 0a 58 | will sp|lit it.X|
|000051a0| 61 6d 6f 6e 67 20 73 65 | 76 65 72 61 6c 20 61 72 |among se|veral ar|
|000051b0| 67 75 6d 65 6e 74 73 2e | 20 20 46 6f 72 20 65 78 |guments.| For ex|
|000051c0| 61 6d 70 6c 65 2c 20 74 | 68 65 20 63 6f 6d 6d 61 |ample, t|he comma|
|000051d0| 6e 64 0a 58 2e 44 53 20 | 43 0a 58 5c 66 42 65 78 |nd.X.DS |C.X\fBex|
|000051e0| 70 72 20 24 61 20 2b 20 | 24 62 5c 66 52 0a 58 2e |pr $a + |$b\fR.X.|
|000051f0| 44 45 0a 58 72 65 73 75 | 6c 74 73 20 69 6e 20 74 |DE.Xresu|lts in t|
|00005200| 68 72 65 65 20 61 72 67 | 75 6d 65 6e 74 73 20 62 |hree arg|uments b|
|00005210| 65 69 6e 67 20 70 61 73 | 73 65 64 20 74 6f 20 5c |eing pas|sed to \|
|00005220| 66 42 65 78 70 72 5c 66 | 52 3a 20 20 5c 66 42 24 |fBexpr\f|R: \fB$|
|00005230| 61 5c 66 52 2c 0a 58 5c | 66 42 2b 5c 66 52 2c 20 |a\fR,.X\|fB+\fR, |
|00005240| 61 6e 64 20 5c 66 42 24 | 62 5c 66 52 2e 20 20 49 |and \fB$|b\fR. I|
|00005250| 6e 20 61 64 64 69 74 69 | 6f 6e 2c 20 69 66 20 74 |n additi|on, if t|
|00005260| 68 65 20 65 78 70 72 65 | 73 73 69 6f 6e 20 69 73 |he expre|ssion is|
|00005270| 6e 27 74 20 69 6e 20 62 | 72 61 63 65 73 0a 58 74 |n't in b|races.Xt|
|00005280| 68 65 6e 20 74 68 65 20 | 54 63 6c 20 69 6e 74 65 |hen the |Tcl inte|
|00005290| 72 70 72 65 74 65 72 20 | 77 69 6c 6c 20 70 65 72 |rpreter |will per|
|000052a0| 66 6f 72 6d 20 76 61 72 | 69 61 62 6c 65 20 61 6e |form var|iable an|
|000052b0| 64 20 63 6f 6d 6d 61 6e | 64 20 73 75 62 73 74 69 |d comman|d substi|
|000052c0| 74 75 74 69 6f 6e 0a 58 | 69 6d 6d 65 64 69 61 74 |tution.X|immediat|
|000052d0| 65 6c 79 20 28 69 74 20 | 77 69 6c 6c 20 68 61 70 |ely (it |will hap|
|000052e0| 70 65 6e 20 69 6e 20 74 | 68 65 20 63 6f 6d 6d 61 |pen in t|he comma|
|000052f0| 6e 64 20 70 61 72 73 65 | 72 20 72 61 74 68 65 72 |nd parse|r rather|
|00005300| 20 74 68 61 6e 20 69 6e | 0a 58 74 68 65 20 65 78 | than in|.Xthe ex|
|00005310| 70 72 65 73 73 69 6f 6e | 20 70 61 72 73 65 72 29 |pression| parser)|
|00005320| 2e 20 20 49 6e 20 6d 61 | 6e 79 20 63 61 73 65 73 |. In ma|ny cases|
|00005330| 20 74 68 65 20 65 78 70 | 72 65 73 73 69 6f 6e 20 | the exp|ression |
|00005340| 69 73 20 62 65 69 6e 67 | 0a 58 70 61 73 73 65 64 |is being|.Xpassed|
|00005350| 20 74 6f 20 61 20 63 6f | 6d 6d 61 6e 64 20 74 68 | to a co|mmand th|
|00005360| 61 74 20 77 69 6c 6c 20 | 65 76 61 6c 75 61 74 65 |at will |evaluate|
|00005370| 20 74 68 65 20 65 78 70 | 72 65 73 73 69 6f 6e 20 | the exp|ression |
|00005380| 6c 61 74 65 72 20 28 6f | 72 0a 58 65 76 65 6e 20 |later (o|r.Xeven |
|00005390| 6d 61 6e 79 20 74 69 6d | 65 73 20 69 66 2c 20 66 |many tim|es if, f|
|000053a0| 6f 72 20 65 78 61 6d 70 | 6c 65 2c 20 74 68 65 20 |or examp|le, the |
|000053b0| 65 78 70 72 65 73 73 69 | 6f 6e 20 69 73 20 74 6f |expressi|on is to|
|000053c0| 20 62 65 20 75 73 65 64 | 20 74 6f 0a 58 64 65 63 | be used| to.Xdec|
|000053d0| 69 64 65 20 77 68 65 6e | 20 74 6f 20 65 78 69 74 |ide when| to exit|
|000053e0| 20 61 20 6c 6f 6f 70 29 | 2e 20 20 55 73 75 61 6c | a loop)|. Usual|
|000053f0| 6c 79 20 74 68 65 20 64 | 65 73 69 72 65 64 20 67 |ly the d|esired g|
|00005400| 6f 61 6c 20 69 73 20 74 | 6f 20 72 65 2d 64 6f 0a |oal is t|o re-do.|
|00005410| 58 74 68 65 20 76 61 72 | 69 61 62 6c 65 20 6f 72 |Xthe var|iable or|
|00005420| 20 63 6f 6d 6d 61 6e 64 | 20 73 75 62 73 74 69 74 | command| substit|
|00005430| 75 74 69 6f 6e 73 20 65 | 61 63 68 20 74 69 6d 65 |utions e|ach time|
|00005440| 20 74 68 65 20 65 78 70 | 72 65 73 73 69 6f 6e 20 | the exp|ression |
|00005450| 69 73 0a 58 65 76 61 6c | 75 61 74 65 64 2c 20 72 |is.Xeval|uated, r|
|00005460| 61 74 68 65 72 20 74 68 | 61 6e 20 6f 6e 63 65 20 |ather th|an once |
|00005470| 61 6e 64 20 66 6f 72 20 | 61 6c 6c 20 61 74 20 74 |and for |all at t|
|00005480| 68 65 20 62 65 67 69 6e | 6e 69 6e 67 2e 20 20 46 |he begin|ning. F|
|00005490| 6f 72 20 65 78 61 6d 70 | 6c 65 2c 0a 58 74 68 65 |or examp|le,.Xthe|
|000054a0| 20 63 6f 6d 6d 61 6e 64 | 0a 58 2e 44 53 20 43 0a | command|.X.DS C.|
|000054b0| 58 5c 66 42 66 6f 72 20 | 7b 73 65 74 20 69 20 31 |X\fBfor |{set i 1|
|000054c0| 7d 20 24 69 3c 3d 31 30 | 20 7b 73 65 74 20 69 20 |} $i<=10| {set i |
|000054d0| 5b 65 78 70 72 20 24 69 | 2b 31 5d 7d 20 7b 2e 2e |[expr $i|+1]} {..|
|000054e0| 2e 7d 5c 66 52 0a 58 2e | 44 45 0a 58 69 73 20 70 |.}\fR.X.|DE.Xis p|
|000054f0| 72 6f 62 61 62 6c 79 20 | 69 6e 74 65 6e 64 65 64 |robably |intended|
|00005500| 20 74 6f 20 69 74 65 72 | 61 74 65 20 6f 76 65 72 | to iter|ate over|
|00005510| 20 61 6c 6c 20 76 61 6c | 75 65 73 20 6f 66 20 5c | all val|ues of \|
|00005520| 66 42 69 5c 66 52 20 66 | 72 6f 6d 20 31 20 74 6f |fBi\fR f|rom 1 to|
|00005530| 20 31 30 2e 0a 58 41 66 | 74 65 72 20 65 61 63 68 | 10..XAf|ter each|
|00005540| 20 69 74 65 72 61 74 69 | 6f 6e 20 6f 66 20 74 68 | iterati|on of th|
|00005550| 65 20 62 6f 64 79 20 6f | 66 20 74 68 65 20 6c 6f |e body o|f the lo|
|00005560| 6f 70 2c 20 5c 66 42 66 | 6f 72 5c 66 52 20 77 69 |op, \fBf|or\fR wi|
|00005570| 6c 6c 20 70 61 73 73 0a | 58 69 74 73 20 73 65 63 |ll pass.|Xits sec|
|00005580| 6f 6e 64 20 61 72 67 75 | 6d 65 6e 74 20 74 6f 20 |ond argu|ment to |
|00005590| 74 68 65 20 65 78 70 72 | 65 73 73 69 6f 6e 20 65 |the expr|ession e|
|000055a0| 76 61 6c 75 61 74 6f 72 | 20 74 6f 20 73 65 65 20 |valuator| to see |
|000055b0| 77 68 65 74 68 65 72 20 | 6f 72 20 6e 6f 74 0a 58 |whether |or not.X|
|000055c0| 74 6f 20 63 6f 6e 74 69 | 6e 75 65 20 70 72 6f 63 |to conti|nue proc|
|000055d0| 65 73 73 69 6e 67 2e 20 | 20 55 6e 66 6f 72 74 75 |essing. | Unfortu|
|000055e0| 6e 61 74 65 6c 79 2c 20 | 69 6e 20 74 68 69 73 20 |nately, |in this |
|000055f0| 63 61 73 65 20 74 68 65 | 20 76 61 6c 75 65 20 6f |case the| value o|
|00005600| 66 20 5c 66 42 69 5c 66 | 52 0a 58 69 6e 20 74 68 |f \fBi\f|R.Xin th|
|00005610| 65 20 73 65 63 6f 6e 64 | 20 61 72 67 75 6d 65 6e |e second| argumen|
|00005620| 74 20 77 69 6c 6c 20 62 | 65 20 73 75 62 73 74 69 |t will b|e substi|
|00005630| 74 75 74 65 64 20 6f 6e | 63 65 20 61 6e 64 20 66 |tuted on|ce and f|
|00005640| 6f 72 20 61 6c 6c 20 77 | 68 65 6e 20 74 68 65 0a |or all w|hen the.|
|00005650| 58 5c 66 42 66 6f 72 5c | 66 52 20 63 6f 6d 6d 61 |X\fBfor\|fR comma|
|00005660| 6e 64 20 69 73 20 70 61 | 72 73 65 64 2e 20 20 49 |nd is pa|rsed. I|
|00005670| 66 20 5c 66 42 69 5c 66 | 52 20 77 61 73 20 30 20 |f \fBi\f|R was 0 |
|00005680| 62 65 66 6f 72 65 20 74 | 68 65 20 5c 66 42 66 6f |before t|he \fBfo|
|00005690| 72 5c 66 52 0a 58 63 6f | 6d 6d 61 6e 64 20 77 61 |r\fR.Xco|mmand wa|
|000056a0| 73 20 69 6e 76 6f 6b 65 | 64 20 74 68 65 6e 20 5c |s invoke|d then \|
|000056b0| 66 42 66 6f 72 5c 66 52 | 27 73 20 73 65 63 6f 6e |fBfor\fR|'s secon|
|000056c0| 64 20 61 72 67 75 6d 65 | 6e 74 20 77 69 6c 6c 20 |d argume|nt will |
|000056d0| 62 65 20 5c 66 42 30 3c | 3d 31 30 5c 66 52 0a 58 |be \fB0<|=10\fR.X|
|000056e0| 77 68 69 63 68 20 77 69 | 6c 6c 20 61 6c 77 61 79 |which wi|ll alway|
|000056f0| 73 20 65 76 61 6c 75 61 | 74 65 20 74 6f 20 31 2c |s evalua|te to 1,|
|00005700| 20 65 76 65 6e 20 74 68 | 6f 75 67 68 20 5c 66 42 | even th|ough \fB|
|00005710| 69 5c 66 52 27 73 20 76 | 61 6c 75 65 20 65 76 65 |i\fR's v|alue eve|
|00005720| 6e 74 75 61 6c 6c 79 0a | 58 62 65 63 6f 6d 65 73 |ntually.|Xbecomes|
|00005730| 20 67 72 65 61 74 65 72 | 20 74 68 61 6e 20 31 30 | greater| than 10|
|00005740| 2e 20 20 49 6e 20 74 68 | 65 20 61 62 6f 76 65 20 |. In th|e above |
|00005750| 63 61 73 65 20 74 68 65 | 20 6c 6f 6f 70 20 77 69 |case the| loop wi|
|00005760| 6c 6c 20 6e 65 76 65 72 | 0a 58 74 65 72 6d 69 6e |ll never|.Xtermin|
|00005770| 61 74 65 2e 20 20 42 79 | 20 70 6c 61 63 69 6e 67 |ate. By| placing|
|00005780| 20 74 68 65 20 65 78 70 | 72 65 73 73 69 6f 6e 20 | the exp|ression |
|00005790| 69 6e 20 62 72 61 63 65 | 73 2c 20 74 68 65 0a 58 |in brace|s, the.X|
|000057a0| 73 75 62 73 74 69 74 75 | 74 69 6f 6e 20 6f 66 20 |substitu|tion of |
|000057b0| 5c 66 42 69 5c 66 52 27 | 73 0a 58 76 61 6c 75 65 |\fBi\fR'|s.Xvalue|
|000057c0| 20 77 69 6c 6c 20 62 65 | 20 64 65 6c 61 79 65 64 | will be| delayed|
|000057d0| 3b 20 20 69 74 20 77 69 | 6c 6c 20 62 65 20 72 65 |; it wi|ll be re|
|000057e0| 2d 64 6f 6e 65 20 65 61 | 63 68 20 74 69 6d 65 20 |-done ea|ch time |
|000057f0| 74 68 65 20 65 78 70 72 | 65 73 73 69 6f 6e 20 69 |the expr|ession i|
|00005800| 73 0a 58 65 76 61 6c 75 | 61 74 65 64 2c 20 77 68 |s.Xevalu|ated, wh|
|00005810| 69 63 68 20 69 73 20 70 | 72 6f 62 61 62 6c 79 20 |ich is p|robably |
|00005820| 74 68 65 20 64 65 73 69 | 72 65 64 20 72 65 73 75 |the desi|red resu|
|00005830| 6c 74 2e 0a 58 0a 58 2e | 53 48 20 4c 49 53 54 53 |lt..X.X.|SH LISTS|
|00005840| 0a 58 2e 50 50 0a 58 54 | 68 65 20 74 68 69 72 64 |.X.PP.XT|he third|
|00005850| 20 6d 61 6a 6f 72 20 77 | 61 79 20 74 68 61 74 20 | major w|ay that |
|00005860| 73 74 72 69 6e 67 73 20 | 61 72 65 20 69 6e 74 65 |strings |are inte|
|00005870| 72 70 72 65 74 65 64 20 | 69 6e 20 54 63 6c 20 69 |rpreted |in Tcl i|
|00005880| 73 20 61 73 20 6c 69 73 | 74 73 2e 0a 58 41 20 6c |s as lis|ts..XA l|
|00005890| 69 73 74 20 69 73 20 6a | 75 73 74 20 61 20 73 74 |ist is j|ust a st|
|000058a0| 72 69 6e 67 20 77 69 74 | 68 20 61 20 6c 69 73 74 |ring wit|h a list|
|000058b0| 2d 6c 69 6b 65 20 73 74 | 72 75 63 74 75 72 65 0a |-like st|ructure.|
|000058c0| 58 63 6f 6e 73 69 73 74 | 69 6e 67 20 6f 66 20 66 |Xconsist|ing of f|
|000058d0| 69 65 6c 64 73 20 73 65 | 70 61 72 61 74 65 64 20 |ields se|parated |
|000058e0| 62 79 20 77 68 69 74 65 | 20 73 70 61 63 65 2e 20 |by white| space. |
|000058f0| 20 46 6f 72 20 65 78 61 | 6d 70 6c 65 2c 20 74 68 | For exa|mple, th|
|00005900| 65 0a 58 73 74 72 69 6e | 67 0a 58 2e 44 53 0a 58 |e.Xstrin|g.X.DS.X|
|00005910| 5c 66 42 41 6c 20 53 75 | 65 20 41 6e 6e 65 20 4a |\fBAl Su|e Anne J|
|00005920| 6f 68 6e 5c 66 52 0a 58 | 2e 44 45 0a 58 69 73 20 |ohn\fR.X|.DE.Xis |
|00005930| 61 20 6c 69 73 74 20 77 | 69 74 68 20 66 6f 75 72 |a list w|ith four|
|00005940| 20 65 6c 65 6d 65 6e 74 | 73 20 6f 72 20 66 69 65 | element|s or fie|
|00005950| 6c 64 73 2e 0a 58 4c 69 | 73 74 73 20 68 61 76 65 |lds..XLi|sts have|
|00005960| 20 74 68 65 20 73 61 6d | 65 20 62 61 73 69 63 20 | the sam|e basic |
|00005970| 73 74 72 75 63 74 75 72 | 65 20 61 73 20 63 6f 6d |structur|e as com|
|00005980| 6d 61 6e 64 20 73 74 72 | 69 6e 67 73 2c 20 65 78 |mand str|ings, ex|
|00005990| 63 65 70 74 0a 58 74 68 | 61 74 20 61 20 6e 65 77 |cept.Xth|at a new|
|000059a0| 6c 69 6e 65 20 63 68 61 | 72 61 63 74 65 72 20 69 |line cha|racter i|
|000059b0| 6e 20 61 20 6c 69 73 74 | 20 69 73 20 74 72 65 61 |n a list| is trea|
|000059c0| 74 65 64 20 61 73 20 61 | 20 66 69 65 6c 64 20 73 |ted as a| field s|
|000059d0| 65 70 61 72 61 74 6f 72 | 0a 58 6a 75 73 74 20 6c |eparator|.Xjust l|
|000059e0| 69 6b 65 20 73 70 61 63 | 65 20 6f 72 20 74 61 62 |ike spac|e or tab|
|000059f0| 2e 20 20 43 6f 6e 76 65 | 6e 74 69 6f 6e 73 20 66 |. Conve|ntions f|
|00005a00| 6f 72 20 62 72 61 63 65 | 73 0a 58 61 6e 64 20 62 |or brace|s.Xand b|
|00005a10| 61 63 6b 73 6c 61 73 68 | 65 73 20 61 72 65 20 74 |ackslash|es are t|
|00005a20| 68 65 20 73 61 6d 65 20 | 66 6f 72 20 6c 69 73 74 |he same |for list|
|00005a30| 73 20 61 73 20 66 6f 72 | 20 63 6f 6d 6d 61 6e 64 |s as for| command|
|00005a40| 73 2e 20 20 46 6f 72 20 | 65 78 61 6d 70 6c 65 2c |s. For |example,|
|00005a50| 0a 58 74 68 65 20 73 74 | 72 69 6e 67 0a 58 2e 44 |.Xthe st|ring.X.D|
|00005a60| 53 0a 58 5c 66 42 61 20 | 62 5c 65 20 63 20 7b 64 |S.X\fBa |b\e c {d|
|00005a70| 20 65 20 7b 66 20 67 20 | 68 7d 7d 5c 66 52 0a 58 | e {f g |h}}\fR.X|
|00005a80| 2e 44 45 0a 58 69 73 20 | 61 20 6c 69 73 74 20 77 |.DE.Xis |a list w|
|00005a90| 69 74 68 20 74 68 72 65 | 65 20 65 6c 65 6d 65 6e |ith thre|e elemen|
|00005aa0| 74 73 3a 20 20 5c 66 42 | 61 5c 66 52 2c 20 5c 66 |ts: \fB|a\fR, \f|
|00005ab0| 42 62 20 63 5c 66 52 2c | 20 61 6e 64 20 5c 66 42 |Bb c\fR,| and \fB|
|00005ac0| 64 20 65 20 7b 66 20 67 | 20 68 7d 5c 66 52 2e 0a |d e {f g| h}\fR..|
|00005ad0| 58 57 68 65 6e 65 76 65 | 72 20 61 6e 20 65 6c 65 |XWheneve|r an ele|
|00005ae0| 6d 65 6e 74 0a 58 69 73 | 20 65 78 74 72 61 63 74 |ment.Xis| extract|
|00005af0| 65 64 20 66 72 6f 6d 20 | 61 20 6c 69 73 74 2c 20 |ed from |a list, |
|00005b00| 74 68 65 20 73 61 6d 65 | 20 72 75 6c 65 73 20 61 |the same| rules a|
|00005b10| 62 6f 75 74 20 62 61 63 | 6b 73 6c 61 73 68 65 73 |bout bac|kslashes|
|00005b20| 20 61 6e 64 0a 58 62 72 | 61 63 65 73 20 61 72 65 | and.Xbr|aces are|
|00005b30| 20 61 70 70 6c 69 65 64 | 20 61 73 20 66 6f 72 20 | applied| as for |
|00005b40| 63 6f 6d 6d 61 6e 64 73 | 2e 20 20 54 68 75 73 20 |commands|. Thus |
|00005b50| 69 6e 20 74 68 65 20 65 | 78 61 6d 70 6c 65 20 61 |in the e|xample a|
|00005b60| 62 6f 76 65 0a 58 77 68 | 65 6e 20 74 68 65 20 74 |bove.Xwh|en the t|
|00005b70| 68 69 72 64 20 65 6c 65 | 6d 65 6e 74 20 69 73 20 |hird ele|ment is |
|00005b80| 65 78 74 72 61 63 74 65 | 64 20 66 72 6f 6d 20 74 |extracte|d from t|
|00005b90| 68 65 20 6c 69 73 74 2c | 20 74 68 65 20 72 65 73 |he list,| the res|
|00005ba0| 75 6c 74 20 69 73 0a 58 | 2e 44 53 0a 58 5c 66 42 |ult is.X|.DS.X\fB|
|00005bb0| 64 20 65 20 7b 66 20 67 | 20 68 7d 5c 66 52 0a 58 |d e {f g| h}\fR.X|
|00005bc0| 2e 44 45 0a 58 28 77 68 | 65 6e 20 74 68 65 20 66 |.DE.X(wh|en the f|
|00005bd0| 69 65 6c 64 20 77 61 73 | 20 65 78 74 72 61 63 74 |ield was| extract|
|00005be0| 65 64 2c 20 61 6c 6c 20 | 74 68 61 74 20 68 61 70 |ed, all |that hap|
|00005bf0| 70 65 6e 65 64 20 77 61 | 73 20 74 6f 20 73 74 72 |pened wa|s to str|
|00005c00| 69 70 20 6f 66 66 0a 58 | 74 68 65 20 6f 75 74 65 |ip off.X|the oute|
|00005c10| 72 6d 6f 73 74 20 6c 61 | 79 65 72 20 6f 66 20 62 |rmost la|yer of b|
|00005c20| 72 61 63 65 73 29 2e 20 | 20 43 6f 6d 6d 61 6e 64 |races). | Command|
|00005c30| 20 73 75 62 73 74 69 74 | 75 74 69 6f 6e 20 69 73 | substit|ution is|
|00005c40| 20 6e 65 76 65 72 0a 58 | 6d 61 64 65 20 6f 6e 20 | never.X|made on |
|00005c50| 61 20 6c 69 73 74 20 28 | 61 74 20 6c 65 61 73 74 |a list (|at least|
|00005c60| 2c 20 6e 6f 74 20 62 79 | 20 74 68 65 20 6c 69 73 |, not by| the lis|
|00005c70| 74 2d 70 72 6f 63 65 73 | 73 69 6e 67 20 63 6f 6d |t-proces|sing com|
|00005c80| 6d 61 6e 64 73 3b 20 20 | 74 68 65 0a 58 6c 69 73 |mands; |the.Xlis|
|00005c90| 74 20 63 61 6e 20 61 6c | 77 61 79 73 20 62 65 20 |t can al|ways be |
|00005ca0| 70 61 73 73 65 64 20 74 | 6f 20 74 68 65 20 54 63 |passed t|o the Tc|
|00005cb0| 6c 20 69 6e 74 65 72 70 | 72 65 74 65 72 20 66 6f |l interp|reter fo|
|00005cc0| 72 20 65 76 61 6c 75 61 | 74 69 6f 6e 29 2e 0a 58 |r evalua|tion)..X|
|00005cd0| 2e 50 50 0a 58 54 68 65 | 20 54 63 6c 20 63 6f 6d |.PP.XThe| Tcl com|
|00005ce0| 6d 61 6e 64 73 20 5c 66 | 42 63 6f 6e 63 61 74 5c |mands \f|Bconcat\|
|00005cf0| 66 52 2c 20 5c 66 42 66 | 6f 72 65 61 63 68 5c 66 |fR, \fBf|oreach\f|
|00005d00| 52 2c 20 5c 66 42 69 6e | 64 65 78 5c 66 52 2c 0a |R, \fBin|dex\fR,.|
|00005d10| 58 5c 66 42 6c 65 6e 67 | 74 68 5c 66 52 2c 20 5c |X\fBleng|th\fR, \|
|00005d20| 66 42 6c 69 73 74 5c 66 | 52 2c 20 61 6e 64 20 5c |fBlist\f|R, and \|
|00005d30| 66 42 72 61 6e 67 65 5c | 66 52 20 61 6c 6c 6f 77 |fBrange\|fR allow|
|00005d40| 20 79 6f 75 20 74 6f 20 | 62 75 69 6c 64 20 6c 69 | you to |build li|
|00005d50| 73 74 73 2c 0a 58 65 78 | 74 72 61 63 74 20 65 6c |sts,.Xex|tract el|
|00005d60| 65 6d 65 6e 74 73 20 66 | 72 6f 6d 20 74 68 65 6d |ements f|rom them|
|00005d70| 2c 20 73 65 61 72 63 68 | 20 74 68 65 6d 2c 20 61 |, search| them, a|
|00005d80| 6e 64 20 70 65 72 66 6f | 72 6d 20 6f 74 68 65 72 |nd perfo|rm other|
|00005d90| 20 6c 69 73 74 2d 72 65 | 6c 61 74 65 64 0a 58 66 | list-re|lated.Xf|
|00005da0| 75 6e 63 74 69 6f 6e 73 | 2e 0a 58 0a 58 2e 53 48 |unctions|..X.X.SH|
|00005db0| 20 22 43 4f 4d 4d 41 4e | 44 20 52 45 53 55 4c 54 | "COMMAN|D RESULT|
|00005dc0| 53 22 0a 58 2e 50 50 0a | 58 45 61 63 68 20 63 6f |S".X.PP.|XEach co|
|00005dd0| 6d 6d 61 6e 64 20 70 72 | 6f 64 75 63 65 73 20 74 |mmand pr|oduces t|
|00005de0| 77 6f 20 72 65 73 75 6c | 74 73 3a 20 20 61 20 63 |wo resul|ts: a c|
|00005df0| 6f 64 65 20 61 6e 64 20 | 61 20 73 74 72 69 6e 67 |ode and |a string|
|00005e00| 2e 20 20 54 68 65 0a 58 | 63 6f 64 65 20 69 6e 64 |. The.X|code ind|
|00005e10| 69 63 61 74 65 73 20 77 | 68 65 74 68 65 72 20 74 |icates w|hether t|
|00005e20| 68 65 20 63 6f 6d 6d 61 | 6e 64 20 63 6f 6d 70 6c |he comma|nd compl|
|00005e30| 65 74 65 64 20 73 75 63 | 63 65 73 73 66 75 6c 6c |eted suc|cessfull|
|00005e40| 79 20 6f 72 20 6e 6f 74 | 2c 0a 58 61 6e 64 20 74 |y or not|,.Xand t|
|00005e50| 68 65 20 73 74 72 69 6e | 67 20 67 69 76 65 73 20 |he strin|g gives |
|00005e60| 61 64 64 69 74 69 6f 6e | 61 6c 20 69 6e 66 6f 72 |addition|al infor|
|00005e70| 6d 61 74 69 6f 6e 2e 20 | 20 54 68 65 20 76 61 6c |mation. | The val|
|00005e80| 69 64 20 63 6f 64 65 73 | 20 61 72 65 0a 58 64 65 |id codes| are.Xde|
|00005e90| 66 69 6e 65 64 20 69 6e | 20 74 63 6c 2e 68 2c 20 |fined in| tcl.h, |
|00005ea0| 61 6e 64 20 61 72 65 3a | 0a 58 2e 52 53 0a 58 2e |and are:|.X.RS.X.|
|00005eb0| 54 50 20 32 30 0a 58 5c | 66 42 54 43 4c 5f 4f 4b |TP 20.X\|fBTCL_OK|
|00005ec0| 5c 66 52 0a 58 54 68 69 | 73 20 69 73 20 74 68 65 |\fR.XThi|s is the|
|00005ed0| 20 6e 6f 72 6d 61 6c 20 | 72 65 74 75 72 6e 20 63 | normal |return c|
|00005ee0| 6f 64 65 2c 20 61 6e 64 | 20 69 6e 64 69 63 61 74 |ode, and| indicat|
|00005ef0| 65 73 20 74 68 61 74 20 | 74 68 65 20 63 6f 6d 6d |es that |the comm|
|00005f00| 61 6e 64 20 63 6f 6d 70 | 6c 65 74 65 64 0a 58 73 |and comp|leted.Xs|
|00005f10| 75 63 63 65 73 66 75 6c | 6c 79 2e 20 20 54 68 65 |uccesful|ly. The|
|00005f20| 20 73 74 72 69 6e 67 20 | 67 69 76 65 73 20 74 68 | string |gives th|
|00005f30| 65 20 63 6f 6d 6d 61 6e | 64 27 73 20 72 65 74 75 |e comman|d's retu|
|00005f40| 72 6e 20 76 61 6c 75 65 | 2e 0a 58 2e 54 50 20 32 |rn value|..X.TP 2|
|00005f50| 30 0a 58 5c 66 42 54 43 | 4c 5f 45 52 52 4f 52 5c |0.X\fBTC|L_ERROR\|
|00005f60| 66 52 0a 58 49 6e 64 69 | 63 61 74 65 73 20 74 68 |fR.XIndi|cates th|
|00005f70| 61 74 20 61 6e 20 65 72 | 72 6f 72 20 6f 63 63 75 |at an er|ror occu|
|00005f80| 72 72 65 64 3b 20 20 74 | 68 65 20 73 74 72 69 6e |rred; t|he strin|
|00005f90| 67 20 67 69 76 65 73 20 | 61 20 6d 65 73 73 61 67 |g gives |a messag|
|00005fa0| 65 20 64 65 73 63 72 69 | 62 69 6e 67 0a 58 74 68 |e descri|bing.Xth|
|00005fb0| 65 20 65 72 72 6f 72 2e | 0a 58 2e 56 53 0a 58 54 |e error.|.X.VS.XT|
|00005fc0| 68 65 20 76 61 72 69 61 | 62 6c 65 20 5c 66 42 65 |he varia|ble \fBe|
|00005fd0| 72 72 6f 72 49 6e 66 6f | 5c 66 52 20 77 69 6c 6c |rrorInfo|\fR will|
|00005fe0| 20 63 6f 6e 74 61 69 6e | 20 61 64 64 69 74 69 6f | contain| additio|
|00005ff0| 6e 61 6c 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 0a |nal info|rmation.|
|00006000| 58 64 65 73 63 72 69 62 | 69 6e 67 20 77 68 69 63 |Xdescrib|ing whic|
|00006010| 68 20 63 6f 6d 6d 61 6e | 64 73 20 61 6e 64 20 70 |h comman|ds and p|
|00006020| 72 6f 63 65 64 75 72 65 | 73 20 77 65 72 65 20 62 |rocedure|s were b|
|00006030| 65 69 6e 67 20 65 78 65 | 63 75 74 65 64 20 77 68 |eing exe|cuted wh|
|00006040| 65 6e 20 74 68 65 0a 58 | 65 72 72 6f 72 20 6f 63 |en the.X|error oc|
|00006050| 63 75 72 72 65 64 2e 0a | 58 2e 56 45 0a 58 2e 54 |curred..|X.VE.X.T|
|00006060| 50 20 32 30 0a 58 5c 66 | 42 54 43 4c 5f 52 45 54 |P 20.X\f|BTCL_RET|
|00006070| 55 52 4e 5c 66 52 0a 58 | 49 6e 64 69 63 61 74 65 |URN\fR.X|Indicate|
|00006080| 73 20 74 68 61 74 20 74 | 68 65 20 5c 66 42 72 65 |s that t|he \fBre|
|00006090| 74 75 72 6e 5c 66 52 20 | 63 6f 6d 6d 61 6e 64 20 |turn\fR |command |
|000060a0| 68 61 73 20 62 65 65 6e | 20 69 6e 76 6f 6b 65 64 |has been| invoked|
|000060b0| 2c 20 61 6e 64 20 74 68 | 61 74 20 74 68 65 0a 58 |, and th|at the.X|
|000060c0| 2e 56 53 0a 58 63 75 72 | 72 65 6e 74 20 70 72 6f |.VS.Xcur|rent pro|
|000060d0| 63 65 64 75 72 65 20 28 | 6f 72 20 74 6f 70 2d 6c |cedure (|or top-l|
|000060e0| 65 76 65 6c 20 63 6f 6d | 6d 61 6e 64 20 6f 72 20 |evel com|mand or |
|000060f0| 5c 66 42 73 6f 75 72 63 | 65 5c 66 52 20 63 6f 6d |\fBsourc|e\fR com|
|00006100| 6d 61 6e 64 29 0a 58 73 | 68 6f 75 6c 64 20 72 65 |mand).Xs|hould re|
|00006110| 74 75 72 6e 20 69 6d 6d | 65 64 69 61 74 65 6c 79 |turn imm|ediately|
|00006120| 2e 20 20 54 68 65 0a 58 | 73 74 72 69 6e 67 20 67 |. The.X|string g|
|00006130| 69 76 65 73 20 74 68 65 | 20 72 65 74 75 72 6e 20 |ives the| return |
|00006140| 76 61 6c 75 65 20 66 6f | 72 20 74 68 65 20 70 72 |value fo|r the pr|
|00006150| 6f 63 65 64 75 72 65 20 | 6f 72 20 63 6f 6d 6d 61 |ocedure |or comma|
|00006160| 6e 64 2e 0a 58 2e 56 45 | 0a 58 2e 54 50 20 32 30 |nd..X.VE|.X.TP 20|
|00006170| 0a 58 5c 66 42 54 43 4c | 5f 42 52 45 41 4b 5c 66 |.X\fBTCL|_BREAK\f|
|00006180| 52 0a 58 49 6e 64 69 63 | 61 74 65 73 20 74 68 61 |R.XIndic|ates tha|
|00006190| 74 20 74 68 65 20 5c 66 | 42 62 72 65 61 6b 5c 66 |t the \f|Bbreak\f|
|000061a0| 52 20 63 6f 6d 6d 61 6e | 64 20 68 61 73 20 62 65 |R comman|d has be|
|000061b0| 65 6e 20 69 6e 76 6f 6b | 65 64 2c 20 73 6f 20 74 |en invok|ed, so t|
|000061c0| 68 65 0a 58 69 6e 6e 65 | 72 6d 6f 73 74 20 6c 6f |he.Xinne|rmost lo|
|000061d0| 6f 70 20 73 68 6f 75 6c | 64 20 61 62 6f 72 74 20 |op shoul|d abort |
|000061e0| 69 6d 6d 65 64 69 61 74 | 65 6c 79 2e 20 20 54 68 |immediat|ely. Th|
|000061f0| 65 20 73 74 72 69 6e 67 | 20 73 68 6f 75 6c 64 20 |e string| should |
|00006200| 61 6c 77 61 79 73 0a 58 | 62 65 20 65 6d 70 74 79 |always.X|be empty|
|00006210| 2e 0a 58 2e 54 50 20 32 | 30 0a 58 5c 66 42 54 43 |..X.TP 2|0.X\fBTC|
|00006220| 4c 5f 43 4f 4e 54 49 4e | 55 45 5c 66 52 0a 58 49 |L_CONTIN|UE\fR.XI|
|00006230| 6e 64 69 63 61 74 65 73 | 20 74 68 61 74 20 74 68 |ndicates| that th|
|00006240| 65 20 5c 66 42 63 6f 6e | 74 69 6e 75 65 5c 66 52 |e \fBcon|tinue\fR|
|00006250| 20 63 6f 6d 6d 61 6e 64 | 20 68 61 73 20 62 65 65 | command| has bee|
|00006260| 6e 20 69 6e 76 6f 6b 65 | 64 2c 20 73 6f 20 74 68 |n invoke|d, so th|
|00006270| 65 0a 58 69 6e 6e 65 72 | 6d 6f 73 74 20 6c 6f 6f |e.Xinner|most loo|
|00006280| 70 20 73 68 6f 75 6c 64 | 20 67 6f 20 6f 6e 20 74 |p should| go on t|
|00006290| 6f 20 74 68 65 20 6e 65 | 78 74 20 69 74 65 72 61 |o the ne|xt itera|
|000062a0| 74 69 6f 6e 2e 20 20 54 | 68 65 20 73 74 72 69 6e |tion. T|he strin|
|000062b0| 67 0a 58 73 68 6f 75 6c | 64 20 61 6c 77 61 79 73 |g.Xshoul|d always|
|000062c0| 20 62 65 20 65 6d 70 74 | 79 2e 0a 58 2e 52 45 0a | be empt|y..X.RE.|
|000062d0| 58 54 63 6c 20 70 72 6f | 67 72 61 6d 6d 65 72 73 |XTcl pro|grammers|
|000062e0| 20 64 6f 20 6e 6f 74 20 | 6e 6f 72 6d 61 6c 6c 79 | do not |normally|
|000062f0| 20 6e 65 65 64 20 74 6f | 20 74 68 69 6e 6b 20 61 | need to| think a|
|00006300| 62 6f 75 74 20 72 65 74 | 75 72 6e 20 63 6f 64 65 |bout ret|urn code|
|00006310| 73 2c 0a 58 73 69 6e 63 | 65 20 54 43 4c 5f 4f 4b |s,.Xsinc|e TCL_OK|
|00006320| 20 69 73 20 61 6c 6d 6f | 73 74 20 61 6c 77 61 79 | is almo|st alway|
|00006330| 73 20 72 65 74 75 72 6e | 65 64 2e 20 20 49 66 20 |s return|ed. If |
|00006340| 61 6e 79 74 68 69 6e 67 | 20 65 6c 73 65 20 69 73 |anything| else is|
|00006350| 20 72 65 74 75 72 6e 65 | 64 0a 58 62 79 20 61 20 | returne|d.Xby a |
|00006360| 63 6f 6d 6d 61 6e 64 2c | 20 74 68 65 6e 20 74 68 |command,| then th|
|00006370| 65 20 54 63 6c 20 69 6e | 74 65 72 70 72 65 74 65 |e Tcl in|terprete|
|00006380| 72 20 69 6d 6d 65 64 69 | 61 74 65 6c 79 20 73 74 |r immedi|ately st|
|00006390| 6f 70 73 20 70 72 6f 63 | 65 73 73 69 6e 67 0a 58 |ops proc|essing.X|
|000063a0| 63 6f 6d 6d 61 6e 64 73 | 20 61 6e 64 20 72 65 74 |commands| and ret|
|000063b0| 75 72 6e 73 20 74 6f 20 | 69 74 73 20 63 61 6c 6c |urns to |its call|
|000063c0| 65 72 2e 20 20 49 66 20 | 74 68 65 72 65 20 61 72 |er. If |there ar|
|000063d0| 65 20 73 65 76 65 72 61 | 6c 20 6e 65 73 74 65 64 |e severa|l nested|
|000063e0| 0a 58 69 6e 76 6f 63 61 | 74 69 6f 6e 73 20 6f 66 |.Xinvoca|tions of|
|000063f0| 20 74 68 65 20 54 63 6c | 20 69 6e 74 65 72 70 72 | the Tcl| interpr|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.