Attachment "sdoc.patch" to
ticket [536838ffff]
added by
dgp
2002-04-06 04:19:20.
0000: 49 6e 64 65 78 3a 20 64 6f 63 2f 73 75 62 73 74 Index: doc/subst
0010: 2e 6e 0a 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d .n.=============
0020: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d ================
0030: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d ================
0040: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d ================
0050: 3d 3d 3d 3d 3d 3d 0a 52 43 53 20 66 69 6c 65 3a ======.RCS file:
0060: 20 2f 63 76 73 72 6f 6f 74 2f 74 63 6c 2f 74 63 /cvsroot/tcl/tc
0070: 6c 2f 64 6f 63 2f 73 75 62 73 74 2e 6e 2c 76 0a l/doc/subst.n,v.
0080: 72 65 74 72 69 65 76 69 6e 67 20 72 65 76 69 73 retrieving revis
0090: 69 6f 6e 20 31 2e 34 0a 64 69 66 66 20 2d 75 20 ion 1.4.diff -u
00a0: 2d 72 31 2e 34 20 73 75 62 73 74 2e 6e 0a 2d 2d -r1.4 subst.n.--
00b0: 2d 20 64 6f 63 2f 73 75 62 73 74 2e 6e 09 31 32 - doc/subst.n.12
00c0: 20 4a 75 6c 20 32 30 30 31 20 31 33 3a 31 35 3a Jul 2001 13:15:
00d0: 30 39 20 2d 30 30 30 30 09 31 2e 34 0a 2b 2b 2b 09 -0000.1.4.+++
00e0: 20 64 6f 63 2f 73 75 62 73 74 2e 6e 09 35 20 41 doc/subst.n.5 A
00f0: 70 72 20 32 30 30 32 20 32 31 3a 31 37 3a 30 35 pr 2002 21:17:05
0100: 20 2d 30 30 30 30 0a 40 40 20 2d 33 32 2c 31 37 -0000.@@ -32,17
0110: 20 2b 33 32 2c 33 33 20 40 40 0a 20 49 66 20 61 +32,33 @@. If a
0120: 6e 79 20 6f 66 20 74 68 65 20 5c 66 42 5c 2d 6e ny of the \fB\-n
0130: 6f 62 61 63 6b 73 6c 61 73 68 65 73 5c 66 52 2c obackslashes\fR,
0140: 20 5c 66 42 5c 2d 6e 6f 63 6f 6d 6d 61 6e 64 73 \fB\-nocommands
0150: 5c 66 52 2c 20 6f 72 0a 20 5c 66 42 5c 2d 6e 6f \fR, or. \fB\-no
0160: 76 61 72 69 61 62 6c 65 73 5c 66 52 20 61 72 65 variables\fR are
0170: 20 73 70 65 63 69 66 69 65 64 2c 20 74 68 65 6e specified, then
0180: 20 74 68 65 20 63 6f 72 72 65 73 70 6f 6e 64 69 the correspondi
0190: 6e 67 20 73 75 62 73 74 69 74 75 74 69 6f 6e 73 ng substitutions
01a0: 0a 20 61 72 65 20 6e 6f 74 20 70 65 72 66 6f 72 . are not perfor
01b0: 6d 65 64 2e 0a 2d 46 6f 72 20 65 78 61 6d 70 6c med..-For exampl
01c0: 65 2c 20 69 66 20 5c 66 42 5c 2d 6e 6f 63 6f 6d e, if \fB\-nocom
01d0: 6d 61 6e 64 73 5c 66 52 20 69 73 20 73 70 65 63 mands\fR is spec
01e0: 69 66 69 65 64 2c 20 6e 6f 20 63 6f 6d 6d 61 6e ified, no comman
01f0: 64 20 73 75 62 73 74 69 74 75 74 69 6f 6e 0a 2d d substitution.-
0200: 69 73 20 70 65 72 66 6f 72 6d 65 64 3a 20 20 6f is performed: o
0210: 70 65 6e 20 61 6e 64 20 63 6c 6f 73 65 20 62 72 pen and close br
0220: 61 63 6b 65 74 73 20 61 72 65 20 74 72 65 61 74 ackets are treat
0230: 65 64 20 61 73 20 6f 72 64 69 6e 61 72 79 20 63 ed as ordinary c
0240: 68 61 72 61 63 74 65 72 73 0a 2b 46 6f 72 20 65 haracters.+For e
0250: 78 61 6d 70 6c 65 2c 20 69 66 20 5c 66 42 5c 2d xample, if \fB\-
0260: 6e 6f 63 6f 6d 6d 61 6e 64 73 5c 66 52 20 69 73 nocommands\fR is
0270: 20 73 70 65 63 69 66 69 65 64 2c 20 63 6f 6d 6d specified, comm
0280: 61 6e 64 20 73 75 62 73 74 69 74 75 74 69 6f 6e and substitution
0290: 0a 2b 69 73 20 6e 6f 74 20 70 65 72 66 6f 72 6d .+is not perform
02a0: 65 64 3a 20 20 6f 70 65 6e 20 61 6e 64 20 63 6c ed: open and cl
02b0: 6f 73 65 20 62 72 61 63 6b 65 74 73 20 61 72 65 ose brackets are
02c0: 20 74 72 65 61 74 65 64 20 61 73 20 6f 72 64 69 treated as ordi
02d0: 6e 61 72 79 20 63 68 61 72 61 63 74 65 72 73 0a nary characters.
02e0: 20 77 69 74 68 20 6e 6f 20 73 70 65 63 69 61 6c with no special
02f0: 20 69 6e 74 65 72 70 72 65 74 61 74 69 6f 6e 2e interpretation.
0300: 0a 20 2e 50 50 0a 20 2e 56 53 20 38 2e 34 0a 2d . .PP. .VS 8.4.-
0310: 49 66 20 61 20 62 72 65 61 6b 20 65 78 63 65 70 If a break excep
0320: 74 69 6f 6e 20 6f 63 63 75 72 73 20 64 75 72 69 tion occurs duri
0330: 6e 67 20 74 68 65 20 65 76 61 6c 75 61 74 69 6f ng the evaluatio
0340: 6e 20 6f 66 20 61 20 63 6f 6d 6d 61 6e 64 0a 2d n of a command.-
0350: 73 75 62 73 74 69 74 75 74 69 6f 6e 2c 20 74 68 substitution, th
0360: 65 20 72 65 73 75 6c 74 20 6f 66 20 74 68 65 20 e result of the
0370: 73 75 62 73 74 69 74 75 74 69 6f 6e 20 77 69 6c substitution wil
0380: 6c 20 62 65 20 74 68 65 20 73 74 72 69 6e 67 20 l be the string
0390: 28 61 73 0a 2d 73 75 62 73 74 69 74 75 74 65 64 (as.-substituted
03a0: 29 20 75 70 20 74 6f 20 74 68 65 20 73 74 61 72 ) up to the star
03b0: 74 20 6f 66 20 74 68 65 20 63 6f 6d 6d 61 6e 64 t of the command
03c0: 20 73 75 62 73 74 69 74 75 74 69 6f 6e 2e 20 20 substitution.
03d0: 49 66 20 61 0a 2d 63 6f 6e 74 69 6e 75 65 20 65 If a.-continue e
03e0: 78 63 65 70 74 69 6f 6e 20 6f 63 63 75 72 73 20 xception occurs
03f0: 64 75 72 69 6e 67 20 74 68 65 20 65 76 61 6c 75 during the evalu
0400: 61 74 69 6f 6e 20 6f 66 20 61 20 63 6f 6d 6d 61 ation of a comma
0410: 6e 64 0a 2d 73 75 62 73 74 69 74 75 74 69 6f 6e nd.-substitution
0420: 2c 20 61 6e 20 65 6d 70 74 79 20 73 74 72 69 6e , an empty strin
0430: 67 20 77 69 6c 6c 20 62 65 20 73 75 62 73 74 69 g will be substi
0440: 74 75 74 65 64 20 66 6f 72 20 74 68 61 74 20 65 tuted for that e
0450: 6e 74 69 72 65 0a 2d 63 6f 6d 6d 61 6e 64 20 73 ntire.-command s
0460: 75 62 73 74 69 74 75 74 69 6f 6e 20 28 61 73 20 ubstitution (as
0470: 6c 6f 6e 67 20 61 73 20 69 74 20 69 73 20 77 65 long as it is we
0480: 6c 6c 2d 66 6f 72 6d 65 64 20 54 63 6c 2e 29 0a ll-formed Tcl.).
0490: 2b 4e 6f 74 65 20 74 68 61 74 20 74 68 65 20 73 +Note that the s
04a0: 75 62 73 74 69 74 75 74 69 6f 6e 20 6f 66 20 6f ubstitution of o
04b0: 6e 65 20 6b 69 6e 64 20 63 61 6e 20 69 6e 63 6c ne kind can incl
04c0: 75 64 65 20 73 75 62 73 74 69 74 75 74 69 6f 6e ude substitution
04d0: 20 6f 66 20 0a 2b 6f 74 68 65 72 20 6b 69 6e 64 of .+other kind
04e0: 73 2e 20 20 46 6f 72 20 65 78 61 6d 70 6c 65 2c s. For example,
04f0: 20 65 76 65 6e 20 77 68 65 6e 20 74 68 65 20 5c even when the \
0500: 66 42 2d 6e 6f 76 61 72 69 61 62 6c 65 73 5c 66 fB-novariables\f
0510: 52 20 6f 70 74 69 6f 6e 0a 2b 69 73 20 73 70 65 R option.+is spe
0520: 63 69 66 69 65 64 2c 20 63 6f 6d 6d 61 6e 64 20 cified, command
0530: 73 75 62 73 74 69 74 75 74 69 6f 6e 20 69 73 20 substitution is
0540: 70 65 72 66 6f 72 6d 65 64 20 77 69 74 68 6f 75 performed withou
0550: 74 20 72 65 73 74 72 69 63 74 69 6f 6e 2e 0a 2b t restriction..+
0560: 54 68 69 73 20 6d 65 61 6e 73 20 74 68 61 74 20 This means that
0570: 61 6e 79 20 76 61 72 69 61 62 6c 65 20 73 75 62 any variable sub
0580: 73 74 69 74 75 74 69 6f 6e 20 6e 65 63 65 73 73 stitution necess
0590: 61 72 79 20 74 6f 20 63 6f 6d 70 6c 65 74 65 20 ary to complete
05a0: 74 68 65 0a 2b 63 6f 6d 6d 61 6e 64 20 73 75 62 the.+command sub
05b0: 73 74 69 74 75 74 69 6f 6e 20 77 69 6c 6c 20 73 stitution will s
05c0: 74 69 6c 6c 20 74 61 6b 65 20 70 6c 61 63 65 2e till take place.
05d0: 20 20 4c 69 6b 65 77 69 73 65 2c 20 61 6e 79 20 Likewise, any
05e0: 63 6f 6d 6d 61 6e 64 0a 2b 73 75 62 73 74 69 74 command.+substit
05f0: 75 74 69 6f 6e 20 6e 65 63 65 73 73 61 72 79 20 ution necessary
0600: 74 6f 20 63 6f 6d 70 6c 65 74 65 20 61 20 76 61 to complete a va
0610: 72 69 61 62 6c 65 20 73 75 62 73 74 69 74 75 74 riable substitut
0620: 69 6f 6e 20 77 69 6c 6c 0a 2b 74 61 6b 65 20 70 ion will.+take p
0630: 6c 61 63 65 2c 20 65 76 65 6e 20 77 68 65 6e 20 lace, even when
0640: 5c 66 42 2d 6e 6f 63 6f 6d 6d 61 6e 64 73 5c 66 \fB-nocommands\f
0650: 52 20 69 73 20 73 70 65 63 69 66 69 65 64 2e 20 R is specified.
0660: 20 53 65 65 20 74 68 65 0a 2b 45 58 41 4d 50 4c See the.+EXAMPL
0670: 45 53 20 62 65 6c 6f 77 2e 0a 2b 2e 50 50 0a 2b ES below..+.PP.+
0680: 49 66 20 61 6e 20 65 72 72 6f 72 20 6f 63 63 75 If an error occu
0690: 72 73 20 64 75 72 69 6e 67 20 73 75 62 73 74 69 rs during substi
06a0: 74 75 74 69 6f 6e 2c 20 74 68 65 6e 20 5c 66 42 tution, then \fB
06b0: 73 75 62 73 74 5c 66 52 20 77 69 6c 6c 20 72 65 subst\fR will re
06c0: 74 75 72 6e 0a 2b 74 68 61 74 20 65 72 72 6f 72 turn.+that error
06d0: 2e 20 20 49 66 20 61 20 62 72 65 61 6b 20 65 78 . If a break ex
06e0: 63 65 70 74 69 6f 6e 20 6f 63 63 75 72 73 20 64 ception occurs d
06f0: 75 72 69 6e 67 20 63 6f 6d 6d 61 6e 64 20 6f 72 uring command or
0700: 20 76 61 72 69 61 62 6c 65 0a 2b 73 75 62 73 74 variable.+subst
0710: 69 74 75 74 69 6f 6e 2c 20 74 68 65 20 72 65 73 itution, the res
0720: 75 6c 74 20 6f 66 20 74 68 65 20 77 68 6f 6c 65 ult of the whole
0730: 20 73 75 62 73 74 69 74 75 74 69 6f 6e 20 77 69 substitution wi
0740: 6c 6c 20 62 65 20 74 68 65 0a 2b 73 74 72 69 6e ll be the.+strin
0750: 67 20 28 61 73 20 73 75 62 73 74 69 74 75 74 65 g (as substitute
0760: 64 29 20 75 70 20 74 6f 20 74 68 65 20 73 74 61 d) up to the sta
0770: 72 74 20 6f 66 20 74 68 65 20 73 75 62 73 74 69 rt of the substi
0780: 74 75 74 69 6f 6e 20 74 68 61 74 0a 2b 72 61 69 tution that.+rai
0790: 73 65 64 20 74 68 65 20 65 78 63 65 70 74 69 6f sed the exceptio
07a0: 6e 2e 20 20 49 66 20 61 20 63 6f 6e 74 69 6e 75 n. If a continu
07b0: 65 20 65 78 63 65 70 74 69 6f 6e 20 6f 63 63 75 e exception occu
07c0: 72 73 20 64 75 72 69 6e 67 20 74 68 65 0a 2b 65 rs during the.+e
07d0: 76 61 6c 75 61 74 69 6f 6e 20 6f 66 20 61 20 63 valuation of a c
07e0: 6f 6d 6d 61 6e 64 20 6f 72 20 76 61 72 69 61 62 ommand or variab
07f0: 6c 65 20 73 75 62 73 74 69 74 75 74 69 6f 6e 2c le substitution,
0800: 20 61 6e 20 65 6d 70 74 79 20 73 74 72 69 6e 67 an empty string
0810: 0a 2b 77 69 6c 6c 20 62 65 20 73 75 62 73 74 69 .+will be substi
0820: 74 75 74 65 64 20 66 6f 72 20 74 68 61 74 20 65 tuted for that e
0830: 6e 74 69 72 65 20 63 6f 6d 6d 61 6e 64 20 6f 72 ntire command or
0840: 20 76 61 72 69 61 62 6c 65 20 73 75 62 73 74 69 variable substi
0850: 74 75 74 69 6f 6e 0a 2b 28 61 73 20 6c 6f 6e 67 tution.+(as long
0860: 20 61 73 20 69 74 20 69 73 20 77 65 6c 6c 2d 66 as it is well-f
0870: 6f 72 6d 65 64 20 54 63 6c 2e 29 20 20 49 66 20 ormed Tcl.) If
0880: 61 20 72 65 74 75 72 6e 20 65 78 63 65 70 74 69 a return excepti
0890: 6f 6e 20 6f 63 63 75 72 73 2c 0a 2b 6f 72 20 61 on occurs,.+or a
08a0: 6e 79 20 6f 74 68 65 72 20 72 65 74 75 72 6e 20 ny other return
08b0: 63 6f 64 65 20 69 73 20 72 65 74 75 72 6e 65 64 code is returned
08c0: 20 64 75 72 69 6e 67 20 63 6f 6d 6d 61 6e 64 20 during command
08d0: 6f 72 20 76 61 72 69 61 62 6c 65 0a 2b 73 75 62 or variable.+sub
08e0: 73 74 69 74 75 74 69 6f 6e 2c 20 74 68 65 6e 20 stitution, then
08f0: 74 68 65 20 72 65 74 75 72 6e 65 64 20 76 61 6c the returned val
0900: 75 65 20 69 73 20 73 75 62 73 74 69 74 75 74 65 ue is substitute
0910: 64 20 66 6f 72 20 74 68 61 74 0a 2b 73 75 62 73 d for that.+subs
0920: 74 69 74 75 74 69 6f 6e 2e 20 20 53 65 65 20 74 titution. See t
0930: 68 65 20 45 58 41 4d 50 4c 45 53 20 62 65 6c 6f he EXAMPLES belo
0940: 77 2e 20 20 49 6e 20 74 68 69 73 20 77 61 79 2c w. In this way,
0950: 20 61 6c 6c 20 65 78 63 65 70 74 69 6f 6e 61 6c all exceptional
0960: 0a 2b 72 65 74 75 72 6e 20 63 6f 64 65 73 20 61 .+return codes a
0970: 72 65 20 60 60 63 61 75 67 68 74 27 27 20 62 79 re ``caught'' by
0980: 20 5c 66 42 73 75 62 73 74 5c 66 52 2e 20 20 54 \fBsubst\fR. T
0990: 68 65 20 5c 66 42 73 75 62 73 74 5c 66 52 20 63 he \fBsubst\fR c
09a0: 6f 6d 6d 61 6e 64 0a 2b 69 74 73 65 6c 66 20 77 ommand.+itself w
09b0: 69 6c 6c 20 65 69 74 68 65 72 20 72 65 74 75 72 ill either retur
09c0: 6e 20 61 6e 20 65 72 72 6f 72 2c 20 6f 72 20 77 n an error, or w
09d0: 69 6c 6c 20 63 6f 6d 70 6c 65 74 65 20 73 75 63 ill complete suc
09e0: 63 65 73 73 66 75 6c 6c 79 2e 0a 20 2e 56 45 0a cessfully.. .VE.
09f0: 20 2e 53 48 20 45 58 41 4d 50 4c 45 53 0a 20 2e .SH EXAMPLES. .
0a00: 50 50 0a 40 40 20 2d 36 32 2c 36 20 2b 37 38 2c PP.@@ -62,6 +78,
0a10: 32 32 20 40 40 0a 20 2e 43 45 0a 20 72 65 74 75 22 @@. .CE. retu
0a20: 72 6e 20 60 60 5c 66 42 78 79 7a 20 7b 70 7d 20 rn ``\fBxyz {p}
0a30: 71 20 7b 72 7d 5c 66 52 27 27 2c 20 6e 6f 74 20 q {r}\fR'', not
0a40: 60 60 5c 66 42 78 79 7a 20 7b 70 5c 5c 7d 20 71 ``\fBxyz {p\\} q
0a50: 20 5c 5c 7b 72 7d 5c 66 52 27 27 2e 0a 20 2e 50 \\{r}\fR''.. .P
0a60: 50 0a 2b 57 68 65 6e 20 63 6f 6d 6d 61 6e 64 20 P.+When command
0a70: 73 75 62 73 74 69 74 75 74 69 6f 6e 20 69 73 20 substitution is
0a80: 70 65 72 66 6f 72 6d 65 64 2c 20 69 74 20 69 6e performed, it in
0a90: 63 6c 75 64 65 73 20 61 6e 79 20 76 61 72 69 61 cludes any varia
0aa0: 62 6c 65 0a 2b 73 75 62 73 74 69 74 75 74 69 6f ble.+substitutio
0ab0: 6e 20 6e 65 63 65 73 73 61 72 79 20 74 6f 20 65 n necessary to e
0ac0: 76 61 6c 75 61 74 65 20 74 68 65 20 73 63 72 69 valuate the scri
0ad0: 70 74 2e 20 20 0a 2b 2e 43 53 0a 2b 5c 66 42 73 pt. .+.CS.+\fBs
0ae0: 65 74 20 61 20 34 34 0a 2b 73 75 62 73 74 20 2d et a 44.+subst -
0af0: 6e 6f 76 61 72 69 61 62 6c 65 73 20 7b 24 61 20 novariables {$a
0b00: 5b 66 6f 72 6d 61 74 20 24 61 5d 7d 5c 66 52 0a [format $a]}\fR.
0b10: 2b 2e 43 45 0a 2b 72 65 74 75 72 6e 73 20 60 60 +.CE.+returns ``
0b20: 5c 66 42 24 61 20 34 34 5c 66 52 27 27 2c 20 6e \fB$a 44\fR'', n
0b30: 6f 74 20 60 60 5c 66 42 24 61 20 24 61 5c 66 52 ot ``\fB$a $a\fR
0b40: 27 27 2e 20 20 53 69 6d 69 6c 61 72 6c 79 2c 20 ''. Similarly,
0b50: 77 68 65 6e 0a 2b 76 61 72 69 61 62 6c 65 20 73 when.+variable s
0b60: 75 62 73 74 69 74 75 74 69 6f 6e 20 69 73 20 70 ubstitution is p
0b70: 65 72 66 6f 72 6d 65 64 2c 20 69 74 20 69 6e 63 erformed, it inc
0b80: 6c 75 64 65 73 20 61 6e 79 20 63 6f 6d 6d 61 6e ludes any comman
0b90: 64 0a 2b 73 75 62 73 74 69 74 75 74 69 6f 6e 20 d.+substitution
0ba0: 6e 65 63 65 73 73 61 72 79 20 74 6f 20 72 65 74 necessary to ret
0bb0: 72 69 65 76 65 20 74 68 65 20 76 61 6c 75 65 20 rieve the value
0bc0: 6f 66 20 74 68 65 20 76 61 72 69 61 62 6c 65 2e of the variable.
0bd0: 0a 2b 2e 43 53 0a 2b 5c 66 42 70 72 6f 63 20 62 .+.CS.+\fBproc b
0be0: 20 7b 7d 20 7b 72 65 74 75 72 6e 20 63 7d 0a 2b {} {return c}.+
0bf0: 61 72 72 61 79 20 73 65 74 20 61 20 7b 63 20 63 array set a {c c
0c00: 20 5b 62 5d 20 74 72 69 63 6b 79 7d 0a 2b 73 75 [b] tricky}.+su
0c10: 62 73 74 20 2d 6e 6f 63 6f 6d 6d 61 6e 64 73 20 bst -nocommands
0c20: 7b 5b 62 5d 20 24 61 28 5b 62 5d 29 7d 5c 66 52 {[b] $a([b])}\fR
0c30: 0a 2b 2e 43 45 0a 2b 72 65 74 75 72 6e 73 20 60 .+.CE.+returns `
0c40: 60 5c 66 42 5b 62 5d 20 63 5c 66 52 27 27 2c 20 `\fB[b] c\fR'',
0c50: 6e 6f 74 20 60 60 5c 66 42 5b 62 5d 20 74 72 69 not ``\fB[b] tri
0c60: 63 6b 79 5c 66 52 27 27 2e 0a 2b 2e 50 50 0a 20 cky\fR''..+.PP.
0c70: 54 68 65 20 63 6f 6e 74 69 6e 75 65 20 61 6e 64 The continue and
0c80: 20 62 72 65 61 6b 20 65 78 63 65 70 74 69 6f 6e break exception
0c90: 73 20 61 6c 6c 6f 77 20 63 6f 6d 6d 61 6e 64 20 s allow command
0ca0: 73 75 62 73 74 69 74 75 74 69 6f 6e 73 20 74 6f substitutions to
0cb0: 0a 20 70 72 65 76 65 6e 74 20 73 75 62 73 74 69 . prevent substi
0cc0: 74 75 74 69 6f 6e 20 6f 66 20 74 68 65 20 72 65 tution of the re
0cd0: 73 74 20 6f 66 20 74 68 65 20 63 6f 6d 6d 61 6e st of the comman
0ce0: 64 20 73 75 62 73 74 69 74 75 74 69 6f 6e 20 61 d substitution a
0cf0: 6e 64 20 74 68 65 0a 20 72 65 73 74 20 6f 66 20 nd the. rest of
0d00: 5c 66 49 73 74 72 69 6e 67 5c 66 52 20 72 65 73 \fIstring\fR res
0d10: 70 65 63 74 69 76 65 6c 79 2c 20 67 69 76 69 6e pectively, givin
0d20: 67 20 73 63 72 69 70 74 20 61 75 74 68 6f 72 73 g script authors
0d30: 20 6d 6f 72 65 20 6f 70 74 69 6f 6e 73 0a 40 40 more options.@@
0d40: 20 2d 37 34 2c 36 20 2b 31 30 36 2c 31 36 20 40 -74,6 +106,16 @
0d50: 40 0a 20 5c 66 42 73 75 62 73 74 20 7b 61 62 63 @. \fBsubst {abc
0d60: 2c 5b 63 6f 6e 74 69 6e 75 65 3b 65 78 70 72 20 ,[continue;expr
0d70: 31 2b 32 5d 2c 64 65 66 7d 5c 66 52 0a 20 2e 43 1+2],def}\fR. .C
0d80: 45 0a 20 72 65 74 75 72 6e 73 20 60 60 5c 66 42 E. returns ``\fB
0d90: 61 62 63 2c 2c 64 65 66 5c 66 52 27 27 2c 20 6e abc,,def\fR'', n
0da0: 6f 74 20 60 60 5c 66 42 61 62 63 2c 33 2c 64 65 ot ``\fBabc,3,de
0db0: 66 5c 66 52 27 27 2e 0a 2b 2e 50 50 0a 2b 4f 74 f\fR''..+.PP.+Ot
0dc0: 68 65 72 20 65 78 63 65 70 74 69 6f 6e 61 6c 20 her exceptional
0dd0: 72 65 74 75 72 6e 20 63 6f 64 65 73 20 73 75 62 return codes sub
0de0: 73 74 69 74 75 74 65 20 74 68 65 20 72 65 74 75 stitute the retu
0df0: 72 6e 65 64 20 76 61 6c 75 65 0a 2b 2e 43 53 0a rned value.+.CS.
0e00: 2b 5c 66 42 73 75 62 73 74 20 7b 61 62 63 2c 5b +\fBsubst {abc,[
0e10: 72 65 74 75 72 6e 20 66 6f 6f 3b 65 78 70 72 20 return foo;expr
0e20: 31 2b 32 5d 2c 64 65 66 7d 5c 66 52 0a 2b 2e 43 1+2],def}\fR.+.C
0e30: 45 0a 2b 72 65 74 75 72 6e 73 20 60 60 5c 66 42 E.+returns ``\fB
0e40: 61 62 63 2c 66 6f 6f 2c 64 65 66 5c 66 52 27 27 abc,foo,def\fR''
0e50: 2c 20 6e 6f 74 20 60 60 5c 66 42 61 62 63 2c 33 , not ``\fBabc,3
0e60: 2c 64 65 66 5c 66 52 27 27 20 61 6e 64 0a 2b 2e ,def\fR'' and.+.
0e70: 43 53 0a 2b 5c 66 42 73 75 62 73 74 20 7b 61 62 CS.+\fBsubst {ab
0e80: 63 2c 5b 72 65 74 75 72 6e 20 2d 63 6f 64 65 20 c,[return -code
0e90: 31 30 20 66 6f 6f 3b 65 78 70 72 20 31 2b 32 5d 10 foo;expr 1+2]
0ea0: 2c 64 65 66 7d 5c 66 52 0a 2b 2e 43 45 0a 2b 61 ,def}\fR.+.CE.+a
0eb0: 6c 73 6f 20 72 65 74 75 72 6e 73 20 60 60 5c 66 lso returns ``\f
0ec0: 42 61 62 63 2c 66 6f 6f 2c 64 65 66 5c 66 52 27 Babc,foo,def\fR'
0ed0: 27 2c 20 6e 6f 74 20 60 60 5c 66 42 61 62 63 2c ', not ``\fBabc,
0ee0: 33 2c 64 65 66 5c 66 52 27 27 2e 0a 20 2e 56 45 3,def\fR''.. .VE
0ef0: 0a 20 0a 20 2e 53 48 20 22 53 45 45 20 41 4c 53 . . .SH "SEE ALS
0f00: 4f 22 0a O".