%PDF-1.2
%
10 0 obj
<<
/Length 11 0 R
>>
stream
0 0 0 rg
108 616.32 0.48 0.96 re f
480.48 616.32 0.48 0.96 re f
108.48 616.32 372 0.96 re f
BT
464.28 109.92 TD
/F0 9 Tf
-0.044 Tc 0 Tw (119) Tj
-188.52 558.96 TD /F1 12.96 Tf
19.1205 Tc (PAR) Tj
50.8814 Tc (T) Tj
ET
106.68 701.16 0.48 0.96 re f
479.16 701.16 0.48 0.96 re f
107.16 701.16 372 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
553.8 746.76 0.24 0.48 re f
584.04 746.76 0.24 0.48 re f
554.04 746.76 30 0.48 re f
582 80.76 0.24 0.48 re f
552.72 80.76 0.24 0.48 re f
552.96 80.76 29.04 0.48 re f
547.8 75 0.48 0.24 re f
547.8 34.8 0.48 0.24 re f
547.8 35.04 0.48 39.96 re f
510 504 54 108 re f
510 611.76 54.24 0.48 re f
563.76 503.76 0.48 108.24 re f
509.76 503.76 54.24 0.48 re f
509.76 504 0.48 108.24 re f
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 605.52 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 602.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 598.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (.) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 595.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 592.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (A) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 583.2 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 575.28 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (v) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 568.56 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (a) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 560.64 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (n) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 553.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 545.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (e) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 538.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 530.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 526.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (T) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 521.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 514.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (l) Tj
ET
Q
1 1 1 rg
444.96 650.52 31.08 33 re f
BT
456 667.56 TD
0 0 0 rg
/F0 24 Tf
0.048 Tc -0.12 Tw ( II) Tj
ET
1 1 1 rg
110.04 507.24 368.04 52.56 re f
BT
1 0 0 1 110.04 547.8 Tm
0 0 0 rg
/F3 18 Tf
0 Tc -0.0062 Tw (Advanced Tcl) Tj
ET
BT
0.9955 0 0 0.9955 107.04 462.12 Tm
/F4 10 Tf
0.0134 Tc 0.8368 Tw (Part II describes advanced programming techniques that support sophisticated) Tj
0 -12.0547 TD 0.0111 Tc -0.1404 Tw (applications. The Tcl interfaces remain simple, so you can quickly construct pow-) Tj
T* 0.009 Tc -0.0177 Tw (erful applications.) Tj
24.1095 -12.0547 TD 0.0282 Tc 0.9676 Tw (Chapter 10 describes ) Tj
ET
BT
234 426.12 TD
/F5 9 Tf
-0.03 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 255.48 426.12 Tm
/F4 10 Tf
0.0135 Tc 1.0091 Tw (, which lets you create Tcl programs on the fl) Tj
-1.2738 Tc 0 Tw (y) Tj
0.1119 Tc (.) Tj
-149.1172 -12.0547 TD 0.0136 Tc -0.2634 Tw (There are tricks with using ) Tj
ET
BT
234.36 414.12 TD
/F5 9 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 255.96 414.12 Tm
/F4 10 Tf
0.0179 Tc -0.3883 Tw ( correctl) Tj
-1.1533 Tc 0 Tw (y) Tj
0.0208 Tc -0.2975 Tw (, and a few rules of thumb to make your) Tj
-149.5994 -12.0547 TD 0.0251 Tc -0.0339 Tw (life easie) Tj
-0.9461 Tc 0 Tw (r) Tj
-0.0087 Tc (.) Tj
24.1095 -12.0547 TD 0.0161 Tc 0.4453 Tw (Chapter 11 describes regular expressions. This is the most powerful string) Tj
-24.1095 -12.0547 TD 0.0125 Tc 2.0938 Tw (processing facility in Tcl. This chapter includes a cookbook of useful regular) Tj
0 -12.0547 TD 0.0026 Tc 0 Tw (expressions.) Tj
24.1095 -12.0547 TD 0.0215 Tc 0.1122 Tw (Chapter 12 describes the library and package facility used to organize your) Tj
-24.1095 -12.0547 TD 0.0137 Tc -0.0224 Tw (code into reusable modules.) Tj
24.1095 -12.0547 TD 0.0152 Tc 1.1816 Tw (Chapter 13 describes introspection and debugging. Introspection provides) Tj
-24.1095 -12.0547 TD 0.0158 Tc 0.0099 Tw (information about the state of the Tcl interprete) Tj
-1.0667 Tc 0 Tw (r) Tj
-0.0087 Tc (.) Tj
24.1095 -12.0547 TD 0.0184 Tc 1.0577 Tw (Chapter 14 describes namespaces that partition the global scope for vari-) Tj
-24.1095 -12.0547 TD 0.0128 Tc -0.0216 Tw (ables and procedures. Namespaces help you structure large Tcl applications.) Tj
24.1095 -12.0547 TD 0.017 Tc -0.2669 Tw (Chapter 15 describes the features that support Internationalization, includ-) Tj
-24.1095 -12.0547 TD 0.0069 Tc -0 Tw (ing Unicode, other character set encodings, and message catalogs.) Tj
24.1095 -12.0547 TD 0.0152 Tc 0.1207 Tw (Chapter 16 describes event-driven I/O programming. This lets you run pro-) Tj
-24.1095 -12.0547 TD 0.0161 Tc 0.4202 Tw (cess pipelines in the background. It is also very useful with network socket pro-) Tj
0 -12.0547 TD 0.0114 Tc -0.0029 Tw (gramming, which is the topic of Chapter 17.) Tj
24.1095 -12.0547 TD 0.0158 Tc 0.5782 Tw (Chapter 18 describes TclHttpd, a ) Tj
-0.0048 Tc 0.5989 Tw (Web server built entirely in Tcl. ) Tj
-1.0158 Tc 0 Tw (Y) Tj
0.0264 Tc 0.5676 Tw (ou can) Tj
-24.1095 -12.0547 TD 0.023 Tc 0.2194 Tw (build applications on top of TclHttpd, or integrate the server into existing appli-) Tj
0 -12.0547 TD 0.0111 Tc 0.013 Tw (cations to give them a web interface. TclHttpd also supports regular ) Tj
-0.0657 Tc 0.0573 Tw (Web sites.) Tj
24.1095 -12.0547 TD 0.0132 Tc 0.3397 Tw (Chapter 19 describes Safe-Tcl and using multiple Tcl interpreters. ) Tj
-0.1473 Tc 0.501 Tw (You can) Tj
-24.1095 -12.0547 TD 0.012 Tc 1.5902 Tw (create multiple Tcl interpreters for your application. If an interpreter is safe,) Tj
0 -12.0547 TD 0.0148 Tc 1.2824 Tw (then you can grant it restricted functionalit) Tj
-1.2738 Tc 0 Tw (y) Tj
0.0233 Tc 1.2337 Tw (. This is ideal for supporting net-) Tj
T* 0.009 Tc 0.0339 Tw (work applets that are downloaded from untrusted sites.) Tj
ET
endstream
endobj
11 0 obj
6573
endobj
4 0 obj
<<
/Type /Page
/Parent 5 0 R
/Resources <<
/Font 17 0 R
/ProcSet 2 0 R
>>
/Contents 10 0 R
>>
endobj
17 0 obj
<<
/F0 6 0 R
/F1 7 0 R
/F2 8 0 R
/F3 12 0 R
/F4 14 0 R
/F5 16 0 R
>>
endobj
19 0 obj
<<
/Length 20 0 R
>>
stream
BT
0.9955 0 0 0.9955 72 773.4 Tm
0 0 0 rg
/F4 10 Tf
0.0025 Tc 0 Tw (Blan) Tj
20.1056 Tc (k) Tj
0.0125 Tc 20.1102 Tw (page 120) Tj
ET
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
553.8 746.76 0.24 0.48 re f
584.04 746.76 0.24 0.48 re f
554.04 746.76 30 0.48 re f
582 80.76 0.24 0.48 re f
552.72 80.76 0.24 0.48 re f
552.96 80.76 29.04 0.48 re f
547.8 75 0.48 0.24 re f
547.8 34.8 0.48 0.24 re f
547.8 35.04 0.48 39.96 re f
endstream
endobj
20 0 obj
677
endobj
18 0 obj
<<
/Type /Page
/Parent 5 0 R
/Resources <<
/Font <<
/F4 14 0 R
>>
/ProcSet 2 0 R
>>
/Contents 19 0 R
>>
endobj
22 0 obj
<<
/Length 23 0 R
>>
stream
BT
465.96 110.16 TD
0 0 0 rg
/F0 9 Tf
-0.004 Tc 0 Tw (121) Tj
-142.8 563.76 TD 10.9826 Tc (CHAPTER) Tj
ET
108.48 660.48 0.48 0.96 re f
482.04 660.48 0.48 0.96 re f
108.96 660.48 373.08 0.96 re f
108.48 701.52 0.48 0.96 re f
480.96 701.52 0.48 0.96 re f
108.96 701.52 372 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
553.8 746.76 0.24 0.48 re f
584.04 746.76 0.24 0.48 re f
554.04 746.76 30 0.48 re f
582 80.76 0.24 0.48 re f
552.72 80.76 0.24 0.48 re f
552.96 80.76 29.04 0.48 re f
547.8 75 0.48 0.24 re f
547.8 34.8 0.48 0.24 re f
547.8 35.04 0.48 39.96 re f
510 504 54 108 re f
510 611.76 54.24 0.48 re f
563.76 503.76 0.48 108.24 re f
509.76 503.76 54.24 0.48 re f
509.76 504 0.48 108.24 re f
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 605.52 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 602.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 598.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (.) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 595.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 592.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (A) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 583.2 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 575.28 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (v) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 568.56 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (a) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 560.64 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (n) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 553.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 545.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (e) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 538.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 530.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 526.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (T) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 521.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 514.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (l) Tj
ET
Q
1 1 1 rg
455.04 668.04 27 22.92 re f
BT
457.8 675 TD
0 0 0 rg
/F0 24 Tf
0 Tc 0.048 Tw ( ) Tj
-2.52 0 TD 0.036 Tc 0 Tw (10) Tj
ET
BT
1 0 0 1 108.96 603 Tm
/F3 18 Tf
-0.0056 Tc -0 Tw (Quoting Issues and Eval) Tj
ET
BT
402.96 603 TD
1 1 1 rg
/F6 18 Tf
0 Tc 0 Tw (10) Tj
-294 -39 TD 0 0 0 rg
/F0 9 Tf
-0 Tc 0.0302 Tw (This chapter describes explicit calls to the interpreter with the ) Tj
246 0 TD /F5 9 Tf
0 Tc 0 Tw (eval) Tj
21.48 0 TD /F0 9 Tf
-0.0165 Tc 0.1545 Tw ( command.) Tj
-243.48 -11.04 TD -0.0046 Tc 0.6554 Tw (An extra round of substitutions is performed that results in some useful) Tj
0 -10.92 TD -0.0075 Tc 0.6255 Tw (effects. The chapter describes the quoting problems with ) Tj
232.68 0 TD /F5 9 Tf
0 Tc 0 Tw (eval) Tj
21.6 0 TD /F0 9 Tf
-0.007 Tc 0.625 Tw ( and the) Tj
-254.28 -11.04 TD -0.0092 Tc 0.4112 Tw (ways to avoid them. The ) Tj
101.88 0 TD /F5 9 Tf
0 Tc 0 Tw (uplevel) Tj
37.8 0 TD /F0 9 Tf
-0.0091 Tc 0.4111 Tw ( command evaluates commands in a) Tj
-139.68 -11.04 TD -0.0143 Tc 4.4323 Tw (different scope. The ) Tj
95.04 0 TD /F5 9 Tf
0 Tc 0 Tw (subst) Tj
27 0 TD /F0 9 Tf
-0.0139 Tc 4.4719 Tw ( command does substitutions but no) Tj
-122.04 -10.92 TD -0.005 Tc 0.023 Tw (command invocation.) Tj
ET
BT
1.001 0 0 1.001 276.96 403.08 Tm
/F7 24 Tf
0.0482 Tc 0 Tw (D) Tj
ET
BT
0.9955 0 0 0.9955 295.68 403.08 Tm
/F4 10 Tf
0.0143 Tc 3.503 Tw (ynamic evaluation makes Tcl flexible) Tj
-187.5719 -12.0547 TD 0.0138 Tc 0.2588 Tw (and powerful, but it can be tricky to use properl) Tj
-1.2738 Tc 0 Tw (y) Tj
0.0262 Tc 0.2061 Tw (. The basic idea is that you cre-) Tj
0 -12.0547 TD 0.0165 Tc 0.8358 Tw (ate a string and then use the ) Tj
ET
BT
251.04 379.08 TD
/F5 9 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 272.64 379.08 Tm
/F4 10 Tf
0.0145 Tc 0.8357 Tw ( command to interpret that string as a com-) Tj
-164.4268 -12.0547 TD 0.0147 Tc 0.1936 Tw (mand or a series of commands. Creating program code on the fly is easy with an) Tj
0 -12.0547 TD 0.0133 Tc 0.4602 Tw (interpreted language like Tcl, and very hard, if not impossible, with a statically) Tj
T* 0.0103 Tc 0.6339 Tw (compiled language like C++ or Java. There are several ways that dynamic code) Tj
T* 0 Tc 0.0814 Tw (evaluation is used in Tcl:) Tj
8.4383 -20.1314 TD /F3 10 Tf
-0.0354 Tc 0 Tw (\225) Tj
13.2602 0 TD /F4 10 Tf
0.0148 Tc 0.4679 Tw (In some cases, a simple procedure isn\222t quite good enough, and you need to) Tj
2.4109 -12.0547 TD 0.0196 Tc 0.5442 Tw (glue together a command from a few different pieces and then execute the) Tj
0 -12.0547 TD 0.0279 Tc 1.2894 Tw (result using ) Tj
ET
BT
193.8 287.04 TD
/F5 9 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 215.4 287.04 Tm
/F4 10 Tf
0.0168 Tc 1.3487 Tw (. This often occurs with ) Tj
117.7749 0 TD /F7 10 Tf
-0.0283 Tc 0 Tw (wrappers) Tj
42.5533 0 TD /F4 10 Tf
0.0143 Tc 1.3331 Tw (, which provide a thin) Tj
-243.1443 -12.0547 TD 0.0095 Tc 0.0059 Tw (layer of functionality over existing commands.) Tj
-15.6712 -13.0191 TD /F3 10 Tf
-0.0354 Tc 0 Tw (\225) Tj
13.2602 0 TD /F7 10 Tf
-0.0061 Tc (Callbacks) Tj
45.4464 0 TD /F4 10 Tf
0.0108 Tc 3.4764 Tw ( are script fragments that are saved and evaluated later in) Tj
-43.0354 -12.0547 TD 0.0181 Tc 1.1117 Tw (response to some event. Examples include the commands associated with) Tj
0 -12.0547 TD -0.0084 Tc 0.9641 Tw (Tk buttons, ) Tj
ET
BT
190.68 238.08 TD
/F5 9 Tf
-0.0133 Tc 0 Tw (fileevent) Tj
ET
BT
0.9955 0 0 0.9955 239.16 238.08 Tm
/F4 10 Tf
-0 Tc 0.9564 Tw ( I/O handlers, and ) Tj
ET
BT
329.28 238.08 TD
/F5 9 Tf
-0.024 Tc 0 Tw (after) Tj
ET
BT
0.9955 0 0 0.9955 356.16 238.08 Tm
/F4 10 Tf
0.006 Tc 0.9095 Tw ( timer handlers. Callbacks) Tj
-224.2183 -12.0547 TD 0.0115 Tc 0.0016 Tw (are a flexible way to link different parts of an application togethe) Tj
-0.9461 Tc 0 Tw (r) Tj
-0.0087 Tc (.) Tj
-15.6712 -13.0191 TD /F3 10 Tf
-0.0354 Tc (\225) Tj
13.2602 0 TD /F4 10 Tf
-1.0158 Tc (Y) Tj
0.0177 Tc 0.3472 Tw (ou can add new control structures to Tcl using the ) Tj
ET
BT
374.04 213.12 TD
/F5 9 Tf
0 Tc 0 Tw (uplevel) Tj
ET
BT
0.9955 0 0 0.9955 411.84 213.12 Tm
/F4 10 Tf
0.0231 Tc 0.3298 Tw ( command. ) Tj
-0.1889 Tc 0 Tw (For) Tj
-280.1524 -12.0547 TD 0.0103 Tc 0.2049 Tw (example, you can write a function that applies a command to each line in a) Tj
0 -12.0547 TD 0.0137 Tc -0.0225 Tw (file or each node in a tree.) Tj
-15.6712 -13.1397 TD /F3 10 Tf
-0.0354 Tc 0 Tw (\225) Tj
13.2602 0 TD /F4 10 Tf
-1.0158 Tc (Y) Tj
0.0152 Tc -0.1847 Tw (ou can have a mixture of code and data, and just process the code part with) Tj
2.4109 -12.0547 TD 0.0205 Tc 3.4666 Tw (the ) Tj
ET
BT
154.2 164.04 TD
/F5 9 Tf
-0.024 Tc 0 Tw (subst) Tj
ET
BT
0.9955 0 0 0.9955 181.08 164.04 Tm
/F4 10 Tf
0.0231 Tc 3.4037 Tw ( command. ) Tj
0.0031 Tc 3.4152 Tw (For example, this is useful in HTML templates) Tj
-48.3395 -12.0547 TD 0.0169 Tc 2.1201 Tw (described in Chapter 18. There are also some powerful combinations of) Tj
ET
BT
132.96 140.04 TD
/F5 9 Tf
0 Tc 0 Tw (subst) Tj
ET
BT
0.9955 0 0 0.9955 159.96 140.04 Tm
/F4 10 Tf
0.0205 Tc -0.0293 Tw ( and ) Tj
ET
BT
182.88 140.04 TD
/F5 9 Tf
0 Tc 0 Tw (regsub) Tj
ET
BT
0.9955 0 0 0.9955 215.28 140.04 Tm
/F4 10 Tf
0.0176 Tc -0.0264 Tw ( described in Chapter 11.) Tj
ET
endstream
endobj
23 0 obj
8091
endobj
21 0 obj
<<
/Type /Page
/Parent 5 0 R
/Resources <<
/Font 27 0 R
/ProcSet 2 0 R
>>
/Contents 22 0 R
>>
endobj
27 0 obj
<<
/F0 6 0 R
/F2 8 0 R
/F3 12 0 R
/F4 14 0 R
/F5 16 0 R
/F6 24 0 R
/F7 25 0 R
>>
endobj
30 0 obj
<<
/Length 31 0 R
>>
stream
BT
114 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0365 Tc -0.0782 Tw (122 ) Tj
243.96 0 TD 0.04 Tc -0.0418 Tw (Quoting Issues and Eval) Tj
86.76 0 TD 0.0261 Tc 0.0282 Tw ( Chap. 10) Tj
ET
113.52 701.88 0.48 0.96 re f
486 701.88 0.48 0.96 re f
114 701.88 372 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
554.76 746.76 0.24 0.48 re f
584.04 746.76 0.24 0.48 re f
555 746.76 29.04 0.48 re f
585 80.76 0.24 0.48 re f
553.8 80.76 0.24 0.48 re f
554.04 80.76 30.96 0.48 re f
548.76 69.96 0.48 0.24 re f
548.76 33.72 0.48 0.24 re f
548.76 33.96 0.48 36 re f
BT
0.997 0 0 0.997 114 668.4 Tm
/F2 13 Tf
0.2743 Tc -0.0032 Tw (Constructing Code with the ) Tj
ET
BT
295.56 668.4 TD
/F8 13.92 Tf
0.048 Tc 0 Tw (list) Tj
ET
BT
0.997 0 0 0.997 329.16 668.4 Tm
/F2 13 Tf
0.3135 Tc -0.1026 Tw ( Command) Tj
ET
BT
0.9955 0 0 0.9955 114 647.4 Tm
/F4 10 Tf
0.018 Tc 0.2384 Tw (It can be tricky to assemble a command so that it is evaluated properly by ) Tj
ET
BT
461.64 647.4 TD
/F5 9 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 483.24 647.4 Tm
/F4 10 Tf
-0.0087 Tc (.) Tj
-370.9246 -12.0547 TD 0.021 Tc 0.9002 Tw (The same difficulties apply to commands like ) Tj
ET
BT
331.68 635.4 TD
/F5 9 Tf
0 Tc 0 Tw (afte) Tj
-1.08 Tc (r) Tj
ET
BT
0.9955 0 0 0.9955 357.6 635.4 Tm
/F4 10 Tf
-0.0087 Tc 0.9644 Tw (, ) Tj
ET
BT
364.08 635.4 TD
/F5 9 Tf
0 Tc 0 Tw (uplevel) Tj
ET
BT
0.9955 0 0 0.9955 401.88 635.4 Tm
/F4 10 Tf
0.0185 Tc 0.907 Tw (, and the Tk ) Tj
ET
BT
464.4 635.4 TD
/F5 9 Tf
0 Tc 0 Tw (send) Tj
ET
BT
0.9955 0 0 0.9955 114 623.4 Tm
/F4 10 Tf
0.0128 Tc -0.0065 Tw (command, all of which have similar properties to ) Tj
ET
BT
342.12 623.4 TD
/F5 9 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 363.6 623.4 Tm
/F4 10 Tf
0.0189 Tc 0.0025 Tw (, except that the command) Tj
-250.7388 -12.0547 TD 0.0155 Tc -0.0845 Tw (evaluation occurs later or in a different context. Constructing commands dynam-) Tj
0 -12.0547 TD 0.0148 Tc 1.0694 Tw (ically is a source of many problems. The worst part is that you can write code) Tj
T* 0.008 Tc -0.0046 Tw (that works sometimes but not others, which can be very confusing.) Tj
24.1095 -13.1397 TD /F7 10 Tf
0.0267 Tc -0.0355 Tw (Use ) Tj
ET
BT
157.8 574.32 TD
/F9 9 Tf
0 Tc 0 Tw (list) Tj
ET
BT
0.9955 0 0 0.9955 179.4 574.32 Tm
/F7 10 Tf
0.0187 Tc -0.0274 Tw ( when constructing command) Tj
-0.2363 Tc 0 Tw (s.) Tj
-41.5889 -13.0191 TD /F4 10 Tf
0.0144 Tc 0.4152 Tw (The root of the quoting problems is the internal use of ) Tj
ET
BT
394.2 561.36 TD
/F5 9 Tf
0 Tc 0 Tw (concat) Tj
ET
BT
0.9955 0 0 0.9955 426.6 561.36 Tm
/F4 10 Tf
0.0174 Tc 0.3957 Tw ( by ) Tj
ET
BT
443.88 561.36 TD
/F5 9 Tf
-0.03 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 465.48 561.36 Tm
/F4 10 Tf
0.0205 Tc 0.4529 Tw ( and) Tj
-353.0836 -12.0547 TD 0.0138 Tc -0.1069 Tw (similar commands to concatenate their arguments into one command string. The) Tj
ET
BT
114 537.36 TD
/F5 9 Tf
-0.02 Tc 0 Tw (concat) Tj
ET
BT
0.9955 0 0 0.9955 146.4 537.36 Tm
/F4 10 Tf
0.0175 Tc 0.3555 Tw ( can lose some important list structure so that arguments are not passed) Tj
-32.5478 -12.0547 TD 0.0117 Tc 1.2963 Tw (through as you expect. The general strategy to avoid these problems is to use) Tj
ET
BT
114 513.36 TD
/F5 9 Tf
0 Tc 0 Tw (list) Tj
ET
BT
0.9955 0 0 0.9955 135.6 513.36 Tm
/F4 10 Tf
0.0205 Tc -0.3306 Tw ( and ) Tj
ET
BT
158.04 513.36 TD
/F5 9 Tf
0 Tc 0 Tw (lappend) Tj
ET
BT
0.9955 0 0 0.9955 195.72 513.36 Tm
/F4 10 Tf
0.0109 Tc -0.2607 Tw ( to explicitly form the command callback as a single, well-struc-) Tj
-82.0928 -12.0547 TD 0.0115 Tc -0.0203 Tw (tured list. ) Tj
24.1095 -30.1369 TD /F2 10 Tf
0.0093 Tc -0.0381 Tw (The ) Tj
ET
BT
157.44 471.36 TD
/F8 12 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 186.12 471.36 Tm
/F2 10 Tf
0.0134 Tc 0.0784 Tw ( Command) Tj
-48.3395 -18.0821 TD /F4 10 Tf
0.0176 Tc 0.0941 Tw (The ) Tj
ET
BT
158.64 453.36 TD
/F5 9 Tf
-0.03 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 180.12 453.36 Tm
/F4 10 Tf
0.0204 Tc 0.0379 Tw ( command results in another call to the Tcl interprete) Tj
-0.9461 Tc 0 Tw (r) Tj
0.0127 Tc 0.059 Tw (. If you con-) Tj
-66.4217 -12.0547 TD 0.0091 Tc 0.7859 Tw (struct a command dynamicall) Tj
-1.1533 Tc 0 Tw (y) Tj
0.0145 Tc 0.7301 Tw (, you must use ) Tj
ET
BT
329.76 441.36 TD
/F5 9 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 351.36 441.36 Tm
/F4 10 Tf
0.017 Tc 0.6975 Tw ( to interpret it. ) Tj
-0.0442 Tc 0.7591 Tw (For example,) Tj
-238.4429 -12.0547 TD 0.0154 Tc -0.004 Tw (suppose we want to construct the following command now but execute it later:) Tj
ET
BT
150 416.04 TD
/F5 9 Tf
-0.005 Tc -0.035 Tw (puts stdout "Hello, World!") Tj
ET
BT
0.9955 0 0 0.9955 114 402.36 Tm
/F4 10 Tf
0.0131 Tc -0.0084 Tw (In this case, it is sufficient to do the following:) Tj
ET
BT
150 389.04 TD
/F5 9 Tf
-0.0075 Tc 0.0075 Tw (set cmd {puts stdout "Hello, World!"}) Tj
0 -13.08 TD /F9 9 Tf
-0.0092 Tc 0.0092 Tw (=> puts stdout "Hello, World!") Tj
0 -12.96 TD /F5 9 Tf
-0.0071 Tc 0.0071 Tw (# sometime later...) Tj
T* 0 Tc -0.12 Tw (eval $cmd) Tj
0 -13.08 TD /F9 9 Tf
-0.0086 Tc 0.0086 Tw (=> Hello, World!) Tj
ET
BT
0.9955 0 0 0.9955 114 323.28 Tm
/F4 10 Tf
0.0074 Tc -0.0362 Tw (In this case, the value of ) Tj
ET
BT
229.08 323.28 TD
/F5 9 Tf
0 Tc 0 Tw (cmd) Tj
ET
BT
0.9955 0 0 0.9955 245.28 323.28 Tm
/F4 10 Tf
0.0136 Tc -0.0344 Tw ( is passed to Tcl. All the standard grouping and sub-) Tj
-131.879 -12.0547 TD 0.0135 Tc -0.0102 Tw (stitution are done again on the value, which is a ) Tj
ET
BT
338.88 311.28 TD
/F5 9 Tf
-0.03 Tc 0 Tw (puts) Tj
ET
BT
0.9955 0 0 0.9955 360.48 311.28 Tm
/F4 10 Tf
0.008 Tc 0.1038 Tw ( command. ) Tj
-223.495 -12.0547 TD 0.025 Tc 0 Tw (Howeve) Tj
-1.0667 Tc (r) Tj
0.0192 Tc -0.1206 Tw (, suppose that part of the command is stored in a variable, but that) Tj
-24.1095 -12.0547 TD 0.0178 Tc 0.8926 Tw (variable will not be defined at the time ) Tj
ET
BT
303.36 287.28 TD
/F5 9 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 324.96 287.28 Tm
/F4 10 Tf
0.0016 Tc 0.9541 Tw ( is used. ) Tj
-0.0153 Tc 0.9711 Tw (We can artificially create) Tj
-211.9225 -12.0547 TD 0.019 Tc -0.0278 Tw (this situation like this:) Tj
ET
BT
150 261.96 TD
/F5 9 Tf
-0.0104 Tc 0.0104 Tw (set string "Hello, World!") Tj
0 -12.96 TD -0.0096 Tc 0.0096 Tw (set cmd {puts stdout $string}) Tj
T* /F9 9 Tf
-0.0126 Tc 0.0126 Tw (=> puts stdout $string) Tj
0 -13.08 TD /F5 9 Tf
-0.0109 Tc 0.0109 Tw (unset string) Tj
0 -12.96 TD 0 Tc -0.12 Tw (eval $cmd) Tj
T* /F9 9 Tf
-0.0106 Tc 0.0106 Tw (=> can\222t read "string": no such variable) Tj
ET
BT
0.9955 0 0 0.9955 114 183.36 Tm
/F4 10 Tf
0.0221 Tc -0.0912 Tw (In this case, the command contains ) Tj
ET
BT
279.12 183.36 TD
/F5 9 Tf
-0.0514 Tc 0 Tw ($string) Tj
ET
BT
0.9955 0 0 0.9955 316.56 183.36 Tm
/F4 10 Tf
0.0134 Tc -0.0221 Tw (. When this is processed by ) Tj
ET
BT
443.88 183.36 TD
/F5 9 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 465.48 183.36 Tm
/F4 10 Tf
0.0132 Tc -0.022 Tw (, the) Tj
-353.0836 -12.0547 TD 0.0091 Tc 0.0683 Tw (interpreter looks for the current value of ) Tj
ET
BT
304.08 171.36 TD
/F5 9 Tf
-0.06 Tc 0 Tw (string) Tj
ET
BT
0.9955 0 0 0.9955 336.24 171.36 Tm
/F4 10 Tf
0.0129 Tc 0.0507 Tw (, which is undefined. This exam-) Tj
-223.2539 -12.0547 TD 0.0153 Tc 0.9269 Tw (ple is contrived, but the same problem occurs if ) Tj
ET
BT
342.72 159.36 TD
/F5 9 Tf
0 Tc 0 Tw (string) Tj
ET
BT
0.9955 0 0 0.9955 375.12 159.36 Tm
/F4 10 Tf
0.008 Tc 0.9236 Tw ( is a local variable, and) Tj
ET
BT
114 147.36 TD
/F5 9 Tf
0 Tc 0 Tw (cmd) Tj
ET
BT
0.9955 0 0 0.9955 130.2 147.36 Tm
/F4 10 Tf
0.0126 Tc -0.008 Tw ( will be evaluated later in the global scope. ) Tj
7.8356 -12.0547 TD 0.0221 Tc -0.1144 Tw (A common mistake is to use double quotes to group the command. That will) Tj
ET
1 1 1 rg
72.12 559.44 35.76 35.76 re f
90 593.52 m
74.04 577.44 l
90 561.48 l
105.96 577.44 l
90 593.52 l
f*
0 0 0 rg
90.24 593.28 m
74.28 577.2 l
73.92 577.2 l
74.28 577.56 l
90.24 561.6 l
90.24 561.24 l
89.88 561.6 l
105.84 577.56 l
106.2 577.56 l
106.44 577.32 l
106.2 577.2 l
90.12 561.12 l
89.88 561.24 l
73.8 577.32 l
73.92 577.56 l
89.88 593.64 l
90.24 593.28 l
f
105.84 577.2 m
89.88 593.28 l
89.88 593.64 l
90.12 593.88 l
90.24 593.64 l
106.2 577.56 l
105.84 577.2 l
f
0.302 0.302 0.302 rg
90 561.48 m
74.04 577.44 l
90 577.44 l
90 561.48 l
f*
0 0 0 rg
89.88 561.24 m
73.44 577.68 l
74.04 577.68 l
74.28 577.56 l
90.24 561.6 l
89.88 561.24 l
f
74.04 577.2 16.2 0.48 re f
90.24 577.44 m
90.24 560.88 l
89.88 561.24 l
89.76 561.48 l
89.76 577.44 l
90.24 577.44 l
f
0.102 0.102 0.102 rg
90 561.48 m
105.96 577.44 l
90 577.44 l
90 561.48 l
f*
0 0 0 rg
89.88 561.6 m
105.96 577.68 l
106.68 577.68 l
90.24 561.24 l
89.88 561.6 l
f
89.76 577.2 16.2 0.48 re f
90.24 577.44 m
90.24 561.24 l
89.76 560.76 l
89.76 577.44 l
90.24 577.44 l
f
0.702 0.702 0.702 rg
90 593.52 m
105.96 577.44 l
90 577.44 l
90 593.52 l
f*
0 0 0 rg
90.24 593.64 m
106.2 577.56 l
106.56 577.2 l
105.84 577.2 l
89.88 593.28 l
90.24 593.64 l
f
89.76 577.2 16.2 0.48 re f
89.76 577.44 m
89.76 594.12 l
90.24 593.64 l
90.24 577.44 l
89.76 577.44 l
f
0.9686 0.9686 0.9686 rg
90 593.52 m
74.04 577.44 l
90 577.44 l
90 593.52 l
f*
0 0 0 rg
90.24 593.28 m
74.28 577.2 l
73.56 577.2 l
73.92 577.56 l
89.88 593.64 l
90.24 593.28 l
f
74.04 577.2 16.2 0.48 re f
89.76 577.44 m
89.76 593.52 l
90.24 594 l
90.24 577.44 l
89.76 577.44 l
f
0.502 0.502 0.502 rg
90 584.52 m
83.04 577.44 l
90 570.48 l
96.96 577.44 l
90 584.52 l
f*
0.102 0.102 0.102 rg
90.24 584.28 m
83.28 577.2 l
82.92 577.2 l
83.28 577.56 l
90.24 570.6 l
90.24 570.24 l
89.88 570.6 l
96.84 577.56 l
97.2 577.56 l
97.44 577.32 l
97.2 577.2 l
90.12 570.12 l
89.88 570.24 l
82.8 577.32 l
82.92 577.56 l
89.88 584.64 l
90.24 584.28 l
f
96.84 577.2 m
89.88 584.28 l
89.88 584.64 l
90.12 584.88 l
90.24 584.64 l
97.2 577.56 l
96.84 577.2 l
f
endstream
endobj
31 0 obj
10479
endobj
28 0 obj
<<
/Type /Page
/Parent 5 0 R
/Resources <<
/Font 33 0 R
/ProcSet 2 0 R
>>
/Contents 30 0 R
>>
endobj
33 0 obj
<<
/F0 6 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
/F7 25 0 R
/F8 29 0 R
/F9 32 0 R
>>
endobj
35 0 obj
<<
/Length 36 0 R
>>
stream
BT
108.96 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0402 Tc -0.022 Tw (Constructing Code with the ) Tj
98.28 0 TD /F5 7.92 Tf
0.018 Tc 0 Tw (list) Tj
19.2 0 TD /F0 7.92 Tf
0.0447 Tc 0.0335 Tw ( Command) Tj
239.28 0 TD 0.0765 Tc 0 Tw (123) Tj
ET
108.48 701.88 0.48 0.96 re f
480.72 701.88 0.48 0.96 re f
108.96 701.88 371.76 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
553.8 746.76 0.24 0.48 re f
585 746.76 0.24 0.48 re f
554.04 746.76 30.96 0.48 re f
585 80.76 0.24 0.48 re f
554.76 80.76 0.24 0.48 re f
555 80.76 30 0.48 re f
547.8 75 0.48 0.24 re f
547.8 34.8 0.48 0.24 re f
547.8 35.04 0.48 39.96 re f
510 504 54 108 re f
510 611.76 54.24 0.48 re f
563.76 503.76 0.48 108.24 re f
509.76 503.76 54.24 0.48 re f
509.76 504 0.48 108.24 re f
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 605.52 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 602.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 598.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (.) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 595.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 592.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (A) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 583.2 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 575.28 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (v) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 568.56 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (a) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 560.64 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (n) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 553.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 545.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (e) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 538.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 530.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 526.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (T) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 521.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 514.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (l) Tj
ET
Q
BT
0.9955 0 0 0.9955 108.96 670.32 Tm
/F4 10 Tf
0.0031 Tc 0.7115 Tw (let ) Tj
ET
BT
124.44 670.32 TD
/F5 9 Tf
-0.0171 Tc 0 Tw ($string) Tj
ET
BT
0.9955 0 0 0.9955 162.24 670.32 Tm
/F4 10 Tf
0.013 Tc 0.6614 Tw ( be substituted no) Tj
-1.1534 Tc 0 Tw (w) Tj
0.0202 Tc 0.5738 Tw (. Howeve) Tj
-0.9461 Tc 0 Tw (r) Tj
0.0154 Tc 0.6388 Tw (, this works only if string has a simple) Tj
-53.5231 -12.0547 TD 0.0145 Tc 0.0069 Tw (value, but it fails if the value of ) Tj
ET
BT
256.68 658.32 TD
/F5 9 Tf
0 Tc 0 Tw (string) Tj
ET
BT
0.9955 0 0 0.9955 288.96 658.32 Tm
/F4 10 Tf
0.0158 Tc 0.0099 Tw ( contains spaces or other Tcl special char-) Tj
-180.8212 -12.0547 TD 0.0152 Tc 0 Tw (acters:) Tj
ET
BT
144.96 633 TD
/F5 9 Tf
-0.0096 Tc 0.0096 Tw (set cmd "puts stdout $string") Tj
0 -12.96 TD /F9 9 Tf
-0.01 Tc 0.01 Tw (=> puts stdout Hello, World!) Tj
0 -13.08 TD /F5 9 Tf
0 Tc 0 Tw (eval $cmd) Tj
0 -12.96 TD /F9 9 Tf
-0.0088 Tc 0.0088 Tw (=> bad argument "World!": should be "nonewline") Tj
ET
BT
0.9955 0 0 0.9955 132.96 580.32 Tm
/F4 10 Tf
0.0108 Tc 0.2215 Tw (The problem is that we have lost some important structure. The identity of) Tj
ET
BT
108.96 568.32 TD
/F5 9 Tf
0 Tc 0 Tw ($string) Tj
ET
BT
0.9955 0 0 0.9955 146.76 568.32 Tm
/F4 10 Tf
0.0196 Tc 0.7121 Tw ( as a single argument gets lost in the second round of parsing by ) Tj
ET
BT
456.6 568.32 TD
/F5 9 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 478.2 568.32 Tm
/F4 10 Tf
-0.0087 Tc (.) Tj
-370.9246 -12.0547 TD 0.0183 Tc 0.6085 Tw (The solution to this problem is to construct the command using ) Tj
ET
BT
410.04 556.32 TD
/F5 9 Tf
0 Tc 0 Tw (list) Tj
ET
BT
0.9955 0 0 0.9955 431.64 556.32 Tm
/F4 10 Tf
0.0219 Tc 0.5721 Tw (, as shown) Tj
-324.1522 -12.0547 TD 0.0188 Tc -0.0275 Tw (in the following example:) Tj
ET
1 1 1 rg
108.96 510.96 372 8.04 re f
0 0 0 rg
131.76 514.8 0.24 0.48 re f
480 514.8 0.24 0.48 re f
132 514.8 348 0.48 re f
BT
132.96 521.64 TD
/F1 7.92 Tf
0.0414 Tc 0.0368 Tw (Example 10\226) Tj
3.9965 Tc 0 Tw (1) Tj
56.88 0 TD /F0 7.92 Tf
0.0553 Tc -0.0971 Tw (Using ) Tj
22.68 0 TD /F5 9 Tf
0 Tc 0 Tw (list) Tj
21.6 0 TD /F0 7.92 Tf
0.0486 Tc -0.0904 Tw ( to construct commands.) Tj
-101.16 -22.68 TD /F5 9 Tf
0 Tc -0.04 Tw (set string "Hello, World!") Tj
0 -9.96 TD -0.0083 Tc 0.0083 Tw (set cmd [list puts stdout $string]) Tj
T* /F9 9 Tf
-0.0092 Tc 0.0092 Tw (=> puts stdout {Hello, World!}) Tj
0 -10.08 TD /F5 9 Tf
-0.0109 Tc 0.0109 Tw (unset string) Tj
0 -9.96 TD 0 Tc 0 Tw (eval $cmd) Tj
ET
1 1 1 rg
108.96 438 372 8.04 re f
0 0 0 rg
131.76 441.72 0.24 0.48 re f
480 441.72 0.24 0.48 re f
132 441.72 348 0.48 re f
BT
132.96 449.04 TD
/F9 9 Tf
-0.0086 Tc 0.0086 Tw (=> Hello, World!) Tj
ET
BT
0.9955 0 0 0.9955 132.96 422.4 Tm
/F4 10 Tf
0.0182 Tc 1.2689 Tw (The trick is that ) Tj
ET
BT
216 422.4 TD
/F5 9 Tf
0 Tc 0 Tw (list) Tj
ET
BT
0.9955 0 0 0.9955 237.6 422.4 Tm
/F4 10 Tf
0.0165 Tc 1.2857 Tw ( has formed a list containing three elements: ) Tj
ET
BT
456.96 422.4 TD
/F5 9 Tf
-0.06 Tc 0 Tw (puts) Tj
ET
BT
0.9955 0 0 0.9955 478.2 422.4 Tm
/F4 10 Tf
-0.0087 Tc (,) Tj
ET
BT
108.96 410.4 TD
/F5 9 Tf
0 Tc (stdout) Tj
ET
BT
0.9955 0 0 0.9955 141.36 410.4 Tm
/F4 10 Tf
0.0151 Tc 0.3137 Tw (, and the value of ) Tj
ET
BT
225.48 410.4 TD
/F5 9 Tf
-0.04 Tc 0 Tw (string) Tj
ET
BT
0.9955 0 0 0.9955 257.64 410.4 Tm
/F4 10 Tf
0.0099 Tc 0.343 Tw (. The substitution of ) Tj
ET
BT
354.96 410.4 TD
/F5 9 Tf
0 Tc 0 Tw ($string) Tj
ET
BT
0.9955 0 0 0.9955 392.76 410.4 Tm
/F4 10 Tf
0.0171 Tc 0.2956 Tw ( occurs before ) Tj
ET
BT
459.48 410.4 TD
/F5 9 Tf
0 Tc 0 Tw (list) Tj
ET
BT
0.9955 0 0 0.9955 108.96 398.4 Tm
/F4 10 Tf
0.0247 Tc 1.0916 Tw (is called, and ) Tj
ET
BT
175.68 398.4 TD
/F5 9 Tf
-0.03 Tc 0 Tw (list) Tj
ET
BT
0.9955 0 0 0.9955 197.28 398.4 Tm
/F4 10 Tf
0.0084 Tc 1.1446 Tw ( takes care of grouping that value for us. In contrast, using) Tj
-88.7229 -12.0547 TD 0.0204 Tc -0.0291 Tw (double quotes is equivalent to:) Tj
ET
BT
144.96 372.96 TD
/F5 9 Tf
-0.0077 Tc 0.0077 Tw (set cmd [concat puts stdout $string]) Tj
ET
BT
0.9955 0 0 0.9955 132.96 359.4 Tm
/F7 10 Tf
0.0041 Tc 0.0174 Tw (Double quotes lose list structure.) Tj
0 -13.1397 TD /F4 10 Tf
0.0262 Tc 0.1578 Tw (The problem here is that ) Tj
ET
BT
251.16 346.32 TD
/F5 9 Tf
-0.02 Tc 0 Tw (concat) Tj
ET
BT
0.9955 0 0 0.9955 283.44 346.32 Tm
/F4 10 Tf
0.0093 Tc 0.2058 Tw ( does not preserve list structure. The main) Tj
-175.276 -12.0547 TD 0.0241 Tc 0.8712 Tw (lesson is that you should use ) Tj
ET
BT
249.72 334.32 TD
/F5 9 Tf
0 Tc 0 Tw (list) Tj
ET
BT
0.9955 0 0 0.9955 271.32 334.32 Tm
/F4 10 Tf
0.0242 Tc 0.8453 Tw ( to construct commands if they contain vari-) Tj
-163.1007 -12.0547 TD 0.016 Tc 0.3369 Tw (able values or command results that must be substituted no) Tj
-1.1534 Tc 0 Tw (w) Tj
0.02 Tc 0.3028 Tw (. If you use double) Tj
0 -12.0547 TD 0.0157 Tc -0.0746 Tw (quotes, the values are substituted but you lose proper command structure. If you) Tj
T* 0.0142 Tc -0.0096 Tw (use curly braces, then values are not substituted until late) Tj
-0.9461 Tc 0 Tw (r) Tj
0.0112 Tc -0.0199 Tw (, which may not be in) Tj
T* 0.0091 Tc 0.0425 Tw (the right context.) Tj
24.1095 -30.1369 TD /F2 10 Tf
0.0218 Tc -0.0204 Tw (Commands That Concatenate Their Arguments) Tj
0 -18.0821 TD /F4 10 Tf
0.0176 Tc 0.4558 Tw (The ) Tj
ET
BT
153.96 238.32 TD
/F5 9 Tf
0 Tc 0 Tw (uplevel) Tj
ET
BT
0.9955 0 0 0.9955 191.76 238.32 Tm
/F4 10 Tf
-0.0087 Tc 0.3617 Tw (, ) Tj
ET
BT
197.76 238.32 TD
/F5 9 Tf
0 Tc 0 Tw (after) Tj
ET
BT
0.9955 0 0 0.9955 224.64 238.32 Tm
/F4 10 Tf
0.0205 Tc 0.4529 Tw ( and ) Tj
ET
BT
248.52 238.32 TD
/F5 9 Tf
-0.03 Tc 0 Tw (send) Tj
ET
BT
0.9955 0 0 0.9955 270.12 238.32 Tm
/F4 10 Tf
0.0151 Tc 0.4583 Tw ( commands concatenate their arguments into) Tj
-161.8953 -12.0547 TD 0.0189 Tc 0.3997 Tw (a command and execute it later in a different context. The ) Tj
ET
BT
384.48 226.32 TD
/F5 9 Tf
0 Tc 0 Tw (uplevel) Tj
ET
BT
0.9955 0 0 0.9955 422.28 226.32 Tm
/F4 10 Tf
0.0273 Tc 0.3256 Tw ( command is) Tj
-314.7495 -12.0547 TD 0.0183 Tc 0.3748 Tw (described on page ) Tj
86.312 0 TD 0.015 Tc 0.3379 Tw (130, ) Tj
ET
BT
217.44 214.32 TD
/F5 9 Tf
0 Tc 0 Tw (after) Tj
ET
BT
0.9955 0 0 0.9955 244.44 214.32 Tm
/F4 10 Tf
0.0121 Tc 0.3649 Tw ( is described on page ) Tj
100.2955 0 TD 0.0173 Tc 0.3958 Tw (218, and ) Tj
ET
BT
387.48 214.32 TD
/F5 9 Tf
-0.03 Tc 0 Tw (send) Tj
ET
BT
0.9955 0 0 0.9955 409.08 214.32 Tm
/F4 10 Tf
0.0051 Tc 0.4282 Tw ( is described on) Tj
-301.4893 -12.0547 TD 0.0348 Tc 0.5591 Tw (page ) Tj
25.1944 0 TD 0.021 Tc 0.6332 Tw (560. Whenever I discover such a command, I put it on my danger list and) Tj
-25.1944 -12.0547 TD 0.0175 Tc -0.0745 Tw (make sure I explicitly form a single command argument with ) Tj
ET
BT
393.6 190.32 TD
/F5 9 Tf
0 Tc 0 Tw (list) Tj
ET
BT
0.9955 0 0 0.9955 415.08 190.32 Tm
/F4 10 Tf
0.0229 Tc -0.112 Tw ( instead of let-) Tj
-307.5166 -12.0547 TD 0.0036 Tc 0.1083 Tw (ting the command ) Tj
ET
BT
195.48 178.32 TD
/F5 9 Tf
-0.02 Tc 0 Tw (concat) Tj
ET
BT
0.9955 0 0 0.9955 227.76 178.32 Tm
/F4 10 Tf
0.0154 Tc -0.0091 Tw ( items for me. Get in the habit now:) Tj
ET
BT
144.96 165 TD
/F5 9 Tf
-0.0073 Tc 0.0073 Tw (after 100 [list doCmd $param1 $param2]) Tj
0 -12.96 TD 0 Tc 0 Tw (send) Tj
21.6 0 TD -0.0075 Tc 0.0075 Tw ( $interp [list doCmd $param1 $param2]) Tj
199.56 0 TD 0 Tc -0.12 Tw (;# Safe!) Tj
ET
BT
0.9955 0 0 0.9955 132.96 138.36 Tm
/F4 10 Tf
0.0222 Tc 0.8129 Tw (The danger here is that ) Tj
ET
BT
248.76 138.36 TD
/F5 9 Tf
0 Tc 0 Tw (concat) Tj
ET
BT
0.9955 0 0 0.9955 281.16 138.36 Tm
/F4 10 Tf
0.0205 Tc 0.8146 Tw ( and ) Tj
ET
BT
305.76 138.36 TD
/F5 9 Tf
0 Tc 0 Tw (list) Tj
ET
BT
0.9955 0 0 0.9955 327.36 138.36 Tm
/F4 10 Tf
0.0084 Tc 0.8268 Tw ( can result in the same thing, so) Tj
ET
1 1 1 rg
487.2 344.52 35.64 35.64 re f
504.96 378.48 m
489 362.52 l
504.96 346.44 l
521.04 362.52 l
504.96 378.48 l
f*
0 0 0 rg
505.2 378.24 m
489.24 362.28 l
488.88 362.28 l
489.24 362.64 l
505.2 346.56 l
505.2 346.2 l
504.84 346.56 l
520.92 362.64 l
521.28 362.64 l
521.4 362.52 l
521.28 362.28 l
504.96 345.96 l
504.84 346.2 l
488.88 362.28 l
488.64 362.52 l
488.88 362.64 l
504.84 378.6 l
505.2 378.24 l
f
520.92 362.28 m
504.84 378.24 l
504.84 378.6 l
504.96 378.72 l
505.2 378.6 l
521.28 362.64 l
520.92 362.28 l
f
0.302 0.302 0.302 rg
504.96 346.44 m
489 362.52 l
504.96 362.52 l
504.96 346.44 l
f*
0 0 0 rg
504.84 346.2 m
488.88 362.28 l
488.4 362.76 l
489 362.76 l
489.24 362.64 l
505.2 346.56 l
504.84 346.2 l
f
489 362.28 16.2 0.48 re f
505.2 362.52 m
505.2 345.84 l
504.84 346.2 l
504.72 346.44 l
504.72 362.52 l
505.2 362.52 l
f
0.102 0.102 0.102 rg
504.96 346.44 m
521.04 362.52 l
504.96 362.52 l
504.96 346.44 l
f*
0 0 0 rg
504.84 346.56 m
521.04 362.76 l
521.76 362.76 l
505.2 346.2 l
504.84 346.56 l
f
504.72 362.28 16.32 0.48 re f
505.2 362.52 m
505.2 346.2 l
504.72 345.72 l
504.72 362.52 l
505.2 362.52 l
f
0.702 0.702 0.702 rg
504.96 378.48 m
521.04 362.52 l
504.96 362.52 l
504.96 378.48 l
f*
0 0 0 rg
505.2 378.6 m
521.28 362.64 l
521.64 362.28 l
520.92 362.28 l
504.84 378.24 l
505.2 378.6 l
f
504.72 362.28 16.32 0.48 re f
504.72 362.52 m
504.72 379.08 l
505.2 378.6 l
505.2 362.52 l
504.72 362.52 l
f
0.9686 0.9686 0.9686 rg
504.96 378.48 m
489 362.52 l
504.96 362.52 l
504.96 378.48 l
f*
0 0 0 rg
505.2 378.24 m
489.24 362.28 l
488.52 362.28 l
504.84 378.6 l
505.2 378.24 l
f
489 362.28 16.2 0.48 re f
504.72 362.52 m
504.72 378.48 l
505.2 378.96 l
505.2 362.52 l
504.72 362.52 l
f
0.502 0.502 0.502 rg
504.96 369.48 m
498 362.52 l
504.96 355.44 l
512.04 362.52 l
504.96 369.48 l
f*
0.102 0.102 0.102 rg
505.2 369.24 m
498.24 362.28 l
497.88 362.28 l
498.24 362.64 l
505.2 355.56 l
505.2 355.2 l
504.84 355.56 l
511.92 362.64 l
512.28 362.64 l
512.4 362.52 l
512.28 362.28 l
504.96 354.96 l
504.84 355.2 l
497.88 362.28 l
497.64 362.52 l
497.88 362.64 l
504.84 369.6 l
505.2 369.24 l
f
511.92 362.28 m
504.84 369.24 l
504.84 369.6 l
504.96 369.72 l
505.2 369.6 l
512.28 362.64 l
511.92 362.28 l
f
endstream
endobj
36 0 obj
13122
endobj
34 0 obj
<<
/Type /Page
/Parent 5 0 R
/Resources <<
/Font 37 0 R
/ProcSet 2 0 R
>>
/Contents 35 0 R
>>
endobj
37 0 obj
<<
/F0 6 0 R
/F1 7 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
/F7 25 0 R
/F9 32 0 R
>>
endobj
39 0 obj
<<
/Length 40 0 R
>>
stream
BT
114 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0365 Tc -0.0782 Tw (124 ) Tj
243.96 0 TD 0.04 Tc -0.0418 Tw (Quoting Issues and Eval) Tj
86.76 0 TD 0.0261 Tc 0.0282 Tw ( Chap. 10) Tj
ET
113.52 701.88 0.48 0.96 re f
486 701.88 0.48 0.96 re f
114 701.88 372 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
554.76 746.76 0.24 0.48 re f
584.04 746.76 0.24 0.48 re f
555 746.76 29.04 0.48 re f
585 80.76 0.24 0.48 re f
553.8 80.76 0.24 0.48 re f
554.04 80.76 30.96 0.48 re f
548.76 69.96 0.48 0.24 re f
548.76 33.72 0.48 0.24 re f
548.76 33.96 0.48 36 re f
BT
0.9955 0 0 0.9955 114 670.32 Tm
/F4 10 Tf
0.0181 Tc 0.8813 Tw (you can be led down the rosy garden path only to get errors later when values) Tj
0 -12.0547 TD 0.0152 Tc 2.0354 Tw (change. The two previous examples always work. The next two work only if) Tj
ET
BT
114 646.32 TD
/F5 9 Tf
-0.02 Tc 0 Tw (param1) Tj
ET
BT
0.9955 0 0 0.9955 146.4 646.32 Tm
/F4 10 Tf
0.0205 Tc 0.031 Tw ( and ) Tj
ET
BT
169.32 646.32 TD
/F5 9 Tf
-0.02 Tc 0 Tw (param2) Tj
ET
BT
0.9955 0 0 0.9955 201.72 646.32 Tm
/F4 10 Tf
0.0144 Tc -0.006 Tw ( have values that are single list elements:) Tj
ET
BT
150 633 TD
/F5 9 Tf
-0.0089 Tc 0.0089 Tw (after 100 doCmd $param1 $param2) Tj
0 -12.96 TD -0.004 Tc -0.026 Tw (send $interp doCmd $param1 $param2) Tj
183.36 0 TD -0.0133 Tc 0.0133 Tw (;# Unsafe!) Tj
ET
BT
0.9955 0 0 0.9955 138 606.36 Tm
/F4 10 Tf
0.0163 Tc 1.3612 Tw (If you use other Tcl extensions that provide ) Tj
ET
BT
352.08 606.36 TD
/F5 9 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 373.68 606.36 Tm
/F4 10 Tf
0.015 Tc 1.3022 Tw (-like functionalit) Tj
-1.1533 Tc 0 Tw (y) Tj
0.0192 Tc 1.2981 Tw (, care-) Tj
-260.8648 -12.0547 TD 0.0221 Tc 2.0426 Tw (fully check their documentation to see whether they contain commands that) Tj
ET
BT
114 582.36 TD
/F5 9 Tf
-0.02 Tc 0 Tw (concat) Tj
ET
BT
0.9955 0 0 0.9955 146.4 582.36 Tm
/F4 10 Tf
0.0237 Tc 0.2488 Tw ( their arguments into a command. ) Tj
-0.0346 Tc 0.3274 Tw (For example, Tcl-D) Tj
-1.2484 Tc 0 Tw (P) Tj
0.0125 Tc 0.3002 Tw (, which provides a) Tj
-32.5478 -12.0547 TD 0.0118 Tc 0.0197 Tw (network version of ) Tj
ET
BT
202.44 570.36 TD
/F5 9 Tf
0 Tc 0 Tw (send) Tj
ET
BT
0.9955 0 0 0.9955 224.04 570.36 Tm
/F4 10 Tf
-0.0087 Tc 0 Tw (, ) Tj
ET
BT
229.56 570.36 TD
/F5 9 Tf
0 Tc 0 Tw (dp_send) Tj
ET
BT
0.9955 0 0 0.9955 267.36 570.36 Tm
/F4 10 Tf
0.0223 Tc -0.0311 Tw (, also uses ) Tj
ET
BT
317.16 570.36 TD
/F5 9 Tf
-0.02 Tc 0 Tw (concat) Tj
ET
BT
0.9955 0 0 0.9955 349.56 570.36 Tm
/F4 10 Tf
-0.0087 Tc (.) Tj
-212.5252 -30.1369 TD /F2 10 Tf
0.0127 Tc 0.0389 Tw (Commands That Use Callbacks) Tj
0 -18.0821 TD /F4 10 Tf
0.0181 Tc 0.972 Tw (The general strategy of passing out a command or script to call later is a) Tj
-24.1095 -12.0547 TD 0.0129 Tc -0.2541 Tw (flexible way to assemble different parts of an application, and it is widely used by) Tj
0 -12.0547 TD 0.0114 Tc 0.3416 Tw (Tcl commands. Examples include commands that are called when users click on) Tj
T* 0.0163 Tc 1.4216 Tw (Tk buttons, commands that are called when I/O channels have data read) Tj
-1.2738 Tc 0 Tw (y) Tj
0.0234 Tc 1.4144 Tw (, or) Tj
T* 0.0122 Tc -0.2064 Tw (commands that are called when clients connect to network servers. It is also easy) Tj
T* 0.0161 Tc 0.7726 Tw (to write your own procedures or C extensions that accept scripts and call them) Tj
T* 0.0138 Tc 0.0176 Tw (later in response to some event. ) Tj
24.1095 -12.0547 TD 0.0119 Tc 0.8232 Tw (These other callback situations may not appear to have the ") Tj
ET
BT
426 438.36 TD
/F5 9 Tf
-0.02 Tc 0 Tw (concat) Tj
ET
BT
0.9955 0 0 0.9955 458.4 438.36 Tm
/F4 10 Tf
0.0298 Tc 0.8052 Tw ( prob-) Tj
-345.9713 -12.0547 TD 0.012 Tc 1.1697 Tw (lem" because they take a single script argument. Howeve) Tj
-1.0667 Tc 0 Tw (r) Tj
0.0101 Tc 1.1625 Tw (, as soon as you use) Tj
0 -12.0547 TD 0.0143 Tc 0.4591 Tw (double quotes to group that argument, you have created the ) Tj
ET
BT
397.56 414.36 TD
/F5 9 Tf
0 Tc 0 Tw (concat) Tj
ET
BT
0.9955 0 0 0.9955 429.96 414.36 Tm
/F4 10 Tf
0.0124 Tc 0.4611 Tw ( problem all) Tj
-317.4015 -12.0547 TD 0.0161 Tc 1.3464 Tw (over again. So, all the caveats about using ) Tj
ET
BT
322.08 402.36 TD
/F5 9 Tf
0 Tc 0 Tw (list) Tj
ET
BT
0.9955 0 0 0.9955 343.68 402.36 Tm
/F4 10 Tf
0.0178 Tc 1.3899 Tw ( to construct these commands) Tj
-230.7279 -12.0547 TD 0.004 Tc 0.1078 Tw (still appl) Tj
-1.2738 Tc 0 Tw (y) Tj
-0.0087 Tc 0 Tw (. ) Tj
24.1095 -30.1369 TD /F2 10 Tf
0.0183 Tc -0.047 Tw (Command Prefix Callbacks) Tj
0 -18.0821 TD /F4 10 Tf
0.0192 Tc -0.0949 Tw (There is a variation on command callbacks called a ) Tj
238.8046 0 TD /F7 10 Tf
0.0179 Tc -0.0267 Tw (command prefix) Tj
74.4984 0 TD /F4 10 Tf
0.0152 Tc -0.0842 Tw (. In this) Tj
-337.4124 -12.0547 TD 0.0179 Tc 1.1185 Tw (case, the command is given additional arguments when it is invoked. In other) Tj
0 -12.0547 TD 0.0125 Tc 0.0252 Tw (words, you provide only part of the command, the command prefix, and the mod-) Tj
T* 0.0145 Tc 1.568 Tw (ule that invokes the callback adds additional arguments before using ) Tj
ET
BT
451.2 306.36 TD
/F5 9 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 472.8 306.36 Tm
/F4 10 Tf
0.0132 Tc 1.5451 Tw ( to) Tj
-360.437 -12.0547 TD 0.0101 Tc 0.0616 Tw (invoke the command. ) Tj
24.1095 -12.0547 TD -0.0033 Tc 1.6478 Tw (For example, when you create a network serve) Tj
-0.9461 Tc 0 Tw (r) Tj
0.0113 Tc 1.6676 Tw (, you supply a procedure) Tj
-24.1095 -12.0547 TD 0.017 Tc 1.0778 Tw (that is called when a client makes a connection. That procedure is called with) Tj
0 -12.0547 TD 0.0051 Tc -0.0248 Tw (three additional arguments that indicate the client\222s socket, IP address, and port) Tj
T* 0.028 Tc 0 Tw (numbe) Tj
-1.0667 Tc (r) Tj
0.0237 Tc -0.3003 Tw (. This is described in more detail on page ) Tj
225.3033 0 TD 0.0128 Tc -0.2626 Tw (227. The tricky thing is that you) Tj
-225.3033 -12.0547 TD 0.0161 Tc -0.0712 Tw (can define your callback procedure to take four \(or more\) arguments. In this case) Tj
0 -12.0547 TD 0.0166 Tc 0.6979 Tw (you specify some of the parameters when you define the callback, and then the) Tj
T* 0.017 Tc -0.2668 Tw (socket subsystem specifies the remaining arguments when it makes the callback.) Tj
T* 0.0163 Tc -0.0116 Tw (The following command creates the server side of a socket:) Tj
ET
BT
150 185.04 TD
/F5 9 Tf
-0.0086 Tc 0.0086 Tw (set virtualhost www.beedub.com) Tj
0 -13.08 TD -0.0088 Tc 0.0088 Tw (socket -server [list Accept $virtualhost] 8080) Tj
ET
BT
0.9955 0 0 0.9955 138 158.28 Tm
/F4 10 Tf
0.025 Tc 0 Tw (Howeve) Tj
-1.0667 Tc (r) Tj
0.0144 Tc 0.007 Tw (, you define the ) Tj
ET
BT
251.52 158.28 TD
/F5 9 Tf
0 Tc 0 Tw (Accept) Tj
ET
BT
0.9955 0 0 0.9955 283.92 158.28 Tm
/F4 10 Tf
0.0091 Tc 0.0224 Tw ( procedure like this:) Tj
ET
BT
150 144.96 TD
/F5 9 Tf
-0.0032 Tc -0.0268 Tw (proc Accept {myname sock ipaddr port} { ... }) Tj
ET
BT
0.9955 0 0 0.9955 138 131.28 Tm
/F4 10 Tf
0.0176 Tc 0.5763 Tw (The ) Tj
ET
BT
159.12 131.28 TD
/F5 9 Tf
-0.02 Tc 0 Tw (myname) Tj
ET
BT
0.9955 0 0 0.9955 191.4 131.28 Tm
/F4 10 Tf
0.0217 Tc 0.5241 Tw ( parameter is set when you construct the command prefix. The) Tj
ET
endstream
endobj
40 0 obj
7660
endobj
38 0 obj
<<
/Type /Page
/Parent 5 0 R
/Resources <<
/Font <<
/F0 6 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
/F7 25 0 R
>>
/ProcSet 2 0 R
>>
/Contents 39 0 R
>>
endobj
43 0 obj
<<
/Length 44 0 R
>>
stream
BT
108.96 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0402 Tc -0.022 Tw (Constructing Code with the ) Tj
98.28 0 TD /F5 7.92 Tf
0.018 Tc 0 Tw (list) Tj
19.2 0 TD /F0 7.92 Tf
0.0447 Tc 0.0335 Tw ( Command) Tj
239.28 0 TD 0.0765 Tc 0 Tw (125) Tj
ET
108.48 701.88 0.48 0.96 re f
480.72 701.88 0.48 0.96 re f
108.96 701.88 371.76 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
553.8 746.76 0.24 0.48 re f
585 746.76 0.24 0.48 re f
554.04 746.76 30.96 0.48 re f
585 80.76 0.24 0.48 re f
554.76 80.76 0.24 0.48 re f
555 80.76 30 0.48 re f
547.8 75 0.48 0.24 re f
547.8 34.8 0.48 0.24 re f
547.8 35.04 0.48 39.96 re f
510 504 54 108 re f
510 611.76 54.24 0.48 re f
563.76 503.76 0.48 108.24 re f
509.76 503.76 54.24 0.48 re f
509.76 504 0.48 108.24 re f
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 605.52 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 602.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 598.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (.) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 595.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 592.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (A) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 583.2 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 575.28 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (v) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 568.56 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (a) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 560.64 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (n) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 553.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 545.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (e) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 538.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 530.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 526.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (T) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 521.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 514.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (l) Tj
ET
Q
BT
0.9955 0 0 0.9955 108.96 670.32 Tm
/F4 10 Tf
0.0184 Tc 0.7062 Tw (remaining parameters are set when the callback is invoked. The use of ) Tj
ET
BT
446.64 670.32 TD
/F5 9 Tf
0 Tc 0 Tw (list) Tj
ET
BT
0.9955 0 0 0.9955 468.24 670.32 Tm
/F4 10 Tf
0.009 Tc 0.7056 Tw ( in) Tj
-360.9192 -12.0547 TD 0.0193 Tc 0.5747 Tw (this example is not strictly necessary because "we know" that ) Tj
ET
BT
401.04 658.32 TD
/F5 9 Tf
0 Tc 0 Tw (virtualhost) Tj
ET
BT
0.9955 0 0 0.9955 460.44 658.32 Tm
/F4 10 Tf
0 Tc 0.594 Tw ( will) Tj
-353.0836 -12.0547 TD 0.0092 Tc 0.8862 Tw (always be a single list element. Howeve) Tj
-0.9461 Tc 0 Tw (r) Tj
0.0076 Tc 0.9481 Tw (, using ) Tj
ET
BT
336.24 646.32 TD
/F5 9 Tf
-0.03 Tc 0 Tw (list) Tj
ET
BT
0.9955 0 0 0.9955 357.72 646.32 Tm
/F4 10 Tf
0.0193 Tc 0.876 Tw ( is just a good habit when) Tj
-249.8949 -12.0547 TD -0.0043 Tc 0.0225 Tw (forming callbacks, so I always write the code this wa) Tj
-1.1533 Tc 0 Tw (y) Tj
-0.0087 Tc (.) Tj
24.1095 -12.0547 TD 0.0181 Tc 0.2471 Tw (There are many other examples of callback arguments that are really com-) Tj
-24.1095 -12.0547 TD 0.0123 Tc 0.768 Tw (mand prefixes. Some of these include the scrolling callbacks between Tk scroll-) Tj
0 -12.0547 TD 0.0106 Tc 1.8592 Tw (bars and their widgets, the command aliases used with Safe Tcl, the sorting) Tj
T* 0.024 Tc 0.4494 Tw (functions in ) Tj
ET
BT
167.52 586.32 TD
/F5 9 Tf
-0.024 Tc 0 Tw (lsort) Tj
ET
BT
0.9955 0 0 0.9955 194.52 586.32 Tm
/F4 10 Tf
0.0158 Tc 0.4749 Tw (, and the completion callback used with ) Tj
ET
BT
382.92 586.32 TD
/F5 9 Tf
0 Tc 0 Tw (fcop) Tj
-1.2 Tc (y) Tj
ET
BT
0.9955 0 0 0.9955 408.6 586.32 Tm
/F4 10 Tf
0.0167 Tc 0.4567 Tw (. Example 13\2266) Tj
-301.0071 -12.0547 TD 0.0149 Tc 0.0108 Tw (on page 181 shows how to use ) Tj
ET
BT
249.48 574.32 TD
/F5 9 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 271.08 574.32 Tm
/F4 10 Tf
0.007 Tc 0.0044 Tw ( to make callbacks from Tcl procedures.) Tj
-138.7502 -30.1369 TD /F2 10 Tf
0.0159 Tc -0.0446 Tw (Constructing Procedures Dynamically) Tj
0 -18.0821 TD /F4 10 Tf
0.0134 Tc 1.5329 Tw (The previous examples have all focused on creating single commands by) Tj
-24.1095 -12.0547 TD 0.0122 Tc -0.1415 Tw (using list operations. Suppose you want to create a whole procedure dynamicall) Tj
-1.2738 Tc 0 Tw (y) Tj
-0.0087 Tc (.) Tj
0 -12.0547 TD 0.0191 Tc (Unfortunatel) Tj
-1.2738 Tc (y) Tj
0.0112 Tc -0.009 Tw (, this can be particularly awkward because a procedure body is not) Tj
T* 0.0061 Tc 0.4191 Tw (a simple list. Instead, it is a sequence of commands that are each lists, but they) Tj
T* 0.0122 Tc 0.4613 Tw (are separated by newlines or semicolons. In turn, some of those commands may) Tj
T* 0.0201 Tc -0.0691 Tw (be loops and ) Tj
ET
BT
168.6 466.32 TD
/F5 9 Tf
0 Tc 0 Tw (if) Tj
ET
BT
0.9955 0 0 0.9955 179.4 466.32 Tm
/F4 10 Tf
0.012 Tc -0.0659 Tw ( commands that have their own command bodies. ) Tj
-0.0292 Tc 0.0206 Tw (To further com-) Tj
-70.7614 -12.0547 TD 0.0158 Tc 1.1006 Tw (pound the problem, you typically have two kinds of variables in the procedure) Tj
0 -12.0547 TD 0.0203 Tc 0.5736 Tw (body: some that are to be used as values when constructing the bod) Tj
-1.2738 Tc 0 Tw (y) Tj
0.0187 Tc 0.5753 Tw (, and some) Tj
T* 0.0157 Tc 0.785 Tw (that are to be used later when executing the procedure. The result can be very) Tj
T* 0.0263 Tc 0 Tw (mess) Tj
-1.2738 Tc (y) Tj
-0.0087 Tc (.) Tj
24.1095 -12.0547 TD 0.0142 Tc -0.252 Tw (The main trick to this problem is to use either ) Tj
ET
BT
345.96 406.32 TD
/F5 9 Tf
0 Tc 0 Tw (format) Tj
ET
BT
0.9955 0 0 0.9955 378.24 406.32 Tm
/F4 10 Tf
0.0395 Tc -0.2894 Tw ( or ) Tj
ET
BT
392.76 406.32 TD
/F5 9 Tf
-0.02 Tc 0 Tw (regsub) Tj
ET
BT
0.9955 0 0 0.9955 425.16 406.32 Tm
/F4 10 Tf
0.0108 Tc -0.2204 Tw ( to process a) Tj
-317.6426 -12.0547 TD 0.0153 Tc 0.4143 Tw (template for your dynamically generated procedure. If you use format, then you) Tj
0 -12.0547 TD 0.0335 Tc -0.2834 Tw (can put ) Tj
ET
BT
145.92 382.32 TD
/F5 9 Tf
0 Tc 0 Tw (%s) Tj
ET
BT
0.9955 0 0 0.9955 156.72 382.32 Tm
/F4 10 Tf
0.0061 Tc -0.2318 Tw ( into your templates where you want to insert values. ) Tj
-1.0158 Tc 0 Tw (Y) Tj
0.017 Tc -0.2668 Tw (ou may find the) Tj
-47.9779 -12.0547 TD 0.0042 Tc -0.0128 Tw (positional notation of the format string \(e.g., ) Tj
ET
BT
315.84 370.32 TD
/F5 9 Tf
0 Tc 0 Tw (%1$s) Tj
ET
BT
0.9955 0 0 0.9955 337.44 370.32 Tm
/F4 10 Tf
0.0205 Tc -0.0293 Tw ( and ) Tj
ET
BT
360.36 370.32 TD
/F5 9 Tf
0 Tc 0 Tw (%2$s) Tj
ET
BT
0.9955 0 0 0.9955 381.96 370.32 Tm
/F4 10 Tf
0.0106 Tc -0.0193 Tw (\) useful if you need to) Tj
-274.2455 -12.0547 TD 0.0142 Tc -0.0363 Tw (repeat a value in several places within your procedure bod) Tj
-1.2738 Tc 0 Tw (y) Tj
0.0123 Tc -0.0211 Tw (. The following exam-) Tj
0 -12.0547 TD 0.0146 Tc -0.23 Tw (ple is a procedure that generates a new version of other procedures. The new ver-) Tj
T* 0.016 Tc 0.0587 Tw (sion includes code that counts the number of times the procedure was called and) Tj
T* 0.0231 Tc -0.0319 Tw (measures the time it takes to run:) Tj
ET
1 1 1 rg
108.96 288.96 372 8.04 re f
0 0 0 rg
131.76 292.8 0.24 0.48 re f
480 292.8 0.24 0.48 re f
132 292.8 348 0.48 re f
BT
132.96 299.64 TD
/F1 7.92 Tf
0.0414 Tc 0.0368 Tw (Example 10\226) Tj
3.9965 Tc 0 Tw (2) Tj
56.88 0 TD /F0 7.92 Tf
0.0377 Tc -0.0315 Tw (Generating procedures dynamically with a template.) Tj
-56.88 -22.68 TD /F5 9 Tf
-0.0052 Tc 0.0052 Tw (proc TraceGen {procName} {) Tj
18 -9.96 TD -0.0083 Tc 0.0083 Tw (rename $procName $procName-orig) Tj
0 -9.96 TD -0.01 Tc 0.01 Tw (set arglist {}) Tj
0 -10.08 TD -0.0069 Tc 0.0069 Tw (foreach arg [info args $procName-orig] {) Tj
18 -9.96 TD -0.0057 Tc 0.0057 Tw (append arglist "\\$$arg ") Tj
-18 -9.96 TD 0 Tc 0 Tw (}) Tj
0 -10.08 TD -0.008 Tc 0.008 Tw (proc $procName [info args $procName-orig] [format {) Tj
18 -9.96 TD -0.0083 Tc 0.0083 Tw (global _trace_count _trace_msec) Tj
0 -9.96 TD -0.0055 Tc 0.0055 Tw (incr _trace_count\(%1$s\)) Tj
0 -10.08 TD -0.0071 Tc 0.0071 Tw (incr _trace_msec\(%1$s\) [lindex [time {) Tj
18 -9.96 TD -0.005 Tc -0.035 Tw (set result [%1$s-orig %2$s]) Tj
-18 -9.96 TD 0 Tc 0 Tw (} 1] 0]) Tj
0 -10.08 TD -0.0092 Tc 0.0092 Tw (return $result) Tj
-18 -9.96 TD -0.0063 Tc 0.0063 Tw (} $procName $arglist]) Tj
ET
1 1 1 rg
108.96 126 372 8.04 re f
0 0 0 rg
131.76 129.72 0.24 0.48 re f
480 129.72 0.24 0.48 re f
132 129.72 348 0.48 re f
BT
132.96 137.04 TD
0 Tc 0 Tw (}) Tj
ET
endstream
endobj
44 0 obj
9380
endobj
41 0 obj
<<
/Type /Page
/Parent 42 0 R
/Resources <<
/Font <<
/F0 6 0 R
/F1 7 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
>>
/ProcSet 2 0 R
>>
/Contents 43 0 R
>>
endobj
46 0 obj
<<
/Length 47 0 R
>>
stream
BT
114 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0365 Tc -0.0782 Tw (126 ) Tj
243.96 0 TD 0.04 Tc -0.0418 Tw (Quoting Issues and Eval) Tj
86.76 0 TD 0.0261 Tc 0.0282 Tw ( Chap. 10) Tj
ET
113.52 701.88 0.48 0.96 re f
486 701.88 0.48 0.96 re f
114 701.88 372 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
554.76 746.76 0.24 0.48 re f
584.04 746.76 0.24 0.48 re f
555 746.76 29.04 0.48 re f
585 80.76 0.24 0.48 re f
553.8 80.76 0.24 0.48 re f
554.04 80.76 30.96 0.48 re f
548.76 69.96 0.48 0.24 re f
548.76 33.72 0.48 0.24 re f
548.76 33.96 0.48 36 re f
BT
0.9955 0 0 0.9955 138 670.32 Tm
/F4 10 Tf
0.0159 Tc -0.0074 Tw (Suppose that we have a trivial procedure ) Tj
ET
BT
330.24 670.32 TD
/F5 9 Tf
0 Tc 0 Tw (foo) Tj
ET
BT
0.9955 0 0 0.9955 346.44 670.32 Tm
/F4 10 Tf
-0.0087 Tc (:) Tj
ET
BT
150 657 TD
/F5 9 Tf
0 Tc -0.03 Tw (proc foo {x y} {) Tj
24 -12.96 TD -0.0071 Tc 0.0071 Tw (return [expr $x * $y]) Tj
-24 -13.08 TD 0 Tc 0 Tw (}) Tj
ET
BT
0.9955 0 0 0.9955 138 617.4 Tm
/F4 10 Tf
0.0083 Tc 0.0232 Tw (If you run ) Tj
ET
BT
186.84 617.4 TD
/F5 9 Tf
-0.015 Tc 0 Tw (TraceGen) Tj
ET
BT
0.9955 0 0 0.9955 230.04 617.4 Tm
/F4 10 Tf
0.0117 Tc -0.0083 Tw ( on it and look at the results, you see this:) Tj
ET
BT
150 603.96 TD
/F5 9 Tf
-0.0109 Tc 0.0109 Tw (TraceGen foo) Tj
0 -12.96 TD 0 Tc -0.06 Tw (info body foo) Tj
T* /F9 9 Tf
0 Tw (=>) Tj
24 -13.08 TD -0.0083 Tc 0.0083 Tw (global _trace_count _trace_msec) Tj
0 -12.96 TD -0.0114 Tc 0.0114 Tw (incr _trace_count\(foo\)) Tj
T* -0.0036 Tc -0.0264 Tw (incr _trace_msec\(foo\) [lindex [time {) Tj
18 -13.08 TD -0.0104 Tc 0.0104 Tw (set result [foo-orig $x $y]) Tj
-18 -12.96 TD -0.024 Tc 0.024 Tw (} 1] 0]) Tj
0 -12.96 TD -0.0092 Tc 0.0092 Tw (return $result) Tj
ET
BT
0.997 0 0 0.997 114 462.36 Tm
/F2 13 Tf
0.2721 Tc -0.001 Tw (Exploiting the ) Tj
ET
BT
205.68 462.36 TD
/F8 13.92 Tf
0.048 Tc 0 Tw (concat) Tj
ET
BT
0.997 0 0 0.997 256.08 462.36 Tm
/F2 13 Tf
0.2695 Tc 0.0016 Tw ( inside ) Tj
ET
BT
302.04 462.36 TD
/F8 13.92 Tf
0.048 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 114 441.36 Tm
/F4 10 Tf
0.0158 Tc 1.9404 Tw (The previous section warns about the danger of concatenation when forming) Tj
0 -12.0547 TD 0.0028 Tc 1.0734 Tw (commands. Howeve) Tj
-1.0667 Tc 0 Tw (r) Tj
0.0188 Tc 0.9971 Tw (, there are times when concatenation is done for good rea-) Tj
T* 0.0163 Tc 1.3526 Tw (son. This section illustrates cases where the ) Tj
ET
BT
329.28 417.36 TD
/F5 9 Tf
-0.02 Tc 0 Tw (concat) Tj
ET
BT
0.9955 0 0 0.9955 361.56 417.36 Tm
/F4 10 Tf
0.0191 Tc 1.3384 Tw ( done by ) Tj
ET
BT
406.68 417.36 TD
/F5 9 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 428.28 417.36 Tm
/F4 10 Tf
0.0176 Tc 1.3398 Tw ( is useful in) Tj
-315.7138 -12.0547 TD 0.017 Tc 0.2701 Tw (assembling a command by concatenating multiple lists into one list. A ) Tj
ET
BT
442.8 405.36 TD
/F5 9 Tf
0 Tc 0 Tw (concat) Tj
ET
BT
0.9955 0 0 0.9955 475.2 405.36 Tm
/F4 10 Tf
0.026 Tc 0.2063 Tw ( is) Tj
-362.8479 -12.0547 TD 0.0133 Tc 0.0181 Tw (done internally by ) Tj
ET
BT
201 393.36 TD
/F5 9 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 222.6 393.36 Tm
/F4 10 Tf
0.0183 Tc -0.0098 Tw ( when it gets more than one argument:) Tj
ET
BT
150 380.04 TD
/F5 9 Tf
0 Tc -0.12 Tw (eval ) Tj
27 0 TD /F9 9 Tf
-0.0067 Tc 0.0067 Tw (list1 list2 list3 ...) Tj
ET
BT
0.9955 0 0 0.9955 138 366.36 Tm
/F4 10 Tf
0.0209 Tc 0.9347 Tw (The effect of ) Tj
ET
BT
200.28 366.36 TD
/F5 9 Tf
-0.02 Tc 0 Tw (concat) Tj
ET
BT
0.9955 0 0 0.9955 232.56 366.36 Tm
/F4 10 Tf
0.016 Tc 0.9482 Tw ( is to join all the lists into one list; a new level of list) Tj
-119.1009 -12.0547 TD 0.0217 Tc 0.3312 Tw (structure is ) Tj
57.2601 0 TD /F7 10 Tf
0.0234 Tc 0 Tw (not) Tj
14.7068 0 TD /F4 10 Tf
0.0141 Tc 0.3759 Tw ( added. This is useful if the lists are fragments of a command. It) Tj
-71.9669 -12.0547 TD 0.0181 Tc 0.6562 Tw (is common to use this form of) Tj
ET
BT
253.08 342.36 TD
/F5 9 Tf
0 Tc 1.32 Tw ( eval) Tj
ET
BT
0.9955 0 0 0.9955 281.4 342.36 Tm
/F4 10 Tf
0.0139 Tc 0.6605 Tw ( with the ) Tj
ET
BT
327.6 342.36 TD
/F5 9 Tf
0 Tc 0 Tw (args) Tj
ET
BT
0.9955 0 0 0.9955 349.2 342.36 Tm
/F4 10 Tf
0.003 Tc 0.7116 Tw ( construct in procedures. Use) Tj
-236.2731 -12.0547 TD 0.0205 Tc 1.2967 Tw (the ) Tj
ET
BT
133.08 330.36 TD
/F5 9 Tf
-0.03 Tc 0 Tw (args) Tj
ET
BT
0.9955 0 0 0.9955 154.56 330.36 Tm
/F4 10 Tf
0.0186 Tc 1.2853 Tw ( parameter to pass optional arguments through to another command.) Tj
-40.745 -12.0547 TD 0.0208 Tc 0.3562 Tw (Invoke the other command with ) Tj
ET
BT
266.16 318.36 TD
/F5 9 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 287.76 318.36 Tm
/F4 10 Tf
0.021 Tc 0.356 Tw (, and the values in ) Tj
ET
BT
377.76 318.36 TD
/F5 9 Tf
0 Tc 0 Tw ($args) Tj
ET
BT
0.9955 0 0 0.9955 404.76 318.36 Tm
/F4 10 Tf
0.0205 Tc 0.3323 Tw ( get concatenated) Tj
-292.0865 -12.0547 TD 0.0173 Tc -0.2672 Tw (onto the command properl) Tj
-1.2738 Tc 0 Tw (y) Tj
0.0197 Tc -0.2996 Tw (. The special args parameter is illustrated in Example) Tj
0 -12.0547 TD 0.0116 Tc 0.0198 Tw (7\2262 on page 82.) Tj
24.1095 -30.1369 TD /F2 10 Tf
0.0212 Tc -0.05 Tw (Using ) Tj
ET
BT
166.56 264.36 TD
/F8 12 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 195.36 264.36 Tm
/F2 10 Tf
-0.0096 Tc 0.0111 Tw ( in a Wrapper Procedure.) Tj
-57.6217 -18.0821 TD /F4 10 Tf
0.0146 Tc 0.1173 Tw (Here, we illustrate the use of ) Tj
ET
BT
275.64 246.36 TD
/F5 9 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 297.24 246.36 Tm
/F4 10 Tf
0.0205 Tc 0.0913 Tw ( and ) Tj
ET
BT
320.4 246.36 TD
/F5 9 Tf
0 Tc 0 Tw ($args) Tj
ET
BT
0.9955 0 0 0.9955 347.4 246.36 Tm
/F4 10 Tf
0.0112 Tc 0.1408 Tw ( with a simple Tk example. In) Tj
-234.4649 -12.0547 TD 0.0175 Tc -0.0262 Tw (Tk, the ) Tj
ET
BT
149.88 234.36 TD
/F5 9 Tf
0 Tc 0 Tw (button) Tj
ET
BT
0.9955 0 0 0.9955 182.28 234.36 Tm
/F4 10 Tf
0.0147 Tc -0.0234 Tw ( command creates a button in the user interface. The ) Tj
ET
BT
429.24 234.36 TD
/F5 9 Tf
-0.02 Tc 0 Tw (button) Tj
ET
BT
0.9955 0 0 0.9955 461.64 234.36 Tm
/F4 10 Tf
0.0072 Tc 0.1047 Tw ( com-) Tj
-349.2261 -12.0547 TD 0.0156 Tc 1.0606 Tw (mand can take many arguments, and commonly you simply specify the text of) Tj
0 -12.0547 TD 0.0136 Tc 1.209 Tw (the button and the Tcl command that is executed when the user clicks on the) Tj
T* 0.0052 Tc 0 Tw (button:) Tj
ET
BT
150 185.04 TD
/F5 9 Tf
-0.0041 Tc -0.0199 Tw (button .foo -text Foo -command foo) Tj
ET
BT
0.9955 0 0 0.9955 138 171.36 Tm
/F4 10 Tf
0.0176 Tc 0.8692 Tw (After a button is created, it is made visible by packing it into the displa) Tj
-1.1533 Tc 0 Tw (y) Tj
-0.0087 Tc (.) Tj
-24.1095 -12.0547 TD 0.0176 Tc 0.4558 Tw (The ) Tj
ET
BT
135.12 159.36 TD
/F5 9 Tf
0 Tc 0 Tw (pack) Tj
ET
BT
0.9955 0 0 0.9955 156.6 159.36 Tm
/F4 10 Tf
0.0137 Tc 0.5562 Tw ( command can also take many arguments to control screen placement.) Tj
-42.7944 -12.0547 TD 0.0143 Tc -0.0302 Tw (Here, we just specify a side and let the packer take care of the rest of the details:) Tj
ET
BT
150 134.04 TD
/F5 9 Tf
0 Tc -0.04 Tw (pack .foo -side left) Tj
ET
endstream
endobj
47 0 obj
7544
endobj
45 0 obj
<<
/Type /Page
/Parent 42 0 R
/Resources <<
/Font 48 0 R
/ProcSet 2 0 R
>>
/Contents 46 0 R
>>
endobj
48 0 obj
<<
/F0 6 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
/F7 25 0 R
/F8 29 0 R
/F9 32 0 R
>>
endobj
50 0 obj
<<
/Length 51 0 R
>>
stream
BT
108.96 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0383 Tc -0.0201 Tw (Exploiting the ) Tj
50.28 0 TD /F5 7.92 Tf
0.048 Tc 0 Tw (concat) Tj
28.8 0 TD /F0 7.92 Tf
0.0322 Tc -0.0139 Tw ( inside ) Tj
25.32 0 TD /F5 7.92 Tf
0.048 Tc 0 Tw (eval) Tj
252.36 0 TD /F0 7.92 Tf
0.0765 Tc (127) Tj
ET
108.48 701.88 0.48 0.96 re f
480.72 701.88 0.48 0.96 re f
108.96 701.88 371.76 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
553.8 746.76 0.24 0.48 re f
585 746.76 0.24 0.48 re f
554.04 746.76 30.96 0.48 re f
585 80.76 0.24 0.48 re f
554.76 80.76 0.24 0.48 re f
555 80.76 30 0.48 re f
547.8 75 0.48 0.24 re f
547.8 34.8 0.48 0.24 re f
547.8 35.04 0.48 39.96 re f
510 504 54 108 re f
510 611.76 54.24 0.48 re f
563.76 503.76 0.48 108.24 re f
509.76 503.76 54.24 0.48 re f
509.76 504 0.48 108.24 re f
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 605.52 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 602.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 598.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (.) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 595.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 592.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (A) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 583.2 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 575.28 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (v) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 568.56 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (a) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 560.64 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (n) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 553.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 545.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (e) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 538.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 530.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 526.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (T) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 521.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 514.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (l) Tj
ET
Q
BT
0.9955 0 0 0.9955 132.96 670.32 Tm
/F4 10 Tf
0.0248 Tc 1.2422 Tw (Even though there are only two Tcl commands to create a user interface) Tj
-24.1095 -12.0547 TD 0.0186 Tc 0.0283 Tw (button, we will write a procedure that replaces the two commands with one. Our) Tj
0 -12.0547 TD 0.0228 Tc -0.0316 Tw (first version might be:) Tj
ET
BT
144.96 633 TD
/F5 9 Tf
-0.0083 Tc 0.0083 Tw (proc PackedButton {name txt cmd} {) Tj
24 -12.96 TD -0.0075 Tc 0.0075 Tw (button $name -text $txt -command $cmd) Tj
0 -13.08 TD 0 Tc -0.04 Tw (pack $name -side left) Tj
-24 -12.96 TD 0 Tw (}) Tj
ET
BT
0.9955 0 0 0.9955 132.96 580.32 Tm
/F4 10 Tf
0.0129 Tc 0.3486 Tw (This is not a very flexible procedure. The main problem is that it hides the) Tj
-24.1095 -12.0547 TD 0.0161 Tc -0.2659 Tw (full power of the Tk ) Tj
ET
BT
201.12 568.32 TD
/F5 9 Tf
-0.02 Tc 0 Tw (button) Tj
ET
BT
0.9955 0 0 0.9955 233.4 568.32 Tm
/F4 10 Tf
0.0138 Tc -0.2636 Tw ( command, which can really take about 20 widget con-) Tj
-125.0077 -12.0547 TD 0.004 Tc 0.7709 Tw (figuration options, such as ) Tj
ET
BT
236.64 556.32 TD
/F5 9 Tf
-0.0109 Tc 0 Tw (-background) Tj
ET
BT
0.9955 0 0 0.9955 295.92 556.32 Tm
/F4 10 Tf
-0.0087 Tc 0.8439 Tw (, ) Tj
ET
BT
302.28 556.32 TD
/F5 9 Tf
-0.02 Tc 0 Tw (-curso) Tj
-0.96 Tc (r) Tj
ET
BT
0.9955 0 0 0.9955 339 556.32 Tm
/F4 10 Tf
-0.0087 Tc 0.7233 Tw (, ) Tj
ET
BT
345.24 556.32 TD
/F5 9 Tf
-0.0514 Tc 0 Tw (-relief) Tj
ET
BT
0.9955 0 0 0.9955 382.68 556.32 Tm
/F4 10 Tf
0.0085 Tc 0.7362 Tw (, and more. They are) Tj
-274.9688 -12.0547 TD 0.0175 Tc 0.0039 Tw (listed on page 391. ) Tj
0.0041 Tc -0 Tw (For example, you can easily make a red button like this:) Tj
ET
BT
144.96 531 TD
/F5 9 Tf
-0.0084 Tc 0.0084 Tw (button .foo -text Foo -command foo -background red) Tj
ET
BT
0.9955 0 0 0.9955 132.96 517.32 Tm
/F4 10 Tf
0.0204 Tc 0.5434 Tw (A better version of ) Tj
ET
BT
223.44 517.32 TD
/F5 9 Tf
0 Tc 0 Tw (PackedButton) Tj
ET
BT
0.9955 0 0 0.9955 288.12 517.32 Tm
/F4 10 Tf
-0.0017 Tc 0.5958 Tw ( uses ) Tj
ET
BT
315.12 517.32 TD
/F5 9 Tf
0 Tc 0 Tw (args) Tj
ET
BT
0.9955 0 0 0.9955 336.72 517.32 Tm
/F4 10 Tf
0.0147 Tc 0.5793 Tw ( to pass through extra configu-) Tj
-228.7991 -12.0547 TD 0.0195 Tc 1.1772 Tw (ration options to the ) Tj
ET
BT
210.36 505.32 TD
/F5 9 Tf
0 Tc 0 Tw (button) Tj
ET
BT
0.9955 0 0 0.9955 242.76 505.32 Tm
/F4 10 Tf
0.0216 Tc 1.1751 Tw ( command. The ) Tj
ET
BT
319.8 505.32 TD
/F5 9 Tf
0 Tc 0 Tw (args) Tj
ET
BT
0.9955 0 0 0.9955 341.4 505.32 Tm
/F4 10 Tf
0.0179 Tc 1.1788 Tw ( parameter is a list of all the) Tj
-233.5005 -12.0547 TD 0.012 Tc 2.0186 Tw (extra arguments passed to the Tcl procedure. My first attempt to use ) Tj
ET
BT
454.08 493.32 TD
/F5 9 Tf
-0.024 Tc 0 Tw ($args) Tj
ET
BT
0.9955 0 0 0.9955 108.96 481.32 Tm
/F4 10 Tf
-0.0073 Tc 0.0675 Tw (looked like this, but it was not correct:) Tj
ET
BT
144.96 468 TD
/F5 9 Tf
-0.0073 Tc 0.0073 Tw (proc PackedButton {name txt cmd args} {) Tj
24 -12.96 TD -0.0065 Tc 0.0065 Tw (button $name -text $txt -command $cmd $args) Tj
0 -13.08 TD 0 Tc -0.04 Tw (pack $name -side left) Tj
-24 -12.96 TD 0 Tw (}) Tj
0 -12.96 TD -0.0096 Tc -0.3104 Tw (PackedButton .foo "Hello, World!" {exit} -background red) Tj
0 -13.08 TD /F9 9 Tf
-0.0039 Tc -0.0261 Tw (=> unknown option "-background red") Tj
ET
BT
0.9955 0 0 0.9955 132.96 389.28 Tm
/F4 10 Tf
0.0143 Tc -0.2039 Tw (The problem is that ) Tj
ET
BT
226.08 389.28 TD
/F5 9 Tf
0 Tc 0 Tw ($args) Tj
ET
BT
0.9955 0 0 0.9955 252.96 389.28 Tm
/F4 10 Tf
-0.0025 Tc -0.1669 Tw ( is a list value, and ) Tj
ET
BT
341.76 389.28 TD
/F5 9 Tf
-0.02 Tc 0 Tw (button) Tj
ET
BT
0.9955 0 0 0.9955 374.16 389.28 Tm
/F4 10 Tf
0.0039 Tc -0.1532 Tw ( gets the whole list as a) Tj
-266.4099 -12.0547 TD 0.0176 Tc 0.4558 Tw (single argument. Instead, ) Tj
ET
BT
231.96 377.28 TD
/F5 9 Tf
0 Tc 0 Tw (button) Tj
ET
BT
0.9955 0 0 0.9955 264.36 377.28 Tm
/F4 10 Tf
0.0139 Tc 0.4768 Tw ( needs to get the elements of ) Tj
ET
BT
401.64 377.28 TD
/F5 9 Tf
0 Tc 0 Tw ($args) Tj
ET
BT
0.9955 0 0 0.9955 428.64 377.28 Tm
/F4 10 Tf
0.0098 Tc 0.4636 Tw ( as individ-) Tj
-321.1385 -12.0547 TD -0 Tc -0.0084 Tw (ual arguments. ) Tj
24.1095 -13.0191 TD /F7 10 Tf
0.0267 Tc -0.0355 Tw (Use ) Tj
ET
BT
152.76 352.32 TD
/F9 9 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 174.36 352.32 Tm
/F7 10 Tf
0.0263 Tc -0.0351 Tw ( with ) Tj
ET
BT
200.64 352.32 TD
/F9 9 Tf
0 Tc 0 Tw ($args) Tj
ET
BT
0.9955 0 0 0.9955 132.96 339.36 Tm
/F4 10 Tf
0.0112 Tc -0.261 Tw (In this case, you can use ) Tj
ET
BT
246.6 339.36 TD
/F5 9 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 268.2 339.36 Tm
/F4 10 Tf
0.0188 Tc -0.2686 Tw ( because it concatenates its arguments to form) Tj
-159.9665 -12.0547 TD 0.0145 Tc 0.1214 Tw (a single list before evaluation. The single list is, by definition, the same as a sin-) Tj
0 -12.0547 TD 0.01 Tc 1.235 Tw (gle Tcl command, so the ) Tj
ET
BT
228.6 315.36 TD
/F5 9 Tf
-0.02 Tc 0 Tw (button) Tj
ET
BT
0.9955 0 0 0.9955 260.88 315.36 Tm
/F4 10 Tf
0.0219 Tc 1.1748 Tw ( command parses correctl) Tj
-1.2738 Tc 0 Tw (y) Tj
0.0232 Tc 1.1735 Tw (. Here we give ) Tj
ET
BT
459.48 315.36 TD
/F5 9 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 108.96 303.36 Tm
/F4 10 Tf
0.0088 Tc -0 Tw (two lists, which it joins into one command:) Tj
ET
BT
144.96 290.04 TD
/F5 9 Tf
-0.0084 Tc 0.0084 Tw (eval {button $name -text $txt -command $cmd} $args) Tj
ET
BT
0.9955 0 0 0.9955 132.96 276.36 Tm
/F4 10 Tf
0.016 Tc -0.1453 Tw (The use of the braces in this command is discussed in more detail belo) Tj
-1.1534 Tc 0 Tw (w) Tj
-0.2003 Tc 0.072 Tw (. We) Tj
-24.1095 -12.0547 TD 0.0155 Tc 0.9883 Tw (also generalize our procedure to take some options to the ) Tj
ET
BT
384 264.36 TD
/F5 9 Tf
0 Tc 0 Tw (pack) Tj
ET
BT
0.9955 0 0 0.9955 405.6 264.36 Tm
/F4 10 Tf
0.0191 Tc 0.9365 Tw ( command. This) Tj
-297.9934 -12.0547 TD 0.0186 Tc 0.6959 Tw (argument, ) Tj
ET
BT
160.68 252.36 TD
/F5 9 Tf
0 Tc 0 Tw (pack) Tj
ET
BT
0.9955 0 0 0.9955 182.16 252.36 Tm
/F4 10 Tf
0.0108 Tc 0.7439 Tw (, must be a list of packing options. The final version of ) Tj
ET
BT
443.28 252.36 TD
/F5 9 Tf
-0.0171 Tc 0 Tw (Packed-) Tj
-334.32 -12 TD 0 Tc (Button) Tj
ET
BT
0.9955 0 0 0.9955 141.36 240.36 Tm
/F4 10 Tf
0.0249 Tc -0.0337 Tw ( is shown in Example 10\2263:) Tj
ET
1 1 1 rg
108.96 207 372 8.04 re f
0 0 0 rg
131.76 210.72 0.24 0.48 re f
480 210.72 0.24 0.48 re f
132 210.72 348 0.48 re f
BT
132.96 217.68 TD
/F1 7.92 Tf
0.0414 Tc 0.0368 Tw (Example 10\226) Tj
3.9965 Tc 0 Tw (3) Tj
56.88 0 TD /F0 7.92 Tf
0.0553 Tc -0.0971 Tw (Using ) Tj
22.68 0 TD /F5 9 Tf
0 Tc 0 Tw (eval) Tj
21.6 0 TD /F0 7.92 Tf
0.0496 Tc -0.0913 Tw ( with ) Tj
18.6 0 TD /F5 9 Tf
0 Tc 0 Tw ($args) Tj
27 0 TD /F0 7.92 Tf
-0.0418 Tc (.) Tj
-146.76 -22.68 TD /F5 9 Tf
-0.0033 Tc -0.0167 Tw (# PackedButton creates and packs a button.) Tj
0 -9.96 TD -0.0094 Tc 0.0094 Tw (proc PackedButton {path txt cmd {pack {-side right}} args} {) Tj
18 -10.08 TD -0.0084 Tc 0.0084 Tw (eval {button $path -text $txt -command $cmd} $args) Tj
0 -9.96 TD 0 Tc -0.04 Tw (eval {pack $path} $pack) Tj
ET
1 1 1 rg
108.96 144 372 8.04 re f
0 0 0 rg
131.76 147.72 0.24 0.48 re f
480 147.72 0.24 0.48 re f
132 147.72 348 0.48 re f
BT
132.96 155.04 TD
0 Tw (}) Tj
ET
1 1 1 rg
487.2 323.04 35.64 35.76 re f
504.96 357.12 m
489 341.04 l
504.96 325.08 l
521.04 341.04 l
504.96 357.12 l
f*
0 0 0 rg
505.2 356.88 m
489.24 340.8 l
488.88 340.8 l
489.24 341.16 l
505.2 325.2 l
505.2 324.84 l
504.84 325.2 l
520.92 341.16 l
521.28 341.16 l
521.52 340.92 l
521.28 340.8 l
505.2 324.84 l
505.08 324.72 l
504.84 324.84 l
488.76 340.92 l
488.88 341.16 l
504.84 357.24 l
505.2 356.88 l
f
520.92 340.8 m
504.84 356.88 l
504.84 357.24 l
505.08 357.48 l
505.2 357.24 l
521.28 341.16 l
520.92 340.8 l
f
0.302 0.302 0.302 rg
504.96 325.08 m
489 341.04 l
504.96 341.04 l
504.96 325.08 l
f*
0 0 0 rg
504.84 324.84 m
488.4 341.28 l
489 341.28 l
489.24 341.16 l
505.2 325.2 l
504.84 324.84 l
f
489 340.8 16.2 0.48 re f
505.2 341.04 m
505.2 324.48 l
504.84 324.84 l
504.72 325.08 l
504.72 341.04 l
505.2 341.04 l
f
0.102 0.102 0.102 rg
504.96 325.08 m
521.04 341.04 l
504.96 341.04 l
504.96 325.08 l
f*
0 0 0 rg
504.84 325.2 m
520.92 341.16 l
521.04 341.28 l
521.76 341.28 l
521.28 340.8 l
505.2 324.84 l
504.84 325.2 l
f
504.72 340.8 16.32 0.48 re f
505.2 341.04 m
505.2 324.84 l
504.72 324.36 l
504.72 341.04 l
505.2 341.04 l
f
0.702 0.702 0.702 rg
504.96 357.12 m
521.04 341.04 l
504.96 341.04 l
504.96 357.12 l
f*
0 0 0 rg
505.2 357.24 m
521.64 340.8 l
520.92 340.8 l
504.84 356.88 l
505.2 357.24 l
f
504.72 340.8 16.32 0.48 re f
504.72 341.04 m
504.72 357.72 l
505.2 357.24 l
505.2 341.04 l
504.72 341.04 l
f
0.9686 0.9686 0.9686 rg
504.96 357.12 m
489 341.04 l
504.96 341.04 l
504.96 357.12 l
f*
0 0 0 rg
505.2 356.88 m
489.24 340.8 l
488.52 340.8 l
488.88 341.16 l
504.84 357.24 l
505.2 356.88 l
f
489 340.8 16.2 0.48 re f
504.72 341.04 m
504.72 357.12 l
505.2 357.6 l
505.2 341.04 l
504.72 341.04 l
f
0.502 0.502 0.502 rg
504.96 348.12 m
498 341.04 l
504.96 334.08 l
512.04 341.04 l
504.96 348.12 l
f*
0.102 0.102 0.102 rg
505.2 347.88 m
498.24 340.8 l
497.88 340.8 l
498.24 341.16 l
505.2 334.2 l
505.2 333.84 l
504.84 334.2 l
511.92 341.16 l
512.28 341.16 l
512.52 340.92 l
512.28 340.8 l
505.2 333.84 l
505.08 333.72 l
504.84 333.84 l
497.76 340.92 l
497.88 341.16 l
504.84 348.24 l
505.2 347.88 l
f
511.92 340.8 m
504.84 347.88 l
504.84 348.24 l
505.08 348.48 l
505.2 348.24 l
512.28 341.16 l
511.92 340.8 l
f
endstream
endobj
51 0 obj
12608
endobj
49 0 obj
<<
/Type /Page
/Parent 42 0 R
/Resources <<
/Font 52 0 R
/ProcSet 2 0 R
>>
/Contents 50 0 R
>>
endobj
52 0 obj
<<
/F0 6 0 R
/F1 7 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
/F7 25 0 R
/F9 32 0 R
>>
endobj
54 0 obj
<<
/Length 55 0 R
>>
stream
BT
114 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0365 Tc -0.0782 Tw (128 ) Tj
243.96 0 TD 0.04 Tc -0.0418 Tw (Quoting Issues and Eval) Tj
86.76 0 TD 0.0261 Tc 0.0282 Tw ( Chap. 10) Tj
ET
113.52 701.88 0.48 0.96 re f
486 701.88 0.48 0.96 re f
114 701.88 372 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
554.76 746.76 0.24 0.48 re f
584.04 746.76 0.24 0.48 re f
555 746.76 29.04 0.48 re f
585 80.76 0.24 0.48 re f
553.8 80.76 0.24 0.48 re f
554.04 80.76 30.96 0.48 re f
548.76 69.96 0.48 0.24 re f
548.76 33.72 0.48 0.24 re f
548.76 33.96 0.48 36 re f
BT
0.9955 0 0 0.9955 138 670.32 Tm
/F4 10 Tf
0.031 Tc 0.9246 Tw (In ) Tj
ET
BT
151.92 670.32 TD
/F5 9 Tf
-0.01 Tc 0 Tw (PackedButton) Tj
ET
BT
0.9955 0 0 0.9955 216.6 670.32 Tm
/F4 10 Tf
0.0071 Tc 1.0088 Tw (, both ) Tj
ET
BT
247.56 670.32 TD
/F5 9 Tf
0 Tc 0 Tw (pack) Tj
ET
BT
0.9955 0 0 0.9955 269.04 670.32 Tm
/F4 10 Tf
0.0205 Tc 0.9954 Tw ( and ) Tj
ET
BT
294 670.32 TD
/F5 9 Tf
0 Tc 0 Tw (args) Tj
ET
BT
0.9955 0 0 0.9955 315.6 670.32 Tm
/F4 10 Tf
0.0162 Tc 0.9876 Tw ( are list-valued parameters that are) Tj
-202.5198 -12.0547 TD 0.0184 Tc 0.0632 Tw (used as parts of a command. The internal ) Tj
ET
BT
309.24 658.32 TD
/F5 9 Tf
0 Tc 0 Tw (concat) Tj
ET
BT
0.9955 0 0 0.9955 341.52 658.32 Tm
/F4 10 Tf
0.0191 Tc 0.0525 Tw ( done by ) Tj
ET
BT
382.92 658.32 TD
/F5 9 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 404.4 658.32 Tm
/F4 10 Tf
0.0124 Tc 0.0995 Tw ( is perfect for this) Tj
-291.7249 -12.0547 TD 0.0162 Tc -0.0009 Tw (situation. The simplest call to ) Tj
ET
BT
254.16 646.32 TD
/F5 9 Tf
-0.01 Tc 0 Tw (PackedButton) Tj
ET
BT
0.9955 0 0 0.9955 318.84 646.32 Tm
/F4 10 Tf
0.0145 Tc -0.0232 Tw ( is:) Tj
ET
BT
150 633 TD
/F5 9 Tf
-0.0092 Tc 0.0092 Tw (PackedButton .new "New" { New }) Tj
ET
BT
0.9955 0 0 0.9955 138 619.32 Tm
/F4 10 Tf
0.0162 Tc 0.3737 Tw (The quotes and curly braces are redundant in this case but are retained to) Tj
-24.1095 -12.0547 TD 0.017 Tc 0.999 Tw (convey some type information. The quotes imply a string label, and the braces) Tj
0 -12.0547 TD 0.0252 Tc 0.7194 Tw (imply a command. The ) Tj
ET
BT
225.12 595.32 TD
/F5 9 Tf
-0.03 Tc 0 Tw (pack) Tj
ET
BT
0.9955 0 0 0.9955 246.72 595.32 Tm
/F4 10 Tf
0.0087 Tc 0.7728 Tw ( argument takes on its default value, and the ) Tj
ET
BT
464.4 595.32 TD
/F5 9 Tf
0 Tc 0 Tw (args) Tj
ET
BT
0.9955 0 0 0.9955 114 583.32 Tm
/F4 10 Tf
0.0187 Tc -0.0154 Tw (variable is an empty list. The two commands executed by ) Tj
ET
BT
380.52 583.32 TD
/F5 9 Tf
0 Tc 0 Tw (PackedButton) Tj
ET
BT
0.9955 0 0 0.9955 445.32 583.32 Tm
/F4 10 Tf
0.0132 Tc -0.022 Tw ( are:) Tj
ET
BT
150 570 TD
/F5 9 Tf
-0.0041 Tc -0.0199 Tw (button .new -text New -command New) Tj
0 -12.96 TD 0 Tc -0.04 Tw (pack .new -side right) Tj
-12 -13.68 TD -0.01 Tc 0 Tw (PackedButton) Tj
ET
BT
0.9955 0 0 0.9955 202.68 543.36 Tm
/F4 10 Tf
0.0178 Tc 0.1302 Tw ( creates a horizontal stack of buttons by default. The packing) Tj
-89.0846 -12.0547 TD 0.0189 Tc -0.0276 Tw (can be controlled with a packing specification:) Tj
ET
BT
150 518.04 TD
/F5 9 Tf
-0.008 Tc 0.008 Tw (PackedButton .save "Save" { Save $file } {-side left}) Tj
ET
BT
0.9955 0 0 0.9955 138 504.36 Tm
/F4 10 Tf
0.0202 Tc -0.0049 Tw (The two commands executed by ) Tj
ET
BT
287.04 504.36 TD
/F5 9 Tf
-0.01 Tc 0 Tw (PackedButton) Tj
ET
BT
0.9955 0 0 0.9955 351.72 504.36 Tm
/F4 10 Tf
0.0132 Tc -0.022 Tw ( are:) Tj
ET
BT
150 491.04 TD
/F5 9 Tf
-0.0095 Tc 0.0095 Tw (button .new -text Save -command { Save $file }) Tj
0 -12 TD 0 Tc -0.04 Tw (pack .new -side left) Tj
ET
BT
0.9955 0 0 0.9955 138 465.36 Tm
/F4 10 Tf
0.0104 Tc 1.3672 Tw (The remaining arguments, if an) Tj
-1.2738 Tc 0 Tw (y) Tj
0.0215 Tc 1.3475 Tw (, are passed through to the button com-) Tj
-24.1095 -12.0547 TD 0.0137 Tc 0.0138 Tw (mand. This lets the caller fine-tune some of the button attributes:) Tj
ET
BT
150 440.04 TD
/F5 9 Tf
-0.0107 Tc 0.0107 Tw (PackedButton .quit Quit { Exit } {-side left -padx 5} \\) Tj
24 -12 TD -0.0086 Tc 0.0086 Tw (-background red) Tj
ET
BT
0.9955 0 0 0.9955 138 414.36 Tm
/F4 10 Tf
0.0202 Tc -0.0049 Tw (The two commands executed by ) Tj
ET
BT
287.04 414.36 TD
/F5 9 Tf
-0.01 Tc 0 Tw (PackedButton) Tj
ET
BT
0.9955 0 0 0.9955 351.72 414.36 Tm
/F4 10 Tf
0.0132 Tc -0.022 Tw ( are:) Tj
ET
BT
150 401.04 TD
/F5 9 Tf
-0.01 Tc -0.8033 Tw (button .quit -text Quit -command { Exit } -background red) Tj
0 -12 TD 0 Tc -0.048 Tw (pack .quit -side left -padx 5) Tj
ET
BT
0.9955 0 0 0.9955 138 375.36 Tm
/F4 10 Tf
-1.0158 Tc 0 Tw (Y) Tj
0.0204 Tc 0.0914 Tw (ou can see a difference between the ) Tj
ET
BT
310.44 375.36 TD
/F5 9 Tf
0 Tc 0 Tw (pack) Tj
ET
BT
0.9955 0 0 0.9955 332.04 375.36 Tm
/F4 10 Tf
0.0205 Tc 0.0913 Tw ( and ) Tj
ET
BT
355.2 375.36 TD
/F5 9 Tf
0 Tc 0 Tw (args) Tj
ET
BT
0.9955 0 0 0.9955 376.8 375.36 Tm
/F4 10 Tf
0.0194 Tc 0.0923 Tw ( argument in the call to) Tj
ET
BT
114 363.36 TD
/F5 9 Tf
-0.01 Tc 0 Tw (PackedButton) Tj
ET
BT
0.9955 0 0 0.9955 178.68 363.36 Tm
/F4 10 Tf
-0.0074 Tc 1.9823 Tw (. You need to group the packing options explicitly into a single) Tj
-64.9751 -12.0547 TD 0.0184 Tc -0.0271 Tw (argument. The ) Tj
ET
BT
185.4 351.36 TD
/F5 9 Tf
-0.03 Tc 0 Tw (args) Tj
ET
BT
0.9955 0 0 0.9955 207 351.36 Tm
/F4 10 Tf
0.0213 Tc -0.0541 Tw ( parameter is automatically made into a list of all remaining) Tj
-93.4243 -12.0547 TD 0.009 Tc 1.0844 Tw (arguments. In fact, if you group the extra button parameters, it will be a mis-) Tj
0 -12.0547 TD 0.019 Tc 0 Tw (take:) Tj
ET
BT
150 314.04 TD
/F5 9 Tf
-0.0107 Tc 0.0107 Tw (PackedButton .quit Quit { Exit } {-side left -padx 5} \\) Tj
24 -12 TD -0.0075 Tc 0.0075 Tw ({-background red}) Tj
-24 -13.08 TD /F9 9 Tf
-0.0077 Tc 0.0077 Tw (=> unknown option "-background red") Tj
ET
BT
0.9955 0 0 0.9955 138 263.28 Tm
/F2 10 Tf
0.0127 Tc -0.0012 Tw (Correct Quoting with ) Tj
ET
BT
240.84 263.28 TD
/F8 12 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 138 245.28 Tm
/F4 10 Tf
0.021 Tc -0.0297 Tw (What about the peculiar placement of braces in ) Tj
ET
BT
359.16 245.28 TD
/F5 9 Tf
-0.01 Tc 0 Tw (PackedButton) Tj
ET
BT
0.9955 0 0 0.9955 423.96 245.28 Tm
/F4 10 Tf
0.0182 Tc 0.0936 Tw (? ) Tj
ET
BT
150 231.96 TD
/F5 9 Tf
-0.0056 Tc -0.0116 Tw (eval {button $path -text $txt -command $cmd} $args) Tj
ET
BT
0.9955 0 0 0.9955 138 218.28 Tm
/F4 10 Tf
0.0137 Tc 0.2187 Tw (By using braces, we control the number of times different parts of the com-) Tj
-24.1095 -12.0547 TD 0.016 Tc -0.2658 Tw (mand are seen by the Tcl evaluato) Tj
-0.9461 Tc 0 Tw (r) Tj
0.0086 Tc -0.2584 Tw (. Without any braces, everything goes through) Tj
0 -12.0547 TD 0.0151 Tc 0.1338 Tw (two rounds of substitution. The braces prevent one of those rounds. In the above) Tj
T* 0.0163 Tc 1.5421 Tw (command, only ) Tj
ET
BT
189.72 182.28 TD
/F5 9 Tf
0 Tc 0 Tw ($args) Tj
ET
BT
0.9955 0 0 0.9955 216.6 182.28 Tm
/F4 10 Tf
0.0125 Tc 1.5459 Tw ( is substituted twice. Before ) Tj
ET
BT
355.44 182.28 TD
/F5 9 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 377.04 182.28 Tm
/F4 10 Tf
0.0147 Tc 1.5437 Tw ( is called, the ) Tj
ET
BT
446.88 182.28 TD
/F5 9 Tf
0 Tc 0 Tw ($args) Tj
ET
BT
0.9955 0 0 0.9955 473.88 182.28 Tm
/F4 10 Tf
0.026 Tc 1.5323 Tw ( is) Tj
-361.5219 -12.0547 TD 0.015 Tc -0.2648 Tw (replaced with its list value. Then, ) Tj
ET
BT
270.12 170.28 TD
/F5 9 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 291.72 170.28 Tm
/F4 10 Tf
0.0166 Tc -0.2514 Tw ( is invoked, and it concatenates its two list) Tj
-178.5308 -12.0547 TD 0.0172 Tc 0.8179 Tw (arguments into one list, which is now a properly formed command. The second) Tj
0 -12.0547 TD 0.0197 Tc -0.0284 Tw (round of substitutions done by ) Tj
ET
BT
257.04 146.28 TD
/F5 9 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 278.64 146.28 Tm
/F4 10 Tf
0.0161 Tc 0.0153 Tw ( replaces the ) Tj
ET
BT
339.96 146.28 TD
/F5 9 Tf
-0.04 Tc 0 Tw (txt) Tj
ET
BT
0.9955 0 0 0.9955 356.04 146.28 Tm
/F4 10 Tf
0.0205 Tc 0.031 Tw ( and ) Tj
ET
BT
379.08 146.28 TD
/F5 9 Tf
-0.04 Tc 0 Tw (cmd) Tj
ET
BT
0.9955 0 0 0.9955 395.28 146.28 Tm
/F4 10 Tf
-0.0268 Tc 0.1388 Tw ( values.) Tj
-258.4538 -13.0191 TD /F7 10 Tf
0.021 Tc -0.0298 Tw (Do not use double quotes with ) Tj
ET
BT
277.32 133.32 TD
/F9 9 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 298.92 133.32 Tm
/F7 10 Tf
-0.0087 Tc (.) Tj
ET
1 1 1 rg
72.12 129.12 35.76 35.76 re f
90 163.08 m
74.04 147.12 l
90 131.16 l
105.96 147.12 l
90 163.08 l
f*
0 0 0 rg
90.24 162.84 m
74.28 146.88 l
73.92 146.88 l
74.28 147.24 l
90.24 131.28 l
90.24 130.92 l
89.88 131.28 l
105.84 147.24 l
106.2 147.24 l
106.44 147 l
106.2 146.88 l
90.12 130.8 l
89.88 130.92 l
73.8 147 l
73.92 147.24 l
89.88 163.2 l
90.24 162.84 l
f
105.84 146.88 m
89.88 162.84 l
89.88 163.2 l
90.12 163.44 l
90.24 163.2 l
106.2 147.24 l
105.84 146.88 l
f
0.302 0.302 0.302 rg
90 131.16 m
74.04 147.12 l
90 147.12 l
90 131.16 l
f*
0 0 0 rg
89.88 130.92 m
73.44 147.36 l
74.04 147.36 l
74.28 147.24 l
90.24 131.28 l
89.88 130.92 l
f
74.04 146.88 16.2 0.48 re f
90.24 147.12 m
90.24 130.56 l
89.88 130.92 l
89.76 131.16 l
89.76 147.12 l
90.24 147.12 l
f
0.102 0.102 0.102 rg
90 131.16 m
105.96 147.12 l
90 147.12 l
90 131.16 l
f*
0 0 0 rg
89.88 131.28 m
105.96 147.36 l
106.68 147.36 l
90.24 130.92 l
89.88 131.28 l
f
89.76 146.88 16.2 0.48 re f
90.24 147.12 m
90.24 130.92 l
89.76 130.44 l
89.76 147.12 l
90.24 147.12 l
f
0.702 0.702 0.702 rg
90 163.08 m
105.96 147.12 l
90 147.12 l
90 163.08 l
f*
0 0 0 rg
90.24 163.2 m
106.56 146.88 l
105.84 146.88 l
89.88 162.84 l
90.24 163.2 l
f
89.76 146.88 16.2 0.48 re f
89.76 147.12 m
89.76 163.68 l
90.24 163.2 l
90.24 147.12 l
89.76 147.12 l
f
0.9686 0.9686 0.9686 rg
90 163.08 m
74.04 147.12 l
90 147.12 l
90 163.08 l
f*
0 0 0 rg
90.24 162.84 m
74.28 146.88 l
73.56 146.88 l
89.88 163.2 l
90.24 162.84 l
f
74.04 146.88 16.2 0.48 re f
89.76 147.12 m
89.76 163.08 l
90.24 163.56 l
90.24 147.12 l
89.76 147.12 l
f
0.502 0.502 0.502 rg
90 154.08 m
83.04 147.12 l
90 140.16 l
96.96 147.12 l
90 154.08 l
f*
0.102 0.102 0.102 rg
90.24 153.84 m
83.28 146.88 l
82.92 146.88 l
83.28 147.24 l
90.24 140.28 l
90.24 139.92 l
89.88 140.28 l
96.84 147.24 l
97.2 147.24 l
97.44 147 l
97.2 146.88 l
90.12 139.8 l
89.88 139.92 l
82.8 147 l
82.92 147.24 l
89.88 154.2 l
90.24 153.84 l
f
96.84 146.88 m
89.88 153.84 l
89.88 154.2 l
90.12 154.44 l
90.24 154.2 l
97.2 147.24 l
96.84 146.88 l
f
endstream
endobj
55 0 obj
10997
endobj
53 0 obj
<<
/Type /Page
/Parent 42 0 R
/Resources <<
/Font 56 0 R
/ProcSet 2 0 R
>>
/Contents 54 0 R
>>
endobj
56 0 obj
<<
/F0 6 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
/F7 25 0 R
/F8 29 0 R
/F9 32 0 R
>>
endobj
58 0 obj
<<
/Length 59 0 R
>>
stream
BT
108.96 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0383 Tc -0.0201 Tw (Exploiting the ) Tj
50.28 0 TD /F5 7.92 Tf
0.048 Tc 0 Tw (concat) Tj
28.8 0 TD /F0 7.92 Tf
0.0322 Tc -0.0139 Tw ( inside ) Tj
25.32 0 TD /F5 7.92 Tf
0.048 Tc 0 Tw (eval) Tj
252.36 0 TD /F0 7.92 Tf
0.0765 Tc (129) Tj
ET
108.48 701.88 0.48 0.96 re f
480.72 701.88 0.48 0.96 re f
108.96 701.88 371.76 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
553.8 746.76 0.24 0.48 re f
585 746.76 0.24 0.48 re f
554.04 746.76 30.96 0.48 re f
585 80.76 0.24 0.48 re f
554.76 80.76 0.24 0.48 re f
555 80.76 30 0.48 re f
547.8 75 0.48 0.24 re f
547.8 34.8 0.48 0.24 re f
547.8 35.04 0.48 39.96 re f
510 504 54 108 re f
510 611.76 54.24 0.48 re f
563.76 503.76 0.48 108.24 re f
509.76 503.76 54.24 0.48 re f
509.76 504 0.48 108.24 re f
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 605.52 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 602.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 598.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (.) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 595.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 592.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (A) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 583.2 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 575.28 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (v) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 568.56 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (a) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 560.64 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (n) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 553.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 545.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (e) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 538.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 530.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 526.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (T) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 521.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 514.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (l) Tj
ET
Q
BT
0.9955 0 0 0.9955 132.96 670.32 Tm
/F4 10 Tf
-1.0158 Tc (Y) Tj
0.0169 Tc 1.1798 Tw (ou may be tempted to use double quotes instead of curly braces in your) Tj
-24.1095 -12.0547 TD 0.0163 Tc 0.0955 Tw (uses of ) Tj
ET
BT
143.4 658.32 TD
/F5 9 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 165 658.32 Tm
/F4 10 Tf
-0.0087 Tc 0.1206 Tw (. ) Tj
5.6657 0 TD /F7 10 Tf
0.0199 Tc 0.0317 Tw (Don\222t give in!) Tj
61.4792 0 TD /F4 10 Tf
0.0111 Tc 0.0605 Tw ( Using double quotes is, mostly likel) Tj
-1.1533 Tc 0 Tw (y) Tj
0.0084 Tc -0.0171 Tw (, wrong. Suppose) Tj
-123.4406 -12.0547 TD 0.0177 Tc -0.0264 Tw (the first ) Tj
ET
BT
148.92 646.32 TD
/F5 9 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 170.52 646.32 Tm
/F4 10 Tf
0.0148 Tc 0 Tw ( command is written like this:) Tj
ET
BT
144.96 633 TD
/F5 9 Tf
-0.0056 Tc -0.0116 Tw (eval "button $path -text $txt -command $cmd $args") Tj
ET
BT
0.9955 0 0 0.9955 132.96 619.32 Tm
/F4 10 Tf
0.0215 Tc 0 Tw (Incidentall) Tj
-1.2738 Tc (y) Tj
0.0217 Tc -0.0305 Tw (, the previous is equivalent to:) Tj
ET
BT
144.96 606 TD
/F5 9 Tf
-0.0088 Tc 0.0088 Tw (eval button $path -text $txt -command $cmd $args) Tj
ET
BT
0.9955 0 0 0.9955 132.96 592.32 Tm
/F4 10 Tf
0.0198 Tc 0.1884 Tw (These versions happen to work with the following call because ) Tj
ET
BT
425.28 592.32 TD
/F5 9 Tf
0 Tc 0 Tw (txt) Tj
ET
BT
0.9955 0 0 0.9955 441.48 592.32 Tm
/F4 10 Tf
0.0205 Tc 0.1516 Tw ( and ) Tj
ET
BT
464.88 592.32 TD
/F5 9 Tf
0 Tc 0 Tw (cmd) Tj
ET
BT
0.9955 0 0 0.9955 108.96 580.32 Tm
/F4 10 Tf
0.0155 Tc -0.0092 Tw (have one-word values with no special characters in them:) Tj
ET
BT
144.96 567 TD
/F5 9 Tf
-0.0089 Tc 0.0089 Tw (PackedButton .quit Quit { Exit }) Tj
ET
BT
0.9955 0 0 0.9955 132.96 553.32 Tm
/F4 10 Tf
0.0205 Tc -0.0292 Tw (The button command that is ultimately evaluated is:) Tj
ET
BT
144.96 540 TD
/F5 9 Tf
-0.0071 Tc 0.0071 Tw (button .quit -text Quit -command { Exit }) Tj
ET
BT
0.9955 0 0 0.9955 132.96 526.32 Tm
/F4 10 Tf
0.0197 Tc -0.0284 Tw (In the next call, an error is raised:) Tj
ET
BT
144.96 513 TD
/F5 9 Tf
-0.009 Tc 0.009 Tw (PackedButton .save "Save As" [list Save $file]) Tj
0 -11.04 TD /F9 9 Tf
0 Tc -0.04 Tw (=> unknown option "As") Tj
ET
BT
0.9955 0 0 0.9955 108.96 488.28 Tm
/F4 10 Tf
0.0128 Tc 0.0301 Tw (This is because the button command is this:) Tj
ET
BT
144.96 474.96 TD
/F5 9 Tf
-0.006 Tc -0.0111 Tw (button .save -text Save As -command Save /a/b/c) Tj
ET
BT
0.9955 0 0 0.9955 108.96 461.28 Tm
/F4 10 Tf
0.0223 Tc -0.031 Tw (But it should look like this instead:) Tj
ET
BT
144.96 447.96 TD
/F5 9 Tf
-0.0055 Tc -0.0117 Tw (button .save -text {Save As} -command {Save /a/b/c}) Tj
ET
BT
0.9955 0 0 0.9955 132.96 434.28 Tm
/F4 10 Tf
0.0232 Tc 1.2941 Tw (The problem is that the structure of the ) Tj
ET
BT
329.76 434.28 TD
/F5 9 Tf
0 Tc 0 Tw (button) Tj
ET
BT
0.9955 0 0 0.9955 362.16 434.28 Tm
/F4 10 Tf
0 Tc 1.3475 Tw ( command is now wrong.) Tj
-254.3552 -12.0547 TD 0.0271 Tc 1.0892 Tw (The value of ) Tj
ET
BT
172.08 422.28 TD
/F5 9 Tf
0 Tc 0 Tw (txt) Tj
ET
BT
0.9955 0 0 0.9955 188.16 422.28 Tm
/F4 10 Tf
0.0205 Tc 1.1762 Tw ( and ) Tj
ET
BT
213.48 422.28 TD
/F5 9 Tf
-0.04 Tc 0 Tw (cmd) Tj
ET
BT
0.9955 0 0 0.9955 229.56 422.28 Tm
/F4 10 Tf
0.016 Tc 1.1567 Tw ( are substituted first, before ) Tj
ET
BT
367.32 422.28 TD
/F5 9 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 388.92 422.28 Tm
/F4 10 Tf
0.024 Tc 1.0822 Tw ( is even called, and) Tj
-281.2373 -12.0547 TD 0.0192 Tc 2.0113 Tw (then the whole command is parsed again. The worst part is that sometimes) Tj
0 -12.0547 TD 0.0033 Tc 0.9323 Tw (using double quotes works, and sometimes it fails. The success of using double) Tj
T* 0.0164 Tc 2.4844 Tw (quotes depends on the value of the parameters. When those values contain) Tj
T* 0.0079 Tc 0.0286 Tw (spaces or special characters, the command gets parsed incorrectl) Tj
-1.1533 Tc 0 Tw (y) Tj
-0.0087 Tc (.) Tj
24.1095 -13.0191 TD /F7 10 Tf
0.016 Tc 0.002 Tw (Braces: the one true way to group arguments to eval.) Tj
0 -13.0191 TD /F4 10 Tf
-0.0048 Tc 0.0203 Tw (To repeat, the safe construct is:) Tj
ET
BT
144.96 335.04 TD
/F5 9 Tf
-0.0084 Tc 0.0084 Tw (eval {button $path -text $txt -command $cmd} $args) Tj
ET
BT
0.9955 0 0 0.9955 132.96 321.36 Tm
/F4 10 Tf
0.0178 Tc 0.5226 Tw (The following variations are also correct. The first uses ) Tj
ET
BT
394.68 321.36 TD
/F5 9 Tf
0 Tc 0 Tw (list) Tj
ET
BT
0.9955 0 0 0.9955 416.28 321.36 Tm
/F4 10 Tf
0.0333 Tc 0.4401 Tw ( to do quoting) Tj
-308.7221 -12.0547 TD 0.0175 Tc 0 Tw (automaticall) Tj
-1.2738 Tc (y) Tj
0.0186 Tc 1.9233 Tw (, and the others use backslashes or braces to prevent the extra) Tj
0 -12.0547 TD 0.0185 Tc -0.0272 Tw (round of substitutions:) Tj
ET
BT
144.96 284.04 TD
/F5 9 Tf
-0.0026 Tc -0.0274 Tw (eval [list button $path -text $txt -command $cmd] $args) Tj
0 -11.04 TD -0.0082 Tc 0.0082 Tw (eval button \\$path -text \\$txt -command \\$cmd $args) Tj
T* -0.0077 Tc 0.0077 Tw (eval button {$path} -text {$txt} -command {$cmd} $args) Tj
ET
BT
0.9955 0 0 0.9955 132.96 248.28 Tm
/F4 10 Tf
0.0073 Tc 0 Tw (Finall) Tj
-1.2738 Tc (y) Tj
0.0214 Tc -0.0302 Tw (, here is one more ) Tj
116.8105 0 TD /F7 10 Tf
0.0228 Tc 0 Tw (incorrect) Tj
40.2629 0 TD /F4 10 Tf
0.0118 Tc 0.014 Tw ( approach that tries to quote by hand:) Tj
ET
BT
144.96 234.96 TD
/F5 9 Tf
-0.0073 Tc -0.2841 Tw (eval "button {$path} -text {$txt} -command {$cmd} $args") Tj
ET
BT
0.9955 0 0 0.9955 132.96 221.28 Tm
/F4 10 Tf
0.0063 Tc -0.0667 Tw (The problem above is that quoting is not always done with curly braces. If a) Tj
-24.1095 -12.0547 TD 0.0139 Tc 1.2157 Tw (value contains an unmatched curly brace, Tcl would have used backslashes to) Tj
0 -12.0547 TD 0.0194 Tc -0.0148 Tw (quote it, and the above command would raise an error:) Tj
ET
BT
144.96 183.96 TD
/F5 9 Tf
-0.0055 Tc 0.0055 Tw (set blob "foo\\{bar space") Tj
0 -10.92 TD /F9 9 Tf
0 Tc -0.06 Tw (=> foo{bar space) Tj
0 -11.04 TD /F5 9 Tf
(eval "puts {$blob}") Tj
T* /F9 9 Tf
-0.04 Tw (=> missing close brace) Tj
0 -10.92 TD /F5 9 Tf
-0.008 Tc 0.008 Tw (eval puts {$blob}) Tj
0 -11.04 TD /F9 9 Tf
0 Tc -0.06 Tw (=> foo{bar space) Tj
ET
1 1 1 rg
487.2 332.04 35.64 35.76 re f
504.96 366.12 m
489 350.04 l
504.96 334.08 l
521.04 350.04 l
504.96 366.12 l
f*
0 0 0 rg
505.2 365.88 m
489.24 349.8 l
488.88 349.8 l
489.24 350.16 l
505.2 334.2 l
505.2 333.84 l
504.84 334.2 l
520.92 350.16 l
521.28 350.16 l
521.52 349.92 l
521.28 349.8 l
505.2 333.84 l
505.08 333.72 l
504.84 333.84 l
488.76 349.92 l
488.88 350.16 l
504.84 366.24 l
505.2 365.88 l
f
520.92 349.8 m
504.84 365.88 l
504.84 366.24 l
505.08 366.48 l
505.2 366.24 l
521.28 350.16 l
520.92 349.8 l
f
0.302 0.302 0.302 rg
504.96 334.08 m
489 350.04 l
504.96 350.04 l
504.96 334.08 l
f*
0 0 0 rg
504.84 333.84 m
488.4 350.28 l
489 350.28 l
489.24 350.16 l
505.2 334.2 l
504.84 333.84 l
f
489 349.8 16.2 0.48 re f
505.2 350.04 m
505.2 333.48 l
504.84 333.84 l
504.72 334.08 l
504.72 350.04 l
505.2 350.04 l
f
0.102 0.102 0.102 rg
504.96 334.08 m
521.04 350.04 l
504.96 350.04 l
504.96 334.08 l
f*
0 0 0 rg
504.84 334.2 m
520.92 350.16 l
521.04 350.28 l
521.76 350.28 l
521.28 349.8 l
505.2 333.84 l
504.84 334.2 l
f
504.72 349.8 16.32 0.48 re f
505.2 350.04 m
505.2 333.84 l
504.72 333.36 l
504.72 350.04 l
505.2 350.04 l
f
0.702 0.702 0.702 rg
504.96 366.12 m
521.04 350.04 l
504.96 350.04 l
504.96 366.12 l
f*
0 0 0 rg
505.2 366.24 m
521.64 349.8 l
520.92 349.8 l
504.84 365.88 l
505.2 366.24 l
f
504.72 349.8 16.32 0.48 re f
504.72 350.04 m
504.72 366.72 l
505.2 366.24 l
505.2 350.04 l
504.72 350.04 l
f
0.9686 0.9686 0.9686 rg
504.96 366.12 m
489 350.04 l
504.96 350.04 l
504.96 366.12 l
f*
0 0 0 rg
505.2 365.88 m
489.24 349.8 l
488.52 349.8 l
488.88 350.16 l
504.84 366.24 l
505.2 365.88 l
f
489 349.8 16.2 0.48 re f
504.72 350.04 m
504.72 366.12 l
505.2 366.6 l
505.2 350.04 l
504.72 350.04 l
f
0.502 0.502 0.502 rg
504.96 357.12 m
498 350.04 l
504.96 343.08 l
512.04 350.04 l
504.96 357.12 l
f*
0.102 0.102 0.102 rg
505.2 356.88 m
498.24 349.8 l
497.88 349.8 l
498.24 350.16 l
505.2 343.2 l
505.2 342.84 l
504.84 343.2 l
511.92 350.16 l
512.28 350.16 l
512.52 349.92 l
512.28 349.8 l
505.2 342.84 l
505.08 342.72 l
504.84 342.84 l
497.76 349.92 l
497.88 350.16 l
504.84 357.24 l
505.2 356.88 l
f
511.92 349.8 m
504.84 356.88 l
504.84 357.24 l
505.08 357.48 l
505.2 357.24 l
512.28 350.16 l
511.92 349.8 l
f
endstream
endobj
59 0 obj
11468
endobj
57 0 obj
<<
/Type /Page
/Parent 42 0 R
/Resources <<
/Font 60 0 R
/ProcSet 2 0 R
>>
/Contents 58 0 R
>>
endobj
60 0 obj
<<
/F0 6 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
/F7 25 0 R
/F9 32 0 R
>>
endobj
62 0 obj
<<
/Length 63 0 R
>>
stream
BT
114 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0365 Tc -0.0782 Tw (130 ) Tj
243.96 0 TD 0.04 Tc -0.0418 Tw (Quoting Issues and Eval) Tj
86.76 0 TD 0.0261 Tc 0.0282 Tw ( Chap. 10) Tj
ET
113.52 701.88 0.48 0.96 re f
486 701.88 0.48 0.96 re f
114 701.88 372 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
554.76 746.76 0.24 0.48 re f
584.04 746.76 0.24 0.48 re f
555 746.76 29.04 0.48 re f
585 80.76 0.24 0.48 re f
553.8 80.76 0.24 0.48 re f
554.04 80.76 30.96 0.48 re f
548.76 69.96 0.48 0.24 re f
548.76 33.72 0.48 0.24 re f
548.76 33.96 0.48 36 re f
BT
0.997 0 0 0.997 114 668.4 Tm
/F2 13 Tf
0.2695 Tc -0.0585 Tw (The ) Tj
ET
BT
140.28 668.4 TD
/F8 13.92 Tf
0.048 Tc 0 Tw (uplevel) Tj
ET
BT
0.997 0 0 0.997 198.96 668.4 Tm
/F2 13 Tf
0.3135 Tc 0.0177 Tw ( Command) Tj
ET
BT
0.9955 0 0 0.9955 114 647.4 Tm
/F4 10 Tf
0.0176 Tc 0.0941 Tw (The ) Tj
ET
BT
134.76 647.4 TD
/F5 9 Tf
0 Tc 0 Tw (uplevel) Tj
ET
BT
0.9955 0 0 0.9955 172.44 647.4 Tm
/F4 10 Tf
0.0176 Tc 0.1665 Tw ( command is similar to ) Tj
ET
BT
281.4 647.4 TD
/F5 9 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 303 647.4 Tm
/F4 10 Tf
0.0187 Tc 0.162 Tw (, except that it evaluates a command in) Tj
-189.8623 -12.0547 TD 0.0147 Tc 0.0229 Tw (a different scope than the current procedure. It is useful for defining new control) Tj
0 -12.0547 TD 0.0165 Tc -0.0252 Tw (structures entirely in Tcl. The syntax for ) Tj
ET
BT
304.8 623.4 TD
/F5 9 Tf
0 Tc 0 Tw (uplevel) Tj
ET
BT
0.9955 0 0 0.9955 342.48 623.4 Tm
/F4 10 Tf
0.0145 Tc -0.0232 Tw ( is:) Tj
ET
BT
150 609.96 TD
/F5 9 Tf
-0.015 Tc 0.015 Tw (uplevel ?) Tj
48.48 0 TD /F9 9 Tf
0 Tc 0 Tw (level) Tj
27 0 TD /F5 9 Tf
(?) Tj
5.4 0 TD /F9 9 Tf
-0.0109 Tc 0.0109 Tw ( command ?list1 list2 ...?) Tj
ET
BT
0.9955 0 0 0.9955 138 596.4 Tm
/F4 10 Tf
-0.001 Tc 1.5594 Tw (As with ) Tj
ET
BT
179.28 596.4 TD
/F5 9 Tf
0 Tc 0 Tw (upva) Tj
-0.96 Tc (r) Tj
ET
BT
0.9955 0 0 0.9955 205.32 596.4 Tm
/F4 10 Tf
0.0132 Tc 1.4849 Tw (, the ) Tj
ET
BT
231.6 596.4 TD
/F9 9 Tf
0 Tc 0 Tw (level) Tj
ET
BT
0.9955 0 0 0.9955 258.6 596.4 Tm
/F4 10 Tf
0.0187 Tc 1.488 Tw ( parameter is optional and defaults to ) Tj
ET
BT
446.04 596.4 TD
/F5 9 Tf
0 Tc 0 Tw (1) Tj
ET
BT
0.9955 0 0 0.9955 451.44 596.4 Tm
/F4 10 Tf
-0.001 Tc 1.5594 Tw (, which) Tj
-338.9795 -12.0547 TD 0.0129 Tc 0.6646 Tw (means to execute the command in the scope of the calling procedure. The other) Tj
0 -12.0547 TD 0.0182 Tc 0.6964 Tw (common use of level is ) Tj
ET
BT
223.2 572.4 TD
/F5 9 Tf
0 Tc 0 Tw (#0) Tj
ET
BT
0.9955 0 0 0.9955 234 572.4 Tm
/F4 10 Tf
0.0166 Tc 0.7114 Tw (, which means to evaluate the command in the global) Tj
-120.5475 -12.0547 TD -0.0196 Tc 0.9754 Tw (scope. ) Tj
-1.0158 Tc 0 Tw (Y) Tj
0.0048 Tc 0.9358 Tw (ou can count up farther than one \(e.g., ) Tj
ET
BT
337.44 560.4 TD
/F5 9 Tf
0 Tc 0 Tw (2) Tj
ET
BT
0.9955 0 0 0.9955 342.84 560.4 Tm
/F4 10 Tf
0.0395 Tc 0.916 Tw ( or ) Tj
ET
BT
359.76 560.4 TD
/F5 9 Tf
0 Tc 0 Tw (3) Tj
ET
BT
0.9955 0 0 0.9955 365.16 560.4 Tm
/F4 10 Tf
0.0135 Tc 0.9422 Tw (\), or count down from the) Tj
-252.3059 -12.1753 TD -0.0099 Tc 0.0013 Tw (global level \(e.g., ) Tj
ET
BT
193.32 548.28 TD
/F5 9 Tf
0 Tc 0 Tw (#1) Tj
ET
BT
0.9955 0 0 0.9955 204.12 548.28 Tm
/F4 10 Tf
0.0395 Tc -0.0483 Tw ( or ) Tj
ET
BT
219.12 548.28 TD
/F5 9 Tf
0 Tc 0 Tw (#2) Tj
ET
BT
0.9955 0 0 0.9955 229.92 548.28 Tm
/F4 10 Tf
0.0159 Tc -0.0247 Tw (\), but these cases rarely make sense.) Tj
-92.3394 -12.0547 TD 0.0188 Tc 0.2738 Tw (When you specify the ) Tj
ET
BT
240.36 536.28 TD
/F9 9 Tf
0 Tc 0 Tw (command) Tj
ET
BT
0.9955 0 0 0.9955 278.16 536.28 Tm
/F4 10 Tf
0.0043 Tc 0.3185 Tw ( argument, you must be aware of any substi-) Tj
-164.909 -12.0547 TD 0.018 Tc 0.4916 Tw (tutions that might be performed by the Tcl interpreter before ) Tj
ET
BT
404.04 524.28 TD
/F5 9 Tf
0 Tc 0 Tw (uplevel) Tj
ET
BT
0.9955 0 0 0.9955 441.84 524.28 Tm
/F4 10 Tf
0.0127 Tc 0.521 Tw ( is called.) Tj
-329.3357 -12.0547 TD 0.0175 Tc -0.2472 Tw (If you are entering the command directl) Tj
-1.1533 Tc 0 Tw (y) Tj
0.0125 Tc -0.2171 Tw (, protect it with curly braces so that sub-) Tj
0 -12.0547 TD 0.0141 Tc 1.4347 Tw (stitutions occur in the other scope. The following affects the variable ) Tj
ET
BT
447.96 500.28 TD
/F5 9 Tf
0 Tc 0 Tw (x) Tj
ET
BT
0.9955 0 0 0.9955 453.36 500.28 Tm
/F4 10 Tf
0.0159 Tc 1.4219 Tw ( in the) Tj
-340.9083 -12.0547 TD 0 Tc -0.0091 Tw (caller\222s scope:) Tj
ET
BT
150 474.96 TD
/F5 9 Tf
-0.0104 Tc 0.0104 Tw (uplevel {set x [expr $x + 1]}) Tj
ET
BT
0.9955 0 0 0.9955 138 461.28 Tm
/F4 10 Tf
0.025 Tc 0 Tw (Howeve) Tj
-1.0667 Tc (r) Tj
0.017 Tc 0.14 Tw (, the following will use the value of ) Tj
ET
BT
342.48 461.28 TD
/F5 9 Tf
0 Tc 0 Tw (x) Tj
ET
BT
0.9955 0 0 0.9955 347.88 461.28 Tm
/F4 10 Tf
0.0102 Tc 0.1619 Tw ( in the current scope to define) Tj
-234.9471 -12.0547 TD 0.0159 Tc -0.0247 Tw (the value of ) Tj
ET
BT
170.88 449.28 TD
/F5 9 Tf
0 Tc 0 Tw (x) Tj
ET
BT
0.9955 0 0 0.9955 176.16 449.28 Tm
/F4 10 Tf
0.0088 Tc 0.0044 Tw ( in the calling scope, which is probably not what was intended:) Tj
ET
BT
150 435.96 TD
/F5 9 Tf
-0.0104 Tc 0.0104 Tw (uplevel "set x [expr $x + 1]") Tj
ET
BT
0.9955 0 0 0.9955 138 422.28 Tm
/F4 10 Tf
0.013 Tc 2.0276 Tw (If you are constructing the command dynamicall) Tj
-1.2738 Tc 0 Tw (y) Tj
0.0213 Tc 1.979 Tw (, again use ) Tj
ET
BT
436.32 422.28 TD
/F5 9 Tf
0 Tc 0 Tw (list) Tj
ET
BT
0.9955 0 0 0.9955 457.92 422.28 Tm
/F4 10 Tf
0.0071 Tc 2.0335 Tw (. This) Tj
-345.4891 -12.0547 TD 0.0168 Tc -0.0054 Tw (fragment is used later in Example 10\2264:) Tj
ET
BT
150 396.96 TD
/F5 9 Tf
-0.0057 Tc -0.0183 Tw (uplevel [list foreach $args $valueList {break}]) Tj
ET
BT
0.9955 0 0 0.9955 138 383.28 Tm
/F4 10 Tf
0.0175 Tc 0.2309 Tw (It is common to have the command in a variable. This is the case when the) Tj
-24.1095 -12.0547 TD 0.0188 Tc -0.0275 Tw (command has been passed into your new control flow procedure as an argument.) Tj
0 -12.0547 TD 0.013 Tc 1.5539 Tw (In this case, you should evaluate the command one level up. Put the level in) Tj
T* 0.0125 Tc 0.0029 Tw (explicitly to avoid cases where ) Tj
ET
BT
256.44 347.28 TD
/F5 9 Tf
0 Tc -0.12 Tw ($cmd ) Tj
ET
BT
0.9955 0 0 0.9955 283.44 347.28 Tm
/F4 10 Tf
0.0272 Tc -0.036 Tw (looks like a number!) Tj
ET
BT
150 333.96 TD
/F5 9 Tf
-0.01 Tc 0.01 Tw (uplevel 1 $cmd) Tj
ET
BT
0.9955 0 0 0.9955 138 320.28 Tm
/F4 10 Tf
0.0153 Tc 1.3348 Tw (Another common scenario is reading commands from users as part of an) Tj
-24.1095 -12.0547 TD 0.0167 Tc 0.6577 Tw (application. In this case, you should evaluate the command at the global scope.) Tj
0 -12.0547 TD 0.0147 Tc 0.0033 Tw (Example 16\2262 on page 220 illustrates this use of ) Tj
ET
BT
340.92 296.28 TD
/F5 9 Tf
0 Tc 0 Tw (uplevel) Tj
ET
BT
0.9955 0 0 0.9955 378.72 296.28 Tm
/F4 10 Tf
-0.0087 Tc (:) Tj
ET
BT
150 282.96 TD
/F5 9 Tf
-0.0092 Tc 0.0092 Tw (uplevel #0 $cmd) Tj
ET
BT
0.9955 0 0 0.9955 138 269.28 Tm
/F4 10 Tf
0.0105 Tc 1.4922 Tw (If you are assembling a command from a few different lists, such as the) Tj
ET
BT
114 257.28 TD
/F5 9 Tf
0 Tc 0 Tw (args) Tj
ET
BT
0.9955 0 0 0.9955 135.6 257.28 Tm
/F4 10 Tf
0.0176 Tc -0.0264 Tw ( paramete) Tj
-1.0667 Tc 0 Tw (r) Tj
0.0226 Tc -0.0073 Tw (, then you can use ) Tj
ET
BT
271.92 257.28 TD
/F5 9 Tf
-0.02 Tc 0 Tw (concat) Tj
ET
BT
0.9955 0 0 0.9955 304.32 257.28 Tm
/F4 10 Tf
0.0177 Tc 0.0036 Tw ( to form the command:) Tj
ET
BT
150 243.96 TD
/F5 9 Tf
-0.01 Tc 0.01 Tw (uplevel [concat $cmd $args]) Tj
ET
BT
0.9955 0 0 0.9955 138 230.28 Tm
/F4 10 Tf
0.0141 Tc 0.821 Tw (The lists in ) Tj
ET
BT
195.24 230.28 TD
/F5 9 Tf
0 Tc 0 Tw ($cmd) Tj
ET
BT
0.9955 0 0 0.9955 216.84 230.28 Tm
/F4 10 Tf
0.0205 Tc 0.8146 Tw ( and ) Tj
ET
BT
241.44 230.28 TD
/F5 9 Tf
-0.024 Tc 0 Tw ($args) Tj
ET
BT
0.9955 0 0 0.9955 268.44 230.28 Tm
/F4 10 Tf
0.0167 Tc 0.8184 Tw ( are concatenated into a single list, which is a) Tj
-155.1446 -12.0547 TD 0.0141 Tc -0.053 Tw (valid Tcl command. Like ) Tj
ET
BT
230.16 218.28 TD
/F5 9 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 251.76 218.28 Tm
/F4 10 Tf
-0.0087 Tc 0 Tw (, ) Tj
ET
BT
257.28 218.28 TD
/F5 9 Tf
-0.0171 Tc 0 Tw (uplevel) Tj
ET
BT
0.9955 0 0 0.9955 294.96 218.28 Tm
/F4 10 Tf
0.0285 Tc -0.0975 Tw ( uses ) Tj
ET
BT
320.88 218.28 TD
/F5 9 Tf
0 Tc 0 Tw (concat) Tj
ET
BT
0.9955 0 0 0.9955 353.16 218.28 Tm
/F4 10 Tf
0.0149 Tc -0.0438 Tw ( internally if it is given extra) Tj
-240.2511 -12.0547 TD 0.0021 Tc 1.026 Tw (arguments, so you can leave out the explicit use of ) Tj
ET
BT
358.2 206.28 TD
/F5 9 Tf
-0.02 Tc 0 Tw (concat) Tj
ET
BT
0.9955 0 0 0.9955 390.48 206.28 Tm
/F4 10 Tf
0.0121 Tc 1.0239 Tw (. The following com-) Tj
-277.7414 -12.0547 TD 0.0058 Tc 0.1061 Tw (mands are equivalent:) Tj
ET
BT
150 180.96 TD
/F5 9 Tf
-0.01 Tc 0.01 Tw (uplevel [concat $cmd $args]) Tj
0 -12.96 TD -0.0067 Tc 0.0067 Tw (uplevel "$cmd $args") Tj
T* -0.0075 Tc 0.0075 Tw (uplevel $cmd $args) Tj
ET
BT
0.9955 0 0 0.9955 138 141.36 Tm
/F4 10 Tf
0.0171 Tc 0.6285 Tw (Example 10\2264 shows list assignment using the ) Tj
ET
BT
361.56 141.36 TD
/F5 9 Tf
-0.0171 Tc 0 Tw (foreach) Tj
ET
BT
0.9955 0 0 0.9955 399.24 141.36 Tm
/F4 10 Tf
0.0209 Tc 0.573 Tw ( trick described on) Tj
-286.5414 -12.0547 TD 0.0183 Tc 0.1537 Tw (Page 75. List assignment is useful if a command returns several values in a list.) Tj
ET
endstream
endobj
63 0 obj
9903
endobj
61 0 obj
<<
/Type /Page
/Parent 42 0 R
/Resources <<
/Font 64 0 R
/ProcSet 2 0 R
>>
/Contents 62 0 R
>>
endobj
64 0 obj
<<
/F0 6 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
/F8 29 0 R
/F9 32 0 R
>>
endobj
67 0 obj
<<
/Length 68 0 R
>>
stream
BT
108.96 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0513 Tc -0.093 Tw (The ) Tj
16.08 0 TD /F5 7.92 Tf
0.048 Tc 0 Tw (uplevel) Tj
33.48 0 TD /F0 7.92 Tf
0.0447 Tc 0.0335 Tw ( Command) Tj
307.2 0 TD 0.0765 Tc 0 Tw (131) Tj
ET
108.48 701.88 0.48 0.96 re f
480.72 701.88 0.48 0.96 re f
108.96 701.88 371.76 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
553.8 746.76 0.24 0.48 re f
585 746.76 0.24 0.48 re f
554.04 746.76 30.96 0.48 re f
585 80.76 0.24 0.48 re f
554.76 80.76 0.24 0.48 re f
555 80.76 30 0.48 re f
547.8 75 0.48 0.24 re f
547.8 34.8 0.48 0.24 re f
547.8 35.04 0.48 39.96 re f
510 504 54 108 re f
510 611.76 54.24 0.48 re f
563.76 503.76 0.48 108.24 re f
509.76 503.76 54.24 0.48 re f
509.76 504 0.48 108.24 re f
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 605.52 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 602.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 598.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (.) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 595.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 592.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (A) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 583.2 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 575.28 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (v) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 568.56 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (a) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 560.64 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (n) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 553.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 545.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (e) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 538.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 530.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 526.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (T) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 521.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 514.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (l) Tj
ET
Q
BT
0.9955 0 0 0.9955 108.96 670.32 Tm
/F4 10 Tf
0.0176 Tc 0.8174 Tw (The ) Tj
ET
BT
130.32 670.32 TD
/F5 9 Tf
-0.0171 Tc 0 Tw (lassign) Tj
ET
BT
0.9955 0 0 0.9955 168 670.32 Tm
/F4 10 Tf
0.0119 Tc 0.7509 Tw ( procedure assigns the list elements to several variables. The ) Tj
ET
BT
459.48 670.32 TD
/F5 9 Tf
0 Tc 0 Tw (las-) Tj
-350.52 -12 TD (sign) Tj
ET
BT
0.9955 0 0 0.9955 130.56 658.32 Tm
/F4 10 Tf
0.0077 Tc -0.1369 Tw ( procedure hides the ) Tj
ET
BT
226.44 658.32 TD
/F5 9 Tf
0 Tc 0 Tw (foreach) Tj
ET
BT
0.9955 0 0 0.9955 264.24 658.32 Tm
/F4 10 Tf
0.0155 Tc -0.1965 Tw ( trick, but it must use the ) Tj
ET
BT
383.76 658.32 TD
/F5 9 Tf
0 Tc 0 Tw (uplevel) Tj
ET
BT
0.9955 0 0 0.9955 421.56 658.32 Tm
/F4 10 Tf
0.0091 Tc -0.1384 Tw ( command so) Tj
-314.0262 -12.0547 TD 0.0112 Tc 0.8459 Tw (that the loop variables get assigned in the correct scope. The ) Tj
ET
BT
399.84 646.32 TD
/F5 9 Tf
0 Tc 0 Tw (list) Tj
ET
BT
0.9955 0 0 0.9955 421.44 646.32 Tm
/F4 10 Tf
0.0139 Tc 0.8212 Tw ( command is) Tj
-313.9056 -12.0547 TD 0.0202 Tc 1.3574 Tw (used to construct the ) Tj
ET
BT
213.84 634.32 TD
/F5 9 Tf
0 Tc 0 Tw (foreach) Tj
ET
BT
0.9955 0 0 0.9955 251.64 634.32 Tm
/F4 10 Tf
0.0084 Tc 1.3692 Tw ( command that is executed in the caller\222s scope.) Tj
-143.331 -12.0547 TD 0.0201 Tc 1.7794 Tw (This is necessary so that ) Tj
ET
BT
234.36 622.32 TD
/F5 9 Tf
-0.012 Tc 0 Tw ($variables) Tj
ET
BT
0.9955 0 0 0.9955 288.36 622.32 Tm
/F4 10 Tf
0.0205 Tc 1.8392 Tw ( and ) Tj
ET
BT
314.88 622.32 TD
/F5 9 Tf
-0.0171 Tc 0 Tw ($values) Tj
ET
BT
0.9955 0 0 0.9955 352.56 622.32 Tm
/F4 10 Tf
0.0184 Tc 1.7811 Tw ( get substituted before the) Tj
-244.7114 -12.0547 TD 0.0151 Tc -0.0239 Tw (command is evaluated in the other scope.) Tj
ET
1 1 1 rg
108.96 576.96 372 8.04 re f
0 0 0 rg
131.76 580.8 0.24 0.48 re f
480 580.8 0.24 0.48 re f
132 580.8 348 0.48 re f
BT
132.96 587.64 TD
/F1 7.92 Tf
0.0414 Tc 0.0368 Tw (Example 10\226) Tj
3.9965 Tc 0 Tw (4) Tj
56.88 0 TD /F5 9 Tf
0 Tc (lassign) Tj
37.8 0 TD /F0 7.92 Tf
0.0202 Tc 0.0581 Tw (: list assignment with ) Tj
75.96 0 TD /F5 9 Tf
0 Tc 0 Tw (foreach) Tj
37.8 0 TD /F0 7.92 Tf
-0.0418 Tc (.) Tj
-208.44 -22.68 TD /F5 9 Tf
-0.006 Tc -0.006 Tw (# Assign a set of variables from a list of values.) Tj
0 -9.96 TD -0.0094 Tc -0.4826 Tw (# If there are more values than variables, they are returned.) Tj
T* -0.0033 Tc -0.0267 Tw (# If there are fewer values than variables, ) Tj
0 -10.08 TD -0.0077 Tc 0.0077 Tw (# the variables get the empty string.) Tj
0 -19.92 TD -0.0089 Tc 0.0089 Tw (proc lassign {valueList args} {) Tj
18 -10.08 TD -0.0109 Tc 0.0109 Tw (if {[llength $args] == 0} {) Tj
18 -9.96 TD -0.0051 Tc -0.4749 Tw (error "wrong # args: lassign list varname ?varname..?") Tj
-18 -9.96 TD 0 Tc 0 Tw (}) Tj
0 -10.08 TD -0.0089 Tc 0.0089 Tw (if {[llength $valueList] == 0} {) Tj
18 -9.96 TD -0.0069 Tc 0.0069 Tw (# Ensure one trip through the foreach loop) Tj
0 -9.96 TD -0.006 Tc 0.006 Tw (set valueList [list {}]) Tj
-18 -10.08 TD 0 Tc 0 Tw (}) Tj
0 -9.96 TD -0.0084 Tc 0.0084 Tw (uplevel 1 [list foreach $args $valueList {break}]) Tj
T* -0.0088 Tc 0.0088 Tw (return [lrange $valueList [llength $args] end]) Tj
ET
1 1 1 rg
108.96 404.04 372 7.92 re f
0 0 0 rg
131.76 407.76 0.24 0.48 re f
480 407.76 0.24 0.48 re f
132 407.76 348 0.48 re f
BT
132.96 414.96 TD
0 Tc 0 Tw (}) Tj
ET
BT
0.9955 0 0 0.9955 132.96 388.32 Tm
/F4 10 Tf
0.0204 Tc 1.3504 Tw (Example 10\2265 illustrates a new control structure with the ) Tj
ET
BT
416.28 388.32 TD
/F5 9 Tf
-0.01 Tc 0 Tw (File_Process) Tj
ET
BT
0.9955 0 0 0.9955 108.96 376.32 Tm
/F4 10 Tf
0.0142 Tc -0.0487 Tw (procedure that applies a callback to each line in a file. The call to ) Tj
ET
BT
411.24 376.32 TD
/F5 9 Tf
0 Tc 0 Tw (uplevel) Tj
ET
BT
0.9955 0 0 0.9955 449.04 376.32 Tm
/F4 10 Tf
0.0217 Tc -0.151 Tw ( allows) Tj
-341.6316 -12.0547 TD 0.0205 Tc 0.5734 Tw (the ) Tj
ET
BT
127.32 364.32 TD
/F5 9 Tf
0 Tc 0 Tw (callback) Tj
ET
BT
0.9955 0 0 0.9955 170.52 364.32 Tm
/F4 10 Tf
0.0225 Tc 0.5715 Tw ( to be concatenated with the ) Tj
ET
BT
306.84 364.32 TD
/F5 9 Tf
0 Tc 0 Tw (line) Tj
ET
BT
0.9955 0 0 0.9955 328.44 364.32 Tm
/F4 10 Tf
0.0238 Tc 0.5702 Tw ( to form the command. The ) Tj
ET
BT
459.48 364.32 TD
/F5 9 Tf
0 Tc 0 Tw (list) Tj
ET
BT
0.9955 0 0 0.9955 108.96 352.32 Tm
/F4 10 Tf
0.0177 Tc 0.3352 Tw (command is used to quote any special characters in ) Tj
ET
BT
351.84 352.32 TD
/F5 9 Tf
-0.03 Tc 0 Tw (line) Tj
ET
BT
0.9955 0 0 0.9955 373.2 352.32 Tm
/F4 10 Tf
0.0166 Tc 0.3363 Tw (, so it appears as a sin-) Tj
-265.4456 -12.0547 TD 0.0227 Tc -0.0315 Tw (gle argument to the command. ) Tj
ET
1 1 1 rg
108.96 307.08 372 7.92 re f
0 0 0 rg
131.76 310.8 0.24 0.48 re f
480 310.8 0.24 0.48 re f
132 310.8 348 0.48 re f
BT
132.96 317.64 TD
/F1 7.92 Tf
0.0414 Tc 0.0368 Tw (Example 10\226) Tj
3.9965 Tc 0 Tw (5) Tj
56.88 0 TD /F0 7.92 Tf
0.0357 Tc -0.0011 Tw (The File_Process procedure applies a command to each line of a file.) Tj
-56.88 -22.56 TD /F5 9 Tf
-0.0077 Tc 0.0077 Tw (proc File_Process {file callback} {) Tj
18 -10.08 TD -0.0075 Tc 0.0075 Tw (set in [open $file]) Tj
0 -9.96 TD -0.0092 Tc 0.0092 Tw (while {[gets $file line] >= 0} {) Tj
18 -10.08 TD -0.0086 Tc 0.0086 Tw (uplevel 1 $callback [list $line]) Tj
-18 -9.96 TD 0 Tc 0 Tw (}) Tj
0 -9.96 TD (close $in) Tj
ET
1 1 1 rg
108.96 224.04 372 7.92 re f
0 0 0 rg
131.76 227.76 0.24 0.48 re f
480 227.76 0.24 0.48 re f
132 227.76 348 0.48 re f
BT
132.96 234.96 TD
(}) Tj
ET
BT
0.9955 0 0 0.9955 132.96 208.32 Tm
/F4 10 Tf
0.0107 Tc 0.0495 Tw (What is the difference between these two commands?) Tj
ET
BT
144.96 195 TD
/F5 9 Tf
-0.0086 Tc 0.0086 Tw (uplevel 1 [list $callback $line]) Tj
0 -12.96 TD (uplevel 1 $callback [list $line]) Tj
ET
BT
0.9955 0 0 0.9955 108.96 168.36 Tm
/F4 10 Tf
0.0162 Tc 0.186 Tw (The first form limits ) Tj
ET
BT
206.52 168.36 TD
/F5 9 Tf
-0.015 Tc 0 Tw (callback) Tj
ET
BT
0.9955 0 0 0.9955 249.72 168.36 Tm
/F4 10 Tf
0.0149 Tc 0.1933 Tw ( to be the name of the command, while the second) Tj
-141.4022 -12.0547 TD 0.028 Tc 0.2043 Tw (form allows ) Tj
ET
BT
165.96 156.36 TD
/F5 9 Tf
0 Tc 0 Tw (callback) Tj
ET
BT
0.9955 0 0 0.9955 209.16 156.36 Tm
/F4 10 Tf
0.017 Tc 0.2656 Tw ( to be a command prefix. Once again, what is the bug with) Tj
-100.6572 -12.0547 TD 0.0191 Tc -0.0279 Tw (this version?) Tj
ET
BT
144.96 131.04 TD
/F5 9 Tf
-0.0055 Tc 0.0055 Tw (uplevel 1 $callback $line) Tj
ET
endstream
endobj
68 0 obj
9331
endobj
65 0 obj
<<
/Type /Page
/Parent 66 0 R
/Resources <<
/Font <<
/F0 6 0 R
/F1 7 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
>>
/ProcSet 2 0 R
>>
/Contents 67 0 R
>>
endobj
70 0 obj
<<
/Length 71 0 R
>>
stream
BT
114 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0365 Tc -0.0782 Tw (132 ) Tj
243.96 0 TD 0.04 Tc -0.0418 Tw (Quoting Issues and Eval) Tj
86.76 0 TD 0.0261 Tc 0.0282 Tw ( Chap. 10) Tj
ET
113.52 701.88 0.48 0.96 re f
486 701.88 0.48 0.96 re f
114 701.88 372 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
554.76 746.76 0.24 0.48 re f
584.04 746.76 0.24 0.48 re f
555 746.76 29.04 0.48 re f
585 80.76 0.24 0.48 re f
553.8 80.76 0.24 0.48 re f
554.04 80.76 30.96 0.48 re f
548.76 69.96 0.48 0.24 re f
548.76 33.72 0.48 0.24 re f
548.76 33.96 0.48 36 re f
BT
0.9955 0 0 0.9955 114 670.32 Tm
/F4 10 Tf
0.0081 Tc 0.0435 Tw (The arbitrary value of ) Tj
ET
BT
218.76 670.32 TD
/F5 9 Tf
0 Tc 0 Tw ($line) Tj
ET
BT
0.9955 0 0 0.9955 245.76 670.32 Tm
/F4 10 Tf
0.0195 Tc -0.0041 Tw ( is concatenated to the ) Tj
ET
BT
352.08 670.32 TD
/F5 9 Tf
0 Tc 0 Tw (callback) Tj
ET
BT
0.9955 0 0 0.9955 395.28 670.32 Tm
/F4 10 Tf
0.0245 Tc -0.0333 Tw ( command, and it is) Tj
-282.5633 -12.0547 TD 0.0189 Tc -0.0105 Tw (likely to be a malformed command when executed.) Tj
ET
BT
0.997 0 0 0.997 114 620.4 Tm
/F2 13 Tf
0.2695 Tc -0.0585 Tw (The ) Tj
ET
BT
140.28 620.4 TD
/F8 13.92 Tf
0.048 Tc 0 Tw (subst) Tj
ET
BT
0.997 0 0 0.997 182.16 620.4 Tm
/F2 13 Tf
0.3135 Tc 0.0177 Tw ( Command) Tj
ET
BT
0.9955 0 0 0.9955 114 599.4 Tm
/F4 10 Tf
0.0176 Tc 1.1791 Tw (The ) Tj
ET
BT
135.84 599.4 TD
/F5 9 Tf
0 Tc 0 Tw (subst) Tj
ET
BT
0.9955 0 0 0.9955 162.72 599.4 Tm
/F4 10 Tf
0.0049 Tc 1.2823 Tw ( command is useful when you have a mixture of Tcl commands, Tcl) Tj
-48.9423 -12.0547 TD 0.0146 Tc 0.9066 Tw (variable references, and plain old data. The ) Tj
ET
BT
323.88 587.4 TD
/F5 9 Tf
0 Tc 0 Tw (subst) Tj
ET
BT
0.9955 0 0 0.9955 350.88 587.4 Tm
/F4 10 Tf
0.0165 Tc 0.9391 Tw ( command looks through the) Tj
-237.9607 -12.0547 TD 0.0085 Tc 0.0486 Tw (data for square brackets, dollar signs, and backslashes, and it does substitutions) Tj
0 -12.0547 TD 0.0144 Tc -0.0232 Tw (on those. It leaves the rest of the data alone:) Tj
ET
BT
150 549.96 TD
/F5 9 Tf
-0.01 Tc 0.01 Tw (set a "foo bar") Tj
0 -12.96 TD -0.0092 Tc 0.0092 Tw (subst {a=$a date=[exec date]}) Tj
T* /F9 9 Tf
-0.0032 Tc -0.0268 Tw (=> a=foo bar date=Thu Dec 15 10:13:48 PST 1994) Tj
ET
BT
0.9955 0 0 0.9955 138 510.36 Tm
/F4 10 Tf
0.0176 Tc 1.2996 Tw (The ) Tj
ET
BT
159.84 510.36 TD
/F5 9 Tf
0 Tc 0 Tw (subst) Tj
ET
BT
0.9955 0 0 0.9955 186.84 510.36 Tm
/F4 10 Tf
0.0132 Tc 1.3589 Tw ( command does not honor the quoting effect of curly braces. It) Tj
-73.1723 -12.0547 TD 0.0155 Tc 0.0059 Tw (does substitutions regardless of braces:) Tj
ET
BT
150 485.04 TD
/F5 9 Tf
-0.0086 Tc 0.0086 Tw (subst {a=$a date={[exec date]}}) Tj
0 -13.08 TD /F9 9 Tf
-0.009 Tc 0.009 Tw (=> a=foo bar date={Thu Dec 15 10:15:31 PST 1994}) Tj
ET
BT
0.9955 0 0 0.9955 138 458.28 Tm
/F4 10 Tf
-1.0158 Tc 0 Tw (Y) Tj
0.0208 Tc -0.0296 Tw (ou can use backslashes to prevent variable and command substitution.) Tj
ET
BT
150 444.96 TD
/F5 9 Tf
-0.0086 Tc 0.0086 Tw (subst {a=\\$a date=\\[exec date]}) Tj
0 -12.96 TD /F9 9 Tf
-0.0114 Tc 0.0114 Tw (=> a=$a date=[exec date]) Tj
ET
BT
0.9955 0 0 0.9955 138 418.32 Tm
/F4 10 Tf
-1.0158 Tc 0 Tw (Y) Tj
0.0101 Tc 0.3773 Tw (ou can use other backslash substitutions like ) Tj
ET
BT
356.64 418.32 TD
/F5 9 Tf
0 Tc 0 Tw (\\uXXXX) Tj
ET
BT
0.9955 0 0 0.9955 389.04 418.32 Tm
/F4 10 Tf
0.0122 Tc 0.3407 Tw ( to get Unicode char-) Tj
-276.2948 -12.0547 TD -0.0193 Tc 0.0107 Tw (acters, ) Tj
ET
BT
147.24 406.32 TD
/F5 9 Tf
0 Tc 0 Tw (\\n) Tj
ET
BT
0.9955 0 0 0.9955 158.04 406.32 Tm
/F4 10 Tf
0.0058 Tc -0.0145 Tw ( to get newlines, or ) Tj
ET
BT
247.92 406.32 TD
/F5 9 Tf
0 Tc 0 Tw (\\) Tj
ET
BT
0.9955 0 0 0.9955 253.32 406.32 Tm
/F4 10 Tf
0.0083 Tc -0.017 Tw (-newline to hide newlines.) Tj
-115.8461 -12.0547 TD 0.0176 Tc -0.0264 Tw (The ) Tj
ET
BT
158.52 394.32 TD
/F5 9 Tf
0 Tc 0 Tw (subst) Tj
ET
BT
0.9955 0 0 0.9955 185.52 394.32 Tm
/F4 10 Tf
0.0179 Tc -0.0266 Tw ( command takes flags that limit the substitutions it will perform.) Tj
-71.8463 -12.0547 TD 0.0223 Tc 1.1744 Tw (The flags are ) Tj
ET
BT
180.72 382.32 TD
/F5 9 Tf
-0.0257 Tc 0 Tw (-nobackslashes) Tj
ET
BT
0.9955 0 0 0.9955 255.96 382.32 Tm
/F4 10 Tf
-0.0087 Tc 1.2055 Tw (, ) Tj
ET
BT
262.68 382.32 TD
/F5 9 Tf
-0.0327 Tc 0 Tw (-nocommands) Tj
ET
BT
0.9955 0 0 0.9955 321.84 382.32 Tm
/F4 10 Tf
0.0234 Tc 1.1733 Tw (, or ) Tj
ET
BT
342 382.32 TD
/F5 9 Tf
-0.02 Tc 0 Tw (-novariables) Tj
ET
BT
0.9955 0 0 0.9955 406.44 382.32 Tm
/F4 10 Tf
-0.053 Tc 1.2501 Tw (. You can specify) Tj
-293.7742 -12.0547 TD 0.0219 Tc -0.0306 Tw (one or more of these flags before the string that needs to be substituted:) Tj
ET
BT
150 357 TD
/F5 9 Tf
-0.0095 Tc 0.0095 Tw (subst -novariables {a=$a date=[exec date]}) Tj
0 -12.96 TD /F9 9 Tf
-0.0106 Tc 0.0106 Tw (=> a=$a date=Thu Dec 15 10:15:31 PST 1994) Tj
ET
BT
0.9955 0 0 0.9955 138 314.28 Tm
/F2 10 Tf
0.012 Tc -0.0407 Tw (String Processing with ) Tj
ET
BT
243.72 314.28 TD
/F8 12 Tf
0 Tc 0 Tw (subst) Tj
ET
BT
0.9955 0 0 0.9955 138 296.28 Tm
/F4 10 Tf
0.0176 Tc 0.3352 Tw (The ) Tj
ET
BT
158.88 296.28 TD
/F5 9 Tf
0 Tc 0 Tw (subst) Tj
ET
BT
0.9955 0 0 0.9955 185.88 296.28 Tm
/F4 10 Tf
0.0252 Tc 0.3449 Tw ( command can be used with the ) Tj
ET
BT
336.6 296.28 TD
/F5 9 Tf
0 Tc 0 Tw (regsub) Tj
ET
BT
0.9955 0 0 0.9955 369 296.28 Tm
/F4 10 Tf
0.0243 Tc 0.3286 Tw ( command to do efficient,) Tj
-256.1634 -12.0547 TD 0.0069 Tc 0.8282 Tw (two-step string processing. In the first step, ) Tj
ET
BT
323.52 284.28 TD
/F5 9 Tf
0 Tc 0 Tw (regsub) Tj
ET
BT
0.9955 0 0 0.9955 355.92 284.28 Tm
/F4 10 Tf
0.0075 Tc 0.8678 Tw ( is used to rewrite an input) Tj
-243.0237 -12.0547 TD 0.0054 Tc 0.0188 Tw (string into data with embedded Tcl commands. In the second step, ) Tj
ET
BT
422.52 272.28 TD
/F5 9 Tf
0 Tc 0 Tw (subst) Tj
ET
BT
0.9955 0 0 0.9955 449.4 272.28 Tm
/F4 10 Tf
0.0395 Tc -0.0483 Tw ( or ) Tj
ET
BT
464.4 272.28 TD
/F5 9 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 114 260.28 Tm
/F4 10 Tf
0.015 Tc 0.579 Tw (replaces the Tcl commands with their result. By artfully mapping the data into) Tj
0 -12.0547 TD 0.0119 Tc 1.7876 Tw (Tcl commands, you can dynamically construct a Tcl script that processes the) Tj
T* 0.0182 Tc 0.6963 Tw (data. The processing is efficient because the Tcl parser and the regular expres-) Tj
T* 0.0157 Tc -0.2455 Tw (sion processor have been highly tuned. Chapter 11 has several examples that use) Tj
T* -0.0015 Tc -0.0072 Tw (this technique.) Tj
ET
endstream
endobj
71 0 obj
6955
endobj
69 0 obj
<<
/Type /Page
/Parent 66 0 R
/Resources <<
/Font 72 0 R
/ProcSet 2 0 R
>>
/Contents 70 0 R
>>
endobj
72 0 obj
<<
/F0 6 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
/F8 29 0 R
/F9 32 0 R
>>
endobj
74 0 obj
<<
/Length 75 0 R
>>
stream
BT
465.96 110.16 TD
0 0 0 rg
/F0 9 Tf
-0.004 Tc 0 Tw (133) Tj
-142.8 563.76 TD 10.9826 Tc (CHAPTER) Tj
ET
108.48 660.48 0.48 0.96 re f
482.04 660.48 0.48 0.96 re f
108.96 660.48 373.08 0.96 re f
108.48 701.52 0.48 0.96 re f
480.96 701.52 0.48 0.96 re f
108.96 701.52 372 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
553.8 746.76 0.24 0.48 re f
584.04 746.76 0.24 0.48 re f
554.04 746.76 30 0.48 re f
582 80.76 0.24 0.48 re f
552.72 80.76 0.24 0.48 re f
552.96 80.76 29.04 0.48 re f
547.8 75 0.48 0.24 re f
547.8 34.8 0.48 0.24 re f
547.8 35.04 0.48 39.96 re f
510 504 54 108 re f
510 611.76 54.24 0.48 re f
563.76 503.76 0.48 108.24 re f
509.76 503.76 54.24 0.48 re f
509.76 504 0.48 108.24 re f
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 605.52 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 602.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 598.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (.) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 595.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 592.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (A) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 583.2 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 575.28 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (v) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 568.56 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (a) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 560.64 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (n) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 553.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 545.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (e) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 538.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 530.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 526.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (T) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 521.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 514.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (l) Tj
ET
Q
1 1 1 rg
455.04 668.04 27 22.92 re f
BT
456.96 675 TD
0 0 0 rg
/F0 24 Tf
-0.864 Tc -5.688 Tw ( 11) Tj
ET
BT
1 0 0 1 108.96 603 Tm
/F3 18 Tf
-0.0026 Tc -0.0032 Tw (Regular Expressions) Tj
ET
BT
404.04 603 TD
1 1 1 rg
/F6 18 Tf
-0.54 Tc 0 Tw (11) Tj
-295.08 -39 TD 0 0 0 rg
/F0 9 Tf
-0.0059 Tc 4.2239 Tw (This chapter describes regular expression pattern matching and string) Tj
24 -11.04 TD -0.0068 Tc 1.6191 Tw (processing based on regular expression substitutions. These features) Tj
0 -10.92 TD -0.0052 Tc 4.5832 Tw (provide the most powerful string processing facilities in ) Tj
-0.2348 Tc 4.8127 Tw (Tcl. ) Tj
-1.059 Tc 0 Tw (T) Tj
-0.009 Tc (cl) Tj
0 -11.04 TD -0.0063 Tc 0.0243 Tw (commands described are: ) Tj
105.96 0 TD /F5 9 Tf
-0.02 Tc 0 Tw (regexp) Tj
32.28 0 TD /F0 9 Tf
-0.004 Tc 0.022 Tw ( and ) Tj
20.04 0 TD /F5 9 Tf
-0.02 Tc 0 Tw (regsub) Tj
32.4 0 TD /F0 9 Tf
0.018 Tc (.) Tj
ET
BT
1.001 0 0 1.001 276.96 403.08 Tm
/F7 24 Tf
-0.0237 Tc (R) Tj
ET
BT
0.9955 0 0 0.9955 294.72 403.08 Tm
/F4 10 Tf
0.0176 Tc 1.2996 Tw (egular expressions are a formal way to) Tj
-186.6075 -12.0547 TD 0.0095 Tc 1.4832 Tw (describe string patterns. They provide a powerful and compact way to specify) Tj
0 -12.0547 TD 0.013 Tc -0.1664 Tw (patterns in your data. Even bette) Tj
-0.9461 Tc 0 Tw (r) Tj
0.0225 Tc -0.2271 Tw (, there is a very efficient implementation of the) Tj
T* 0.0204 Tc 1.0156 Tw (regular expression mechanism due to Henry Spence) Tj
-0.9461 Tc 0 Tw (r) Tj
0.0149 Tc 1.0371 Tw (. If your script does much) Tj
T* 0.0125 Tc -0.0212 Tw (string processing, it is worth the effort to learn about the ) Tj
ET
BT
374.16 355.08 TD
/F5 9 Tf
0 Tc 0 Tw (regexp) Tj
ET
BT
0.9955 0 0 0.9955 406.56 355.08 Tm
/F4 10 Tf
0.008 Tc -0.0167 Tw ( command. ) Tj
-0.2254 Tc 0 Tw (Your) Tj
-298.9578 -12.0547 TD 0.0113 Tc 1.3763 Tw (Tcl scripts will be compact and efficient. This chapter uses many examples to) Tj
0 -12.0547 TD 0.0089 Tc 0.0226 Tw (show you the features of regular expressions.) Tj
24.1095 -12.0547 TD 0.0162 Tc 2.0485 Tw (Regular expression substitution is a mechanism that lets you rewrite a) Tj
-24.1095 -12.0547 TD 0.0062 Tc 1.1734 Tw (string based on regular expression matching. The ) Tj
ET
BT
348.36 307.08 TD
/F5 9 Tf
0 Tc 0 Tw (regsub) Tj
ET
BT
0.9955 0 0 0.9955 380.76 307.08 Tm
/F4 10 Tf
0.0177 Tc 1.1388 Tw ( command is another) Tj
-273.04 -12.0547 TD 0.02 Tc -0.0805 Tw (powerful tool, and this chapter includes several examples that do a lot of work in) Tj
0 -12.0547 TD 0.0106 Tc 0.9914 Tw (just a few Tcl commands. Stephen Uhler has shown me several ways to trans-) Tj
T* 0.0176 Tc 0.1846 Tw (form input data into a Tcl script with ) Tj
ET
BT
285.24 271.08 TD
/F5 9 Tf
0 Tc 0 Tw (regsub) Tj
ET
BT
0.9955 0 0 0.9955 317.64 271.08 Tm
/F4 10 Tf
0.0203 Tc 0.1819 Tw ( and then use ) Tj
ET
BT
383.76 271.08 TD
/F5 9 Tf
-0.024 Tc 0 Tw (subst) Tj
ET
BT
0.9955 0 0 0.9955 410.76 271.08 Tm
/F4 10 Tf
0.0395 Tc 0.1928 Tw ( or ) Tj
ET
BT
426.12 271.08 TD
/F5 9 Tf
-0.03 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 447.72 271.08 Tm
/F4 10 Tf
0.0121 Tc 0.2203 Tw ( to pro-) Tj
-340.3055 -12.0547 TD 0.018 Tc 1.3219 Tw (cess the data. The idea takes a moment to get used to, but it provides a very) Tj
0 -12.0547 TD -0.0046 Tc 0.0261 Tw (efficient way to process strings.) Tj
24.1095 -12.0547 TD 0.0186 Tc 0.2861 Tw (Tcl 8.1 added a new regular expression implementation that supports Uni-) Tj
-24.1095 -12.0547 TD 0.0178 Tc 1.1187 Tw (code and ) Tj
45.5669 0 TD /F7 10 Tf
0.017 Tc 1.0592 Tw (advanced regular expressions) Tj
137.9063 0 TD /F4 10 Tf
0.0209 Tc 1.0794 Tw ( \(ARE\). This implementation adds more) Tj
-183.4733 -12.0547 TD 0.0145 Tc 1.3213 Tw (syntax and escapes that makes it easier to write patterns, once you learn the) Tj
0 -12.0547 TD 0.0115 Tc 1.4264 Tw (new features! If you know Perl, then you are already familiar with these fea-) Tj
T* 0.0093 Tc 1.1875 Tw (tures. The Tcl advanced regular expressions are almost identical to the Perl 5) Tj
T* 0.0104 Tc -0.1035 Tw (regular expressions. The new features include a few very minor incompatibilities) Tj
T* 0.0159 Tc -0.2657 Tw (with the regular expressions implemented in earlier versions of Tcl 8.0, but these) Tj
T* 0.0144 Tc 0.5555 Tw (rarely occur in practice. The new regular expression package supports Unicode,) Tj
T* 0.0079 Tc 0.0136 Tw (of course, so you can write patterns to match Japanese or Hindu documents!) Tj
ET
endstream
endobj
75 0 obj
7219
endobj
73 0 obj
<<
/Type /Page
/Parent 66 0 R
/Resources <<
/Font 76 0 R
/ProcSet 2 0 R
>>
/Contents 74 0 R
>>
endobj
76 0 obj
<<
/F0 6 0 R
/F2 8 0 R
/F3 12 0 R
/F4 14 0 R
/F5 16 0 R
/F6 24 0 R
/F7 25 0 R
>>
endobj
78 0 obj
<<
/Length 79 0 R
>>
stream
BT
114 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0365 Tc -0.0782 Tw (134 ) Tj
256.92 0 TD 0.03 Tc 0.0483 Tw (Regular Expressions) Tj
73.8 0 TD 0.0261 Tc 0.0282 Tw ( Chap. 11) Tj
ET
113.52 701.88 0.48 0.96 re f
486 701.88 0.48 0.96 re f
114 701.88 372 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
554.76 746.76 0.24 0.48 re f
584.04 746.76 0.24 0.48 re f
555 746.76 29.04 0.48 re f
585 80.76 0.24 0.48 re f
553.8 80.76 0.24 0.48 re f
554.04 80.76 30.96 0.48 re f
548.76 69.96 0.48 0.24 re f
548.76 33.72 0.48 0.24 re f
548.76 33.96 0.48 36 re f
BT
0.997 0 0 0.997 114 668.4 Tm
/F2 13 Tf
0.2816 Tc -0.0406 Tw (When to Use Regular Expressions) Tj
ET
BT
0.9955 0 0 0.9955 114 647.4 Tm
/F4 10 Tf
0.0164 Tc 0.4899 Tw (Regular expressions can seem overly complex at first. They introduce their own) Tj
0 -12.0547 TD 0.0122 Tc 0.7117 Tw (syntax and their own rules, and you may be tempted to use simpler commands) Tj
T* 0 Tc 0.594 Tw (like ) Tj
ET
BT
134.52 623.4 TD
/F5 9 Tf
-0.02 Tc 0 Tw (string) Tj
ET
BT
0.9955 0 0 0.9955 166.8 623.4 Tm
/F4 10 Tf
0 Tc -0.0087 Tw ( ) Tj
ET
BT
170.16 623.4 TD
/F5 9 Tf
0 Tw (first) Tj
ET
BT
0.9955 0 0 0.9955 197.04 623.4 Tm
/F4 10 Tf
-0.0087 Tc 0.4822 Tw (, ) Tj
ET
BT
203.16 623.4 TD
/F5 9 Tf
0 Tc 0 Tw (string) Tj
ET
BT
0.9955 0 0 0.9955 235.44 623.4 Tm
/F4 10 Tf
-0.0087 Tw ( ) Tj
ET
BT
238.68 623.4 TD
/F5 9 Tf
-0.024 Tc 0 Tw (range) Tj
ET
BT
0.9955 0 0 0.9955 265.56 623.4 Tm
/F4 10 Tf
0.0234 Tc 0.45 Tw (, or ) Tj
ET
BT
284.28 623.4 TD
/F5 9 Tf
-0.02 Tc 0 Tw (string) Tj
ET
BT
0.9955 0 0 0.9955 316.68 623.4 Tm
/F4 10 Tf
0 Tc -0.0087 Tw ( ) Tj
ET
BT
319.92 623.4 TD
/F5 9 Tf
-0.024 Tc 0 Tw (match) Tj
ET
BT
0.9955 0 0 0.9955 346.8 623.4 Tm
/F4 10 Tf
0.0054 Tc 0.5163 Tw ( to process your strings. How-) Tj
-233.8621 -12.0547 TD 0.0177 Tc 0 Tw (eve) Tj
-1.0667 Tc (r) Tj
0.018 Tc 0.8071 Tw (, often a single regular expression command can replace a sequence of sev-) Tj
0 -12.0547 TD 0.0111 Tc 1.4267 Tw (eral ) Tj
ET
BT
136.44 599.4 TD
/F5 9 Tf
0 Tc 0 Tw (string) Tj
ET
BT
0.9955 0 0 0.9955 168.72 599.4 Tm
/F4 10 Tf
0.0145 Tc 1.4716 Tw ( commands. Any time you can replace several Tcl commands with) Tj
-54.9697 -12.0547 TD 0.0133 Tc 1.0227 Tw (one, you get a performance improvement. Furthermore, the regular expression) Tj
0 -12.0547 TD 0.0064 Tc 0.0397 Tw (matcher is implemented in optimized C code, so pattern matching is fast.) Tj
24.1095 -12.0547 TD 0.0206 Tc 1.3569 Tw (The regular expression matcher does more than test for a match. It also) Tj
-24.1095 -12.0547 TD 0.0164 Tc 0.8446 Tw (tells you what part of your input string matches the pattern. This is useful for) Tj
0 -12.1753 TD 0.0137 Tc 0.058 Tw (picking data out of a large input string. In fact, you can capture several pieces of) Tj
0 -12.0547 TD 0.0102 Tc -0.1261 Tw (data in just one match by using subexpressions. The ) Tj
ET
BT
356.88 527.28 TD
/F5 9 Tf
0 Tc 0 Tw (regexp) Tj
ET
BT
0.9955 0 0 0.9955 389.28 527.28 Tm
/F4 10 Tf
0.0176 Tc -0.1469 Tw ( Tcl command makes) Tj
-276.5359 -12.0547 TD 0.0137 Tc 1.2387 Tw (this easy by assigning the matching data to Tcl variables. If you find yourself) Tj
0 -12.0547 TD 0.0108 Tc 0.9449 Tw (using ) Tj
ET
BT
143.16 503.28 TD
/F5 9 Tf
0 Tc 0 Tw (string) Tj
ET
BT
0.9955 0 0 0.9955 175.44 503.28 Tm
/F4 10 Tf
-0.0087 Tw ( ) Tj
ET
BT
179.16 503.28 TD
/F5 9 Tf
0 Tw (first) Tj
ET
BT
0.9955 0 0 0.9955 206.16 503.28 Tm
/F4 10 Tf
0.0205 Tc 0.9954 Tw ( and ) Tj
ET
BT
231.12 503.28 TD
/F5 9 Tf
-0.02 Tc 0 Tw (string) Tj
ET
BT
0.9955 0 0 0.9955 263.4 503.28 Tm
/F4 10 Tf
0 Tc -0.0087 Tw ( ) Tj
ET
BT
267.24 503.28 TD
/F5 9 Tf
0 Tw (range) Tj
ET
BT
0.9955 0 0 0.9955 294.12 503.28 Tm
/F4 10 Tf
0.0245 Tc 0.931 Tw ( to pick out data, remember that ) Tj
ET
BT
453.6 503.28 TD
/F5 9 Tf
0 Tc 0 Tw (regexp) Tj
ET
BT
0.9955 0 0 0.9955 114 491.28 Tm
/F4 10 Tf
0.0172 Tc -0.0059 Tw (can do it in one step instead.) Tj
24.1095 -12.0547 TD 0.0184 Tc -0.2463 Tw (The regular expression matcher is structured so that patterns are first com-) Tj
-24.1095 -12.0547 TD 0.0161 Tc 1.4459 Tw (piled into an form that is efficient to match. If you use the same pattern fre-) Tj
0 -12.0547 TD 0.0104 Tc 0 Tw (quentl) Tj
-1.2738 Tc (y) Tj
0.0135 Tc 1.4244 Tw (, then the expensive compilation phase is done only once, and all your) Tj
T* 0.0142 Tc 0.2583 Tw (matching uses the efficient form. These details are completely hidden by the Tcl) Tj
T* 0.0074 Tc -0.1688 Tw (interface. If you use a pattern twice, Tcl will nearly always be able to retrieve the) Tj
T* 0.01 Tc 0.5376 Tw (compiled form of the pattern. As you can see, the regular expression matcher is) Tj
T* 0.0108 Tc -0.0195 Tw (optimized for lots of heavy-duty string processing. ) Tj
24.1095 -30.1369 TD /F2 10 Tf
-0.0094 Tc 0.021 Tw (Avoiding a Common Problem) Tj
0 -18.0821 TD /F7 10 Tf
-0.0061 Tc 0.0457 Tw (Group your patterns with curly braces.) Tj
0 -13.0191 TD /F4 10 Tf
0.0144 Tc 0.1375 Tw (One of the stumbling blocks with regular expressions is that they use some) Tj
-24.1095 -12.0547 TD 0.0095 Tc 0.3032 Tw (of the same special characters as Tcl. Any pattern that contains brackets, dollar) Tj
0 -12.0547 TD 0.0124 Tc -0.0292 Tw (signs, or spaces must be quoted when used in a Tcl command. In many cases you) Tj
T* 0.0152 Tc -0.1444 Tw (can group the regular expression with curly braces, so Tcl pays no attention to it.) Tj
T* 0.025 Tc 0 Tw (Howeve) Tj
-1.0667 Tc (r) Tj
0.0133 Tc -0.2459 Tw (, when using Tcl 8.0 \(or earlier\) you may need Tcl to do backslash substi-) Tj
T* 0.0152 Tc -0.0963 Tw (tutions on part of the pattern, and then you need to worry about quoting the spe-) Tj
T* 0.0088 Tc 0.0427 Tw (cial characters in the regular expression. ) Tj
24.1095 -12.0547 TD 0.0169 Tc 2.0753 Tw (Advanced regular expressions eliminate this problem because backslash) Tj
-24.1095 -12.0547 TD 0.0143 Tc 0.6199 Tw (substitution is now done by the regular expression engine. Previousl) Tj
-1.2738 Tc 0 Tw (y) Tj
0.0161 Tc 0.6181 Tw (, to get ) Tj
ET
BT
475.2 250.32 TD
/F5 9 Tf
0 Tc 0 Tw (\\n) Tj
ET
BT
0.9955 0 0 0.9955 114 238.32 Tm
/F4 10 Tf
0.0137 Tc 0.4597 Tw (to mean the newline character \(or ) Tj
ET
BT
275.76 238.32 TD
/F5 9 Tf
0 Tc 0 Tw (\\t) Tj
ET
BT
0.9955 0 0 0.9955 286.44 238.32 Tm
/F4 10 Tf
0.0176 Tc 0.4558 Tw ( for tab\) you had to let Tcl do the substitu-) Tj
-173.2267 -12.0547 TD -0 Tc 0.4738 Tw (tion. With Tcl 8.1, ) Tj
ET
BT
201.48 226.32 TD
/F5 9 Tf
0 Tc 0 Tw (\\n) Tj
ET
BT
0.9955 0 0 0.9955 212.28 226.32 Tm
/F4 10 Tf
0.0205 Tc 0.3927 Tw ( and ) Tj
ET
BT
236.16 226.32 TD
/F5 9 Tf
0 Tc 0 Tw (\\t) Tj
ET
BT
0.9955 0 0 0.9955 246.84 226.32 Tm
/F4 10 Tf
0.0137 Tc 0.4597 Tw ( inside a regular expression mean newline and tab.) Tj
-133.4461 -12.0547 TD 0.0153 Tc 0.4667 Tw (In fact, there are now about 20 backslash escapes you can use in patterns. Now) Tj
0 -12.0547 TD 0.0216 Tc -0.0304 Tw (more than eve) Tj
-0.9461 Tc 0 Tw (r) Tj
0.0097 Tc 0.0254 Tw (, remember to group your patterns with curly braces to avoid con-) Tj
T* 0.0126 Tc -0.0041 Tw (flicts between Tcl and the regular expression engine.) Tj
24.1095 -12.0547 TD 0.016 Tc 0.6684 Tw (The patterns in the first sections of this Chapter ignore this problem. The) Tj
-24.1095 -12.0547 TD 0.0118 Tc 1.8681 Tw (sample expressions in ) Tj
0.0026 Tc 1.8572 Tw (Table 11\2267 on page 151 are quoted for use within Tcl) Tj
0 -12.0547 TD 0.0113 Tc -0.0015 Tw (scripts. Most are quoted simply by putting the whole pattern in braces, but some) Tj
T* 0.0204 Tc -0.0292 Tw (are shown without braces for comparison.) Tj
ET
1 1 1 rg
72.12 330.12 35.76 35.64 re f
90 364.08 m
74.04 348.12 l
90 332.04 l
105.96 348.12 l
90 364.08 l
f*
0 0 0 rg
90.24 363.84 m
74.28 347.88 l
73.92 347.88 l
74.28 348.24 l
90.24 332.16 l
90.24 331.8 l
89.88 332.16 l
105.84 348.24 l
106.2 348.24 l
106.32 348.12 l
106.2 347.88 l
90.24 331.8 l
90 331.56 l
89.88 331.8 l
73.92 347.88 l
73.68 348.12 l
73.92 348.24 l
89.88 364.2 l
90.24 363.84 l
f
105.84 347.88 m
89.88 363.84 l
89.88 364.2 l
90.12 364.44 l
90.24 364.2 l
106.2 348.24 l
105.84 347.88 l
f
0.302 0.302 0.302 rg
90 332.04 m
74.04 348.12 l
90 348.12 l
90 332.04 l
f*
0 0 0 rg
89.88 331.8 m
73.92 347.88 l
73.44 348.36 l
74.04 348.36 l
74.28 348.24 l
90.24 332.16 l
89.88 331.8 l
f
74.04 347.88 16.2 0.48 re f
90.24 348.12 m
90.24 331.44 l
89.88 331.8 l
89.76 332.04 l
89.76 348.12 l
90.24 348.12 l
f
0.102 0.102 0.102 rg
90 332.04 m
105.96 348.12 l
90 348.12 l
90 332.04 l
f*
0 0 0 rg
89.88 332.16 m
105.84 348.24 l
105.96 348.36 l
106.68 348.36 l
106.2 347.88 l
90.24 331.8 l
89.88 332.16 l
f
89.76 347.88 16.2 0.48 re f
90.24 348.12 m
90.24 331.8 l
89.76 331.32 l
89.76 348.12 l
90.24 348.12 l
f
0.702 0.702 0.702 rg
90 364.08 m
105.96 348.12 l
90 348.12 l
90 364.08 l
f*
0 0 0 rg
90.24 364.2 m
106.56 347.88 l
105.84 347.88 l
89.88 363.84 l
90.24 364.2 l
f
89.76 347.88 16.2 0.48 re f
89.76 348.12 m
89.76 364.68 l
90.24 364.2 l
90.24 348.12 l
89.76 348.12 l
f
0.9686 0.9686 0.9686 rg
90 364.08 m
74.04 348.12 l
90 348.12 l
90 364.08 l
f*
0 0 0 rg
90.24 363.84 m
74.28 347.88 l
73.56 347.88 l
89.88 364.2 l
90.24 363.84 l
f
74.04 347.88 16.2 0.48 re f
89.76 348.12 m
89.76 364.08 l
90.24 364.56 l
90.24 348.12 l
89.76 348.12 l
f
0.502 0.502 0.502 rg
90 355.08 m
83.04 348.12 l
90 341.04 l
96.96 348.12 l
90 355.08 l
f*
0.102 0.102 0.102 rg
90.24 354.84 m
83.28 347.88 l
82.92 347.88 l
83.28 348.24 l
90.24 341.16 l
90.24 340.8 l
89.88 341.16 l
96.84 348.24 l
97.2 348.24 l
97.32 348.12 l
97.2 347.88 l
90.24 340.8 l
90 340.56 l
89.88 340.8 l
82.92 347.88 l
82.68 348.12 l
82.92 348.24 l
89.88 355.2 l
90.24 354.84 l
f
96.84 347.88 m
89.88 354.84 l
89.88 355.2 l
90.12 355.44 l
90.24 355.2 l
97.2 348.24 l
96.84 347.88 l
f
endstream
endobj
79 0 obj
10295
endobj
77 0 obj
<<
/Type /Page
/Parent 66 0 R
/Resources <<
/Font <<
/F0 6 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
/F7 25 0 R
>>
/ProcSet 2 0 R
>>
/Contents 78 0 R
>>
endobj
81 0 obj
<<
/Length 82 0 R
>>
stream
BT
108.96 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0351 Tc 0.0431 Tw (Regular Expression Syntax) Tj
356.76 0 TD 0.0765 Tc 0 Tw (135) Tj
ET
108.48 701.88 0.48 0.96 re f
480.72 701.88 0.48 0.96 re f
108.96 701.88 371.76 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
553.8 746.76 0.24 0.48 re f
585 746.76 0.24 0.48 re f
554.04 746.76 30.96 0.48 re f
585 80.76 0.24 0.48 re f
554.76 80.76 0.24 0.48 re f
555 80.76 30 0.48 re f
547.8 75 0.48 0.24 re f
547.8 34.8 0.48 0.24 re f
547.8 35.04 0.48 39.96 re f
510 504 54 108 re f
510 611.76 54.24 0.48 re f
563.76 503.76 0.48 108.24 re f
509.76 503.76 54.24 0.48 re f
509.76 504 0.48 108.24 re f
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 605.52 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 602.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 598.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (.) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 595.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 592.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (A) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 583.2 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 575.28 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (v) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 568.56 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (a) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 560.64 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (n) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 553.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 545.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (e) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 538.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 530.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 526.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (T) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 521.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 514.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (l) Tj
ET
Q
BT
0.997 0 0 0.997 108.96 668.4 Tm
/F2 13 Tf
0.2833 Tc -0.0122 Tw (Regular Expression Syntax) Tj
ET
BT
0.9955 0 0 0.9955 108.96 647.4 Tm
/F4 10 Tf
0.0141 Tc 0.0977 Tw (This section describes the basics of regular expression patterns, which are found) Tj
0 -12.0547 TD 0.0111 Tc 2.6925 Tw (in all versions of Tcl. There are occasional references to features added by) Tj
T* 0.017 Tc 1.3112 Tw (advanced regular expressions, but they are covered in more detail starting on) Tj
T* 0.0152 Tc 2.1258 Tw (page 138. There is enough syntax in regular expressions that there are five) Tj
T* 0.015 Tc 0.6776 Tw (tables that summarize all the options. These tables appear together starting at) Tj
T* 0.0249 Tc -0.0337 Tw (page 145. ) Tj
24.1095 -12.0547 TD 0.018 Tc -0.0134 Tw (A regular expression is a sequence of the following items:) Tj
-15.6712 -20.1314 TD /F3 10 Tf
-0.0354 Tc 0 Tw (\225) Tj
13.2602 0 TD /F4 10 Tf
0.0117 Tc 0.0398 Tw (A literal characte) Tj
-1.0667 Tc 0 Tw (r) Tj
-0.0087 Tc (.) Tj
-13.2602 -13.1397 TD /F3 10 Tf
-0.0354 Tc (\225) Tj
13.2602 0 TD /F4 10 Tf
0.0112 Tc -0.0199 Tw (A matching characte) Tj
-0.9461 Tc 0 Tw (r) Tj
0.0035 Tc -0.0122 Tw (, character set, or character class.) Tj
-13.2602 -13.0191 TD /F3 10 Tf
-0.0354 Tc 0 Tw (\225) Tj
13.2602 0 TD /F4 10 Tf
0.0189 Tc -0.0277 Tw (A repetition quantifie) Tj
-0.9461 Tc 0 Tw (r) Tj
-0.0087 Tc (.) Tj
-13.2602 -13.0191 TD /F3 10 Tf
-0.0354 Tc (\225) Tj
13.2602 0 TD /F4 10 Tf
0.0068 Tc -0.0155 Tw (An alternation clause.) Tj
-13.2602 -13.1397 TD /F3 10 Tf
-0.0354 Tc 0 Tw (\225) Tj
13.2602 0 TD /F4 10 Tf
0.0126 Tc -0.0213 Tw (A subpattern grouped with parentheses.) Tj
2.4109 -30.1369 TD /F2 10 Tf
0.016 Tc 0.0758 Tw (Matching Characters) Tj
0 -18.0821 TD /F4 10 Tf
0.0116 Tc 0.9592 Tw (Most characters simply match themselves. The following pattern matches) Tj
-24.1095 -12.0547 TD 0.0089 Tc -0.0176 Tw (an ) Tj
ET
BT
123.48 443.28 TD
/F5 9 Tf
0 Tc 0 Tw (a) Tj
ET
BT
0.9955 0 0 0.9955 128.88 443.28 Tm
/F4 10 Tf
0.0168 Tc 0.0046 Tw ( followed by a ) Tj
ET
BT
194.52 443.28 TD
/F5 9 Tf
0 Tc 0 Tw (b) Tj
ET
BT
0.9955 0 0 0.9955 199.92 443.28 Tm
/F4 10 Tf
-0.0087 Tc (:) Tj
ET
BT
144.96 429.96 TD
/F5 9 Tf
0 Tc (ab) Tj
ET
BT
0.9955 0 0 0.9955 132.96 416.28 Tm
/F4 10 Tf
0.0086 Tc 1.2914 Tw (The general wild-card character is the period, ) Tj
ET
BT
355.2 416.28 TD
/F5 9 Tf
-0.04 Tc 0 Tw (\223.\224) Tj
ET
BT
0.9955 0 0 0.9955 371.4 416.28 Tm
/F4 10 Tf
0.0081 Tc 1.2791 Tw (. It matches any single) Tj
-263.6374 -12.0547 TD 0.0102 Tc 0 Tw (characte) Tj
-0.9461 Tc (r) Tj
0.0105 Tc 0.021 Tw (. The following pattern matches an ) Tj
ET
BT
315.72 404.28 TD
/F5 9 Tf
0 Tc 0 Tw (a) Tj
ET
BT
0.9955 0 0 0.9955 321.12 404.28 Tm
/F4 10 Tf
0.0158 Tc -0.0245 Tw ( followed by any character:) Tj
ET
BT
144.96 390.96 TD
/F5 9 Tf
0 Tc 0 Tw (a.) Tj
ET
BT
0.9955 0 0 0.9955 132.96 377.28 Tm
/F4 10 Tf
0.017 Tc -0.2668 Tw (Remember that matches can occur anywhere within a string; a pattern does) Tj
-24.1095 -12.0547 TD 0.0046 Tc -0.0994 Tw (not have to match the whole string. ) Tj
-0.0191 Tc -0.0755 Tw (You can change that by using anchors, which) Tj
0 -12.0547 TD 0.0235 Tc -0.0322 Tw (are described on page 137. ) Tj
24.1095 -30.1369 TD /F2 10 Tf
0.0185 Tc -0.0472 Tw (Character Sets) Tj
0 -18.0821 TD /F4 10 Tf
0.0148 Tc 1.4833 Tw (The matching character can be restricted to a set of characters with the) Tj
ET
BT
108.96 293.28 TD
/F5 9 Tf
0 Tc 0 Tw ([) Tj
5.4 0 TD /F9 9 Tf
(xyz) Tj
16.2 0 TD /F5 9 Tf
(]) Tj
ET
BT
0.9955 0 0 0.9955 135.96 293.28 Tm
/F4 10 Tf
0.0199 Tc 2.1613 Tw ( syntax. Any of the characters between the two brackets is allowed to) Tj
-27.1232 -12.0547 TD 0.0033 Tc -0.012 Tw (match. ) Tj
-0.0036 Tc 0.0151 Tw (For example, the following matches either ) Tj
ET
BT
339.84 281.28 TD
/F5 9 Tf
0 Tc 0 Tw (Hello) Tj
ET
BT
0.9955 0 0 0.9955 366.84 281.28 Tm
/F4 10 Tf
0.0395 Tc -0.0483 Tw ( or ) Tj
ET
BT
381.84 281.28 TD
/F5 9 Tf
0 Tc 0 Tw (hello) Tj
ET
BT
0.9955 0 0 0.9955 408.84 281.28 Tm
/F4 10 Tf
-0.0087 Tc (:) Tj
ET
BT
144.96 267.96 TD
/F5 9 Tf
0 Tc ([Hh]ello) Tj
ET
BT
0.9955 0 0 0.9955 132.96 254.28 Tm
/F4 10 Tf
0.02 Tc -0.2182 Tw (The matching set can be specified as a range over the character set with the) Tj
ET
BT
108.96 242.28 TD
/F5 9 Tf
0 Tc 0 Tw ([) Tj
5.4 0 TD /F9 9 Tf
(x-y) Tj
16.2 0 TD /F5 9 Tf
(]) Tj
ET
BT
0.9955 0 0 0.9955 135.96 242.28 Tm
/F4 10 Tf
0.02 Tc -0.0288 Tw ( syntax. The following matches any digit:) Tj
ET
BT
144.96 228.96 TD
/F5 9 Tf
0 Tc 0 Tw ([0-9]) Tj
ET
BT
0.9955 0 0 0.9955 132.96 215.28 Tm
/F4 10 Tf
0.0148 Tc 1.5435 Tw (There is also the ability to specify the complement of a set. That is, the) Tj
-24.1095 -12.0547 TD 0.013 Tc 0.8314 Tw (matching character can be anything except what is in the set. This is achieved) Tj
0 -12.0547 TD 0.0139 Tc 0.339 Tw (with the) Tj
ET
BT
147.96 191.28 TD
/F5 9 Tf
0 Tc 0.48 Tw ( [^) Tj
16.68 0 TD /F9 9 Tf
0 Tw (xyz) Tj
16.2 0 TD /F5 9 Tf
(]) Tj
ET
BT
0.9955 0 0 0.9955 186.24 191.28 Tm
/F4 10 Tf
0.0166 Tc 0.2693 Tw ( syntax. Ranges and complements can be combined. The follow-) Tj
-77.6326 -12.0547 TD 0.0172 Tc -0.0109 Tw (ing matches anything except the uppercase and lowercase letters:) Tj
ET
BT
144.96 165.96 TD
/F5 9 Tf
0 Tc 0 Tw ([^a-zA-Z]) Tj
ET
BT
0.9955 0 0 0.9955 132.96 152.28 Tm
/F7 10 Tf
0.0051 Tc 0.0103 Tw (Using special characters in character set) Tj
-0.5845 Tc 0 Tw (s) Tj
0.1119 Tc (.) Tj
0 -13.0191 TD /F4 10 Tf
0.0116 Tc 1.0646 Tw (If you want a ) Tj
ET
BT
201 139.32 TD
/F5 9 Tf
0 Tc 0 Tw (]) Tj
ET
BT
0.9955 0 0 0.9955 206.4 139.32 Tm
/F4 10 Tf
0.0164 Tc 1.0598 Tw ( in your character set, put it immediately after the initial) Tj
ET
1 1 1 rg
487.2 128.16 35.64 35.64 re f
504.96 162.12 m
489 146.16 l
504.96 130.08 l
521.04 146.16 l
504.96 162.12 l
f*
0 0 0 rg
505.2 161.88 m
489.24 145.92 l
488.88 145.92 l
489.24 146.28 l
505.2 130.2 l
505.2 129.84 l
504.84 130.2 l
520.92 146.28 l
521.28 146.28 l
521.4 146.16 l
521.28 145.92 l
504.96 129.6 l
504.84 129.84 l
488.88 145.92 l
488.64 146.16 l
488.88 146.28 l
504.84 162.24 l
505.2 161.88 l
f
520.92 145.92 m
504.84 161.88 l
504.84 162.24 l
504.96 162.36 l
505.2 162.24 l
521.28 146.28 l
520.92 145.92 l
f
0.302 0.302 0.302 rg
504.96 130.08 m
489 146.16 l
504.96 146.16 l
504.96 130.08 l
f*
0 0 0 rg
504.84 129.84 m
488.88 145.92 l
488.4 146.4 l
489 146.4 l
489.24 146.28 l
505.2 130.2 l
504.84 129.84 l
f
489 145.92 16.2 0.48 re f
505.2 146.16 m
505.2 129.48 l
504.84 129.84 l
504.72 130.08 l
504.72 146.16 l
505.2 146.16 l
f
0.102 0.102 0.102 rg
504.96 130.08 m
521.04 146.16 l
504.96 146.16 l
504.96 130.08 l
f*
0 0 0 rg
504.84 130.2 m
521.04 146.4 l
521.76 146.4 l
505.2 129.84 l
504.84 130.2 l
f
504.72 145.92 16.32 0.48 re f
505.2 146.16 m
505.2 129.84 l
504.72 129.36 l
504.72 146.16 l
505.2 146.16 l
f
0.702 0.702 0.702 rg
504.96 162.12 m
521.04 146.16 l
504.96 146.16 l
504.96 162.12 l
f*
0 0 0 rg
505.2 162.24 m
521.28 146.28 l
521.64 145.92 l
520.92 145.92 l
504.84 161.88 l
505.2 162.24 l
f
504.72 145.92 16.32 0.48 re f
504.72 146.16 m
504.72 162.72 l
505.2 162.24 l
505.2 146.16 l
504.72 146.16 l
f
0.9686 0.9686 0.9686 rg
504.96 162.12 m
489 146.16 l
504.96 146.16 l
504.96 162.12 l
f*
0 0 0 rg
505.2 161.88 m
489.24 145.92 l
488.52 145.92 l
504.84 162.24 l
505.2 161.88 l
f
489 145.92 16.2 0.48 re f
504.72 146.16 m
504.72 162.12 l
505.2 162.6 l
505.2 146.16 l
504.72 146.16 l
f
0.502 0.502 0.502 rg
504.96 153.12 m
498 146.16 l
504.96 139.08 l
512.04 146.16 l
504.96 153.12 l
f*
0.102 0.102 0.102 rg
505.2 152.88 m
498.24 145.92 l
497.88 145.92 l
498.24 146.28 l
505.2 139.2 l
505.2 138.84 l
504.84 139.2 l
511.92 146.28 l
512.28 146.28 l
512.4 146.16 l
512.28 145.92 l
504.96 138.6 l
504.84 138.84 l
497.88 145.92 l
497.64 146.16 l
497.88 146.28 l
504.84 153.24 l
505.2 152.88 l
f
511.92 145.92 m
504.84 152.88 l
504.84 153.24 l
504.96 153.36 l
505.2 153.24 l
512.28 146.28 l
511.92 145.92 l
f
endstream
endobj
82 0 obj
10807
endobj
80 0 obj
<<
/Type /Page
/Parent 66 0 R
/Resources <<
/Font 83 0 R
/ProcSet 2 0 R
>>
/Contents 81 0 R
>>
endobj
83 0 obj
<<
/F0 6 0 R
/F2 8 0 R
/F3 12 0 R
/F4 14 0 R
/F5 16 0 R
/F7 25 0 R
/F9 32 0 R
>>
endobj
85 0 obj
<<
/Length 86 0 R
>>
stream
BT
114 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0365 Tc -0.0782 Tw (136 ) Tj
256.92 0 TD 0.03 Tc 0.0483 Tw (Regular Expressions) Tj
73.8 0 TD 0.0261 Tc 0.0282 Tw ( Chap. 11) Tj
ET
113.52 701.88 0.48 0.96 re f
486 701.88 0.48 0.96 re f
114 701.88 372 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
554.76 746.76 0.24 0.48 re f
584.04 746.76 0.24 0.48 re f
555 746.76 29.04 0.48 re f
585 80.76 0.24 0.48 re f
553.8 80.76 0.24 0.48 re f
554.04 80.76 30.96 0.48 re f
548.76 69.96 0.48 0.24 re f
548.76 33.72 0.48 0.24 re f
548.76 33.96 0.48 36 re f
BT
0.9955 0 0 0.9955 114 670.32 Tm
/F4 10 Tf
0.0176 Tc -0.2675 Tw (opening bracket. ) Tj
-1.0158 Tc 0 Tw (Y) Tj
0.0241 Tc -0.2498 Tw (ou do not need to do anything special to include ) Tj
ET
BT
418.92 670.32 TD
/F5 9 Tf
0 Tc 0 Tw ([) Tj
ET
BT
0.9955 0 0 0.9955 424.32 670.32 Tm
/F4 10 Tf
0.0147 Tc -0.2244 Tw ( in your char-) Tj
-311.7358 -12.0547 TD 0.0182 Tc -0.027 Tw (acter set. The following matches any square brackets or curly braces:) Tj
ET
BT
150 645 TD
/F5 9 Tf
-0.02 Tc 0 Tw ([][{}]) Tj
ET
BT
0.9955 0 0 0.9955 138 631.32 Tm
/F4 10 Tf
0.0154 Tc 2.5743 Tw (Most regular expression syntax characters are no longer special inside) Tj
-24.1095 -12.0547 TD 0.0124 Tc -0.1509 Tw (character sets. This means you do not need to backslash anything inside a brack-) Tj
0 -12.0547 TD 0.0039 Tc 0.0531 Tw (eted character set except for backslash itself. The following pattern matches sev-) Tj
T* 0.0141 Tc 0.0073 Tw (eral of the syntax characters used in regular expressions:) Tj
ET
BT
150 582 TD
/F5 9 Tf
-0.01 Tc 0 Tw ([][+*?\(\)|\\\\]) Tj
ET
BT
0.9955 0 0 0.9955 138 568.32 Tm
/F4 10 Tf
0.0188 Tc 0.8163 Tw (Advanced regular expressions add names and backslash escapes as short-) Tj
-24.1095 -12.0547 TD 0.0124 Tc 0.7021 Tw (hand for common sets of characters like white space, alpha, alphanumeric, and) Tj
0 -12.0547 TD 0.0135 Tc 0.0019 Tw (more. These are described on page 139 and listed in ) Tj
-0.0153 Tc 0.0368 Tw (Table 11\2263 on page 146.) Tj
24.1095 -30.1369 TD /F2 10 Tf
0.0193 Tc 0 Tw (Quantifiers) Tj
0 -18.0821 TD /F4 10 Tf
0.0224 Tc -0.0312 Tw (Repetition is specified with ) Tj
ET
BT
266.16 496.32 TD
/F5 9 Tf
0 Tc 0 Tw (*) Tj
ET
BT
0.9955 0 0 0.9955 271.56 496.32 Tm
/F4 10 Tf
0.0012 Tc 0.0384 Tw (, for zero or more, ) Tj
ET
BT
355.68 496.32 TD
/F5 9 Tf
0 Tc 0 Tw (+) Tj
ET
BT
0.9955 0 0 0.9955 361.08 496.32 Tm
/F4 10 Tf
0.0051 Tc 0.0264 Tw (, for one or more, and ) Tj
ET
BT
462.24 496.32 TD
/F5 9 Tf
0 Tc 0 Tw (?) Tj
ET
BT
0.9955 0 0 0.9955 467.64 496.32 Tm
/F4 10 Tf
-0.0016 Tc 0.1135 Tw (, for) Tj
-355.2534 -12.0547 TD 0.0051 Tc 2.3067 Tw (zero or one. These ) Tj
95.4736 0 TD /F7 10 Tf
0.0124 Tc 0 Tw (quantifiers) Tj
50.5094 0 TD /F4 10 Tf
0.0158 Tc 2.3061 Tw ( apply to the previous item, which is either a) Tj
-145.983 -12.0547 TD 0.0037 Tc 0.7109 Tw (matching characte) Tj
-0.9461 Tc 0 Tw (r) Tj
0.015 Tc 0.6594 Tw (, a character set, or a subpattern grouped with parentheses.) Tj
0 -12.0547 TD 0.0176 Tc -0.0264 Tw (The following matches a string that contains ) Tj
ET
BT
323.16 460.32 TD
/F5 9 Tf
0 Tc 0 Tw (b) Tj
ET
BT
0.9955 0 0 0.9955 328.44 460.32 Tm
/F4 10 Tf
0.0178 Tc -0.0064 Tw ( followed by zero or more ) Tj
ET
BT
446.16 460.32 TD
/F5 9 Tf
0 Tc 0 Tw (a) Tj
ET
BT
0.9955 0 0 0.9955 451.56 460.32 Tm
/F4 10 Tf
-0.0574 Tc (\222s:) Tj
ET
BT
150 447 TD
/F5 9 Tf
0 Tc (ba*) Tj
ET
BT
0.9955 0 0 0.9955 138 433.32 Tm
/F4 10 Tf
-1.0158 Tc (Y) Tj
0.0168 Tc 0.095 Tw (ou can group part of the pattern with parentheses and then apply a quan-) Tj
-24.1095 -12.0547 TD 0.0166 Tc 0.4006 Tw (tifier to that part of the pattern. The following matches a string that has one or) Tj
0 -12.0547 TD 0.012 Tc 0.0194 Tw (more sequences of ) Tj
ET
BT
200.4 409.32 TD
/F5 9 Tf
0 Tc 0 Tw (ab) Tj
ET
BT
0.9955 0 0 0.9955 211.2 409.32 Tm
/F4 10 Tf
-0.0087 Tc (:) Tj
ET
BT
150 396 TD
/F5 9 Tf
-0.024 Tc (\(ab\)+) Tj
ET
BT
0.9955 0 0 0.9955 138 382.32 Tm
/F4 10 Tf
0.0019 Tc 0.0296 Tw (The pattern that matches anything, even the empty string, is:) Tj
ET
BT
150 369 TD
/F5 9 Tf
0 Tc 0 Tw (.*) Tj
ET
BT
0.9955 0 0 0.9955 138 355.32 Tm
/F4 10 Tf
0.0159 Tc 1 Tw (These quantifiers have a ) Tj
121.6324 0 TD /F7 10 Tf
0.0338 Tc 0 Tw (greedy) Tj
29.8958 0 TD /F4 10 Tf
0.0171 Tc 0.9988 Tw ( matching behavior: They match as many) Tj
-175.6377 -12.0547 TD 0.0076 Tc 0.9933 Tw (characters as possible. Advanced regular expressions add nongreedy matching,) Tj
0 -12.0547 TD 0.0196 Tc 1.1771 Tw (which is described on page 140. ) Tj
-0.0008 Tc 1.2127 Tw (For example, a pattern to match a single line) Tj
T* 0.017 Tc -0.0257 Tw (might look like this:) Tj
ET
BT
150 306 TD
/F5 9 Tf
0 Tc 0 Tw (.*\\n) Tj
ET
BT
0.9955 0 0 0.9955 138 292.32 Tm
/F4 10 Tf
0.025 Tc (Howeve) Tj
-1.0667 Tc (r) Tj
0.0159 Tc 0.2337 Tw (, as a greedy match, this will match all the lines in the input, end-) Tj
-24.1095 -12.0547 TD 0.0116 Tc 0.6102 Tw (ing with the last newline in the input string. The following pattern matches up) Tj
0 -12.0547 TD 0.008 Tc 0.0235 Tw (through the first newline.) Tj
ET
BT
150 255 TD
/F5 9 Tf
-0.015 Tc 0 Tw ([^\\n]*\\n) Tj
ET
BT
0.9955 0 0 0.9955 138 241.32 Tm
/F4 10 Tf
0.0082 Tc 0.5959 Tw (We will shorten this pattern even further on page 140 by using nongreedy) Tj
-24.1095 -12.0547 TD 0.0143 Tc 0.1176 Tw (quantifiers. There are also special newline sensitive modes you can turn on with) Tj
0 -12.0547 TD 0.0216 Tc -0.0304 Tw (some options described on page 143.) Tj
24.1095 -30.1369 TD /F2 10 Tf
0.0197 Tc 0 Tw (Alternation) Tj
0 -18.0821 TD /F4 10 Tf
0.0181 Tc 2.0828 Tw (Alternation lets you test more than one pattern at the same time. The) Tj
-24.1095 -12.0547 TD 0.0156 Tc 0.9678 Tw (matching engine is designed to be able to test multiple patterns in parallel, so) Tj
0 -12.0547 TD 0.0188 Tc 0.0327 Tw (alternation is efficient. Alternation is specified with) Tj
ET
BT
353.16 145.32 TD
/F5 9 Tf
0 Tc 0.12 Tw ( |) Tj
ET
BT
0.9955 0 0 0.9955 364.08 145.32 Tm
/F4 10 Tf
0.0188 Tc 0.0628 Tw (, the pipe symbol. Another) Tj
-251.221 -12.0547 TD -0.006 Tc 0.0275 Tw (way to match either ) Tj
ET
BT
208.8 133.32 TD
/F5 9 Tf
-0.024 Tc 0 Tw (Hello) Tj
ET
BT
0.9955 0 0 0.9955 235.8 133.32 Tm
/F4 10 Tf
-0.0208 Tc 0.0725 Tw ( or ) Tj
ET
BT
250.8 133.32 TD
/F5 9 Tf
0 Tc 0 Tw (hello) Tj
ET
BT
0.9955 0 0 0.9955 277.68 133.32 Tm
/F4 10 Tf
0.0145 Tc -0.0232 Tw ( is:) Tj
ET
endstream
endobj
86 0 obj
6835
endobj
84 0 obj
<<
/Type /Page
/Parent 66 0 R
/Resources <<
/Font <<
/F0 6 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
/F7 25 0 R
>>
/ProcSet 2 0 R
>>
/Contents 85 0 R
>>
endobj
89 0 obj
<<
/Length 90 0 R
>>
stream
BT
108.96 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0351 Tc 0.0431 Tw (Regular Expression Syntax) Tj
356.76 0 TD 0.0765 Tc 0 Tw (137) Tj
ET
108.48 701.88 0.48 0.96 re f
480.72 701.88 0.48 0.96 re f
108.96 701.88 371.76 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
553.8 746.76 0.24 0.48 re f
585 746.76 0.24 0.48 re f
554.04 746.76 30.96 0.48 re f
585 80.76 0.24 0.48 re f
554.76 80.76 0.24 0.48 re f
555 80.76 30 0.48 re f
547.8 75 0.48 0.24 re f
547.8 34.8 0.48 0.24 re f
547.8 35.04 0.48 39.96 re f
510 504 54 108 re f
510 611.76 54.24 0.48 re f
563.76 503.76 0.48 108.24 re f
509.76 503.76 54.24 0.48 re f
509.76 504 0.48 108.24 re f
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 605.52 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 602.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 598.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (.) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 595.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 592.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (A) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 583.2 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 575.28 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (v) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 568.56 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (a) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 560.64 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (n) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 553.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 545.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (e) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 538.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 530.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 526.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (T) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 521.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 514.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (l) Tj
ET
Q
BT
144.96 671.04 TD
/F5 9 Tf
-0.0109 Tc (hello|Hello) Tj
ET
BT
0.9955 0 0 0.9955 132.96 657.36 Tm
/F4 10 Tf
-1.0158 Tc (Y) Tj
0.017 Tc -0.0056 Tw (ou can also write this pattern as:) Tj
ET
BT
144.96 644.04 TD
/F5 9 Tf
0 Tc 0 Tw (\(h|H\)ello) Tj
ET
BT
0.9955 0 0 0.9955 132.96 630.36 Tm
/F4 10 Tf
0.0244 Tc -0.0332 Tw (or as:) Tj
ET
BT
144.96 617.04 TD
/F5 9 Tf
0 Tc 0 Tw ([hH]ello) Tj
ET
BT
0.9955 0 0 0.9955 132.96 587.4 Tm
/F2 10 Tf
0.0214 Tc 0.0101 Tw (Anchoring a Match) Tj
0 -18.0821 TD /F4 10 Tf
0.0135 Tc 0.1758 Tw (By default a pattern does not have to match the whole string. There can be) Tj
-24.1095 -12.0547 TD 0.0136 Tc 0.5459 Tw (unmatched characters before and after the match. ) Tj
-1.0158 Tc 0 Tw (Y) Tj
0.019 Tc 0.5027 Tw (ou can anchor the match to) Tj
0 -12.1753 TD 0.0206 Tc 0.9592 Tw (the beginning of the string by starting the pattern with ) Tj
ET
BT
376.8 545.28 TD
/F5 9 Tf
0 Tc 0 Tw (^) Tj
ET
BT
0.9955 0 0 0.9955 382.2 545.28 Tm
/F4 10 Tf
0.0139 Tc 0.9819 Tw (, or to the end of the) Tj
-274.4866 -12.0547 TD 0.0149 Tc -0.1843 Tw (string by ending the pattern with ) Tj
ET
BT
264.96 533.28 TD
/F5 9 Tf
0 Tc 0 Tw ($) Tj
ET
BT
0.9955 0 0 0.9955 270.36 533.28 Tm
/F4 10 Tf
-0.0067 Tc -0.2028 Tw (. You can force the pattern to match the whole) Tj
-162.1364 -12.0547 TD 0.0173 Tc -0.3717 Tw (string by using both. All strings that begin with spaces or tabs are matched with: ) Tj
ET
BT
144.96 507.96 TD
/F5 9 Tf
0 Tc 0 Tw (^[ \\t]+) Tj
ET
BT
0.9955 0 0 0.9955 132.96 494.28 Tm
/F4 10 Tf
0.0138 Tc 0.0679 Tw (If you have many text lines in your input, you may be tempted to think of ) Tj
ET
BT
475.56 494.28 TD
/F5 9 Tf
0 Tc 0 Tw (^) Tj
ET
BT
0.9955 0 0 0.9955 108.96 482.28 Tm
/F4 10 Tf
0.0168 Tc 0.2155 Tw (as meaning "beginning of line" instead of "beginning of string." By default, the ) Tj
ET
BT
475.56 482.28 TD
/F5 9 Tf
0 Tc 0 Tw (^) Tj
ET
BT
0.9955 0 0 0.9955 108.96 470.28 Tm
/F4 10 Tf
0.0205 Tc 2.5022 Tw (and ) Tj
ET
BT
131.76 470.28 TD
/F5 9 Tf
0 Tc 0 Tw ($) Tj
ET
BT
0.9955 0 0 0.9955 137.16 470.28 Tm
/F4 10 Tf
0.0172 Tc 2.5494 Tw ( anchors are relative to the whole input, and embedded newlines are) Tj
-28.3287 -12.0547 TD 0.0181 Tc 1.2724 Tw (ignored. Advanced regular expressions support options that make the ) Tj
ET
BT
444.72 458.28 TD
/F5 9 Tf
0 Tc 0 Tw (^) Tj
ET
BT
0.9955 0 0 0.9955 450.12 458.28 Tm
/F4 10 Tf
0.0205 Tc 1.2365 Tw ( and ) Tj
ET
BT
475.56 458.28 TD
/F5 9 Tf
0 Tc 0 Tw ($) Tj
ET
BT
0.9955 0 0 0.9955 108.96 446.28 Tm
/F4 10 Tf
0.0181 Tc 0.9777 Tw (anchors line-oriented. They also add the ) Tj
ET
BT
303.12 446.28 TD
/F5 9 Tf
0 Tc 0 Tw (\\A) Tj
ET
BT
0.9955 0 0 0.9955 313.92 446.28 Tm
/F4 10 Tf
0.0205 Tc 0.9954 Tw ( and ) Tj
ET
BT
338.88 446.28 TD
/F5 9 Tf
0 Tc 0 Tw (\\Z) Tj
ET
BT
0.9955 0 0 0.9955 349.68 446.28 Tm
/F4 10 Tf
0.0035 Tc 0.9823 Tw ( anchors that always match) Tj
-241.8183 -12.0547 TD 0.0116 Tc -0.0031 Tw (the beginning and end of the string, respectivel) Tj
-1.2738 Tc 0 Tw (y) Tj
0.1119 Tc (.) Tj
24.1095 -30.1369 TD /F2 10 Tf
0.0174 Tc 0.0744 Tw (Backslash Quoting) Tj
0 -18.0821 TD /F4 10 Tf
0.012 Tc 0.0034 Tw (Use the backslash character to turn off these special characters :) Tj
ET
BT
144.96 372.96 TD
/F5 9 Tf
-0.01 Tc 0.01 Tw (. * ? + [ ] \( \) ^ $ | \\) Tj
ET
BT
0.9955 0 0 0.9955 132.96 359.28 Tm
/F4 10 Tf
-0.0121 Tc 0.0437 Tw (For example, to match the plus characte) Tj
-0.9461 Tc 0 Tw (r) Tj
0.0069 Tc 0.0245 Tw (, you will need:) Tj
ET
BT
144.96 345.96 TD
/F5 9 Tf
0 Tc 0 Tw (\\+) Tj
ET
BT
0.9955 0 0 0.9955 132.96 332.28 Tm
/F4 10 Tf
0.0209 Tc 0.1752 Tw (Remember that this quoting is not necessary inside a bracketed expression) Tj
-24.1095 -12.0547 TD 0.0112 Tc 1.2338 Tw (\(i.e., a character set definition.\) ) Tj
-0.0102 Tc 1.2932 Tw (For example, to match either plus or question) Tj
0 -12.0547 TD 0.0186 Tc -0.0072 Tw (mark, either of these patterns will work:) Tj
ET
BT
144.96 294.96 TD
/F5 9 Tf
0 Tc 0 Tw (\(\\+|\\?\)) Tj
0 -12.96 TD ([+?]) Tj
ET
BT
0.9955 0 0 0.9955 132.96 268.32 Tm
/F4 10 Tf
-0.007 Tc 0.9176 Tw (To match a single backslash, you need two. ) Tj
-1.0158 Tc 0 Tw (Y) Tj
0.0143 Tc 0.881 Tw (ou must do this everywhere,) Tj
-24.1095 -12.0547 TD 0.0031 Tc 0.169 Tw (even inside a bracketed expression. Or you can use \\B, which was added as part) Tj
0 -12.0547 TD 0.0147 Tc -0.0235 Tw (of advanced regular expressions. Both of these match a single backslash:) Tj
ET
BT
144.96 231 TD
/F5 9 Tf
0 Tc 0 Tw (\\\\) Tj
0 -12.96 TD (\\B) Tj
ET
BT
0.9955 0 0 0.9955 132.96 204.36 Tm
/F7 10 Tf
0.0149 Tc 0 Tw (Unknown backslash sequences are an erro) Tj
-1.3078 Tc 0 Tw (r) Tj
-0.0087 Tc (.) Tj
0 -13.1397 TD /F4 10 Tf
0.0077 Tc 0.2729 Tw (Versions of Tcl before 8.1 ignored unknown backslash sequences in regular) Tj
-24.1095 -12.0547 TD -0.0075 Tc 0.8426 Tw (expressions. ) Tj
-0.0552 Tc 0.8303 Tw (For example, ) Tj
ET
BT
232.56 179.28 TD
/F5 9 Tf
0 Tc 0 Tw (\\=) Tj
ET
BT
0.9955 0 0 0.9955 243.36 179.28 Tm
/F4 10 Tf
-0.0021 Tc 0.7167 Tw ( was just ) Tj
ET
BT
289.2 179.28 TD
/F5 9 Tf
0 Tc 0 Tw (=) Tj
ET
BT
0.9955 0 0 0.9955 294.6 179.28 Tm
/F4 10 Tf
0.0132 Tc 0.7616 Tw (, and ) Tj
ET
BT
321.84 179.28 TD
/F5 9 Tf
0 Tc 0 Tw (\\w) Tj
ET
BT
0.9955 0 0 0.9955 332.64 179.28 Tm
/F4 10 Tf
-0.0021 Tc 0.7167 Tw ( was just ) Tj
ET
BT
378.48 179.28 TD
/F5 9 Tf
0 Tc 0 Tw (w) Tj
ET
BT
0.9955 0 0 0.9955 382.68 179.28 Tm
/F4 10 Tf
0.0298 Tc 0.6847 Tw (. Even ) Tj
ET
BT
416.16 179.28 TD
/F5 9 Tf
0 Tc 0 Tw (\\n) Tj
ET
BT
0.9955 0 0 0.9955 426.96 179.28 Tm
/F4 10 Tf
-0.0021 Tc 0.7167 Tw ( was just ) Tj
ET
BT
472.8 179.28 TD
/F5 9 Tf
0 Tc 0 Tw (n) Tj
ET
BT
0.9955 0 0 0.9955 478.2 179.28 Tm
/F4 10 Tf
-0.0087 Tc (,) Tj
-370.9246 -12.0547 TD 0.0174 Tc 0.8579 Tw (which was probably frustrating to many beginners trying to get a newline into) Tj
0 -12.0547 TD 0.0156 Tc 1.6365 Tw (their pattern. Advanced regular expressions add backslash sequences for tab,) Tj
T* 0.0094 Tc 0.7052 Tw (newline, character classes, and more. This is a convenient improvement, but in) Tj
T* 0.0142 Tc 1.5813 Tw (rare cases it may change the semantics of a pattern. Usually these cases are) Tj
ET
1 1 1 rg
487.2 175.08 35.64 35.76 re f
504.96 209.04 m
489 193.08 l
504.96 177.12 l
521.04 193.08 l
504.96 209.04 l
f*
0 0 0 rg
505.2 208.8 m
489.24 192.84 l
488.88 192.84 l
489.24 193.2 l
505.2 177.24 l
505.2 176.88 l
504.84 177.24 l
520.92 193.2 l
521.28 193.2 l
521.52 192.96 l
521.28 192.84 l
505.2 176.88 l
505.08 176.76 l
504.84 176.88 l
488.64 193.08 l
488.88 193.2 l
504.84 209.16 l
505.2 208.8 l
f
520.92 192.84 m
504.84 208.8 l
504.84 209.16 l
504.96 209.28 l
505.2 209.16 l
521.28 193.2 l
520.92 192.84 l
f
0.302 0.302 0.302 rg
504.96 177.12 m
489 193.08 l
504.96 193.08 l
504.96 177.12 l
f*
0 0 0 rg
504.84 176.88 m
488.4 193.32 l
489 193.32 l
489.24 193.2 l
505.2 177.24 l
504.84 176.88 l
f
489 192.84 16.2 0.48 re f
505.2 193.08 m
505.2 176.52 l
504.84 176.88 l
504.72 177.12 l
504.72 193.08 l
505.2 193.08 l
f
0.102 0.102 0.102 rg
504.96 177.12 m
521.04 193.08 l
504.96 193.08 l
504.96 177.12 l
f*
0 0 0 rg
504.84 177.24 m
520.92 193.2 l
521.04 193.32 l
521.76 193.32 l
521.28 192.84 l
505.2 176.88 l
504.84 177.24 l
f
504.72 192.84 16.32 0.48 re f
505.2 193.08 m
505.2 176.88 l
504.72 176.4 l
504.72 193.08 l
505.2 193.08 l
f
0.702 0.702 0.702 rg
504.96 209.04 m
521.04 193.08 l
504.96 193.08 l
504.96 209.04 l
f*
0 0 0 rg
505.2 209.16 m
521.28 193.2 l
521.64 192.84 l
520.92 192.84 l
504.84 208.8 l
505.2 209.16 l
f
504.72 192.84 16.32 0.48 re f
504.72 193.08 m
504.72 209.64 l
505.2 209.16 l
505.2 193.08 l
504.72 193.08 l
f
0.9686 0.9686 0.9686 rg
504.96 209.04 m
489 193.08 l
504.96 193.08 l
504.96 209.04 l
f*
0 0 0 rg
505.2 208.8 m
489.24 192.84 l
488.52 192.84 l
504.84 209.16 l
505.2 208.8 l
f
489 192.84 16.2 0.48 re f
504.72 193.08 m
504.72 209.04 l
505.2 209.52 l
505.2 193.08 l
504.72 193.08 l
f
0.502 0.502 0.502 rg
504.96 200.04 m
498 193.08 l
504.96 186.12 l
512.04 193.08 l
504.96 200.04 l
f*
0.102 0.102 0.102 rg
505.2 199.8 m
498.24 192.84 l
497.88 192.84 l
498.24 193.2 l
505.2 186.24 l
505.2 185.88 l
504.84 186.24 l
511.92 193.2 l
512.28 193.2 l
512.52 192.96 l
512.28 192.84 l
505.2 185.88 l
505.08 185.76 l
504.84 185.88 l
497.64 193.08 l
497.88 193.2 l
504.84 200.16 l
505.2 199.8 l
f
511.92 192.84 m
504.84 199.8 l
504.84 200.16 l
504.96 200.28 l
505.2 200.16 l
512.28 193.2 l
511.92 192.84 l
f
endstream
endobj
90 0 obj
11287
endobj
87 0 obj
<<
/Type /Page
/Parent 88 0 R
/Resources <<
/Font <<
/F0 6 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
/F7 25 0 R
>>
/ProcSet 2 0 R
>>
/Contents 89 0 R
>>
endobj
92 0 obj
<<
/Length 93 0 R
>>
stream
BT
114 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0365 Tc -0.0782 Tw (138 ) Tj
256.92 0 TD 0.03 Tc 0.0483 Tw (Regular Expressions) Tj
73.8 0 TD 0.0261 Tc 0.0282 Tw ( Chap. 11) Tj
ET
113.52 701.88 0.48 0.96 re f
486 701.88 0.48 0.96 re f
114 701.88 372 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
554.76 746.76 0.24 0.48 re f
584.04 746.76 0.24 0.48 re f
555 746.76 29.04 0.48 re f
585 80.76 0.24 0.48 re f
553.8 80.76 0.24 0.48 re f
554.04 80.76 30.96 0.48 re f
548.76 69.96 0.48 0.24 re f
548.76 33.72 0.48 0.24 re f
548.76 33.96 0.48 36 re f
BT
0.9955 0 0 0.9955 114 670.32 Tm
/F4 10 Tf
0.0125 Tc 1.4472 Tw (where an unneeded backslash suddenly takes on meaning, or causes an error) Tj
0 -12.0547 TD 0.0226 Tc -0.0313 Tw (because it is unknown.) Tj
24.1095 -30.1369 TD /F2 10 Tf
0.0197 Tc -0.0484 Tw (Matching Precedence) Tj
0 -18.0821 TD /F4 10 Tf
0.0086 Tc 1.93 Tw (If a pattern can match several parts of a string, the matcher takes the) Tj
-24.1095 -12.0547 TD 0.0132 Tc 1.0889 Tw (match that occurs earliest in the input string. Then, if there is more than one) Tj
0 -12.0547 TD 0.0125 Tc 0.8126 Tw (match from that same point because of alternation in the pattern, the matcher) Tj
T* 0.0181 Tc 0.829 Tw (takes the longest possible match. The rule of thumb is: ) Tj
264.9634 0 TD /F7 10 Tf
0.0067 Tc 0.8887 Tw (first, then longest) Tj
81.6106 0 TD /F4 10 Tf
0.0071 Tc 0.9486 Tw (. This) Tj
-346.574 -12.0547 TD 0.0169 Tc -0.0135 Tw (rule gets changed by nongreedy quantifiers that prefer a shorter match.) Tj
24.1095 -12.0547 TD 0.0014 Tc 1.6868 Tw (Watch out for *, which means zero or more, because zero of anything is) Tj
-24.1095 -12.0547 TD 0.0163 Tc -0.0078 Tw (pretty easy to match. Suppose your pattern is:) Tj
ET
BT
150 525 TD
/F5 9 Tf
-0.02 Tc 0 Tw ([a-z]*) Tj
ET
BT
0.9955 0 0 0.9955 114 511.32 Tm
/F4 10 Tf
0.0169 Tc 2.2406 Tw (This pattern will match against ) Tj
ET
BT
274.56 511.32 TD
/F5 9 Tf
-0.04 Tc 0 Tw (123abc) Tj
ET
BT
0.9955 0 0 0.9955 306.72 511.32 Tm
/F4 10 Tf
0.0114 Tc 2.2703 Tw (, but not how you expect. Instead of) Tj
-193.5993 -12.0547 TD 0.0128 Tc 0.6183 Tw (matching on the letters in the string, the pattern will match on the zero-length) Tj
0 -12.0547 TD 0.0147 Tc 0.0713 Tw (substring at the very beginning of the input string! This behavior can be seen by) Tj
T* 0.0145 Tc 0.8206 Tw (using the ) Tj
ET
BT
161.52 475.32 TD
/F5 9 Tf
-0.015 Tc 0 Tw (-indices) Tj
ET
BT
0.9955 0 0 0.9955 204.6 475.32 Tm
/F4 10 Tf
0.0286 Tc 0.7461 Tw ( option of the ) Tj
ET
BT
271.08 475.32 TD
/F5 9 Tf
0 Tc 0 Tw (regexp) Tj
ET
BT
0.9955 0 0 0.9955 303.48 475.32 Tm
/F4 10 Tf
0.0231 Tc 0.7718 Tw ( command described on page 148. This) Tj
-190.3445 -12.0547 TD 0.0152 Tc 1.1816 Tw (option tells you the location of the matching string instead of the value of the) Tj
0 -12.0547 TD -0.0019 Tc -0.0068 Tw (matching string.) Tj
24.1095 -30.1369 TD /F2 10 Tf
0.0176 Tc 0.0742 Tw (Capturing Subpatterns) Tj
0 -18.0821 TD /F4 10 Tf
0.0142 Tc 0.3387 Tw (Use parentheses to capture a subpattern. The string that matches the pat-) Tj
-24.1095 -12.0547 TD 0.0168 Tc 1.1096 Tw (tern within parentheses is remembered in a matching variable, which is a Tcl) Tj
0 -12.0547 TD 0.0169 Tc -0.0256 Tw (variable that gets assigned the string that matches the pattern. Using parenthe-) Tj
T* 0.0143 Tc 1.5441 Tw (ses to capture subpatterns is very useful. Suppose we want to get everything) Tj
T* 0.0159 Tc -0.0246 Tw (between the ) Tj
ET
BT
172.92 355.32 TD
/F5 9 Tf
0 Tc 0 Tw (
) Tj
ET
BT
0.9955 0 0 0.9955 194.4 355.32 Tm
/F4 10 Tf
0.0205 Tc -0.0293 Tw ( and ) Tj
ET
BT
217.44 355.32 TD
/F5 9 Tf
0 Tc 0 Tw ( | ) Tj
ET
BT
0.9955 0 0 0.9955 244.32 355.32 Tm
/F4 10 Tf
0.0263 Tc -0.0351 Tw ( tags in some HTML. ) Tj
-0.0287 Tc 0.0503 Tw (You can use this pattern:) Tj
ET
BT
150 342 TD
/F5 9 Tf
-0.0075 Tc 0 Tw (\([^<]*\) | ) Tj
ET
BT
0.9955 0 0 0.9955 138 328.32 Tm
/F4 10 Tf
0.0133 Tc 2.7067 Tw (The matching variable gets assigned the part of the input string that) Tj
-24.1095 -12.0547 TD 0.0115 Tc 0.482 Tw (matches the pattern inside the parentheses. ) Tj
-1.0158 Tc 0 Tw (Y) Tj
0.0215 Tc 0.482 Tw (ou can capture many subpatterns) Tj
0 -12.0547 TD 0.0115 Tc -0.2131 Tw (in one match, which makes it a very efficient way to pick apart your data. Match-) Tj
T* 0.0187 Tc 1.8927 Tw (ing variables are explained in more detail on page 148 in the context of the) Tj
ET
BT
114 280.32 TD
/F5 9 Tf
-0.02 Tc 0 Tw (regexp) Tj
ET
BT
0.9955 0 0 0.9955 146.4 280.32 Tm
/F4 10 Tf
0.008 Tc 0.1038 Tw ( command.) Tj
-8.4383 -12.0547 TD 0.0177 Tc -0.1269 Tw (Sometimes you need to introduce parentheses but you do not care about the) Tj
-24.1095 -12.0547 TD 0.015 Tc 2.4977 Tw (match that occurs inside them. The pattern is slightly more efficient if the) Tj
0 -12.0547 TD 0.0088 Tc 1.3808 Tw (matcher does not need to remember the match. Advanced regular expressions) Tj
T* 0.0208 Tc -0.0296 Tw (add noncapturing parentheses with this syntax:) Tj
ET
BT
150 219 TD
/F5 9 Tf
0 Tc 0 Tw (\(?:) Tj
16.2 0 TD /F9 9 Tf
-0.0171 Tc (pattern) Tj
37.68 0 TD /F5 9 Tf
0 Tc (\)) Tj
ET
BT
0.997 0 0 0.997 114 181.32 Tm
/F2 13 Tf
0.2828 Tc -0.0719 Tw (Advanced Regular Expressions) Tj
ET
BT
0.9955 0 0 0.9955 114 160.32 Tm
/F4 10 Tf
0.0166 Tc 2.1928 Tw (The syntax added by advanced regular expressions is mostly just shorthand) Tj
0 -12.0547 TD 0.0154 Tc 1.2032 Tw (notation for constructs you can make with the basic syntax already described.) Tj
T* 0.0175 Tc -0.1797 Tw (There are also some new features that add additional power: nongreedy quantifi-) Tj
ET
endstream
endobj
93 0 obj
5996
endobj
91 0 obj
<<
/Type /Page
/Parent 88 0 R
/Resources <<
/Font 94 0 R
/ProcSet 2 0 R
>>
/Contents 92 0 R
>>
endobj
94 0 obj
<<
/F0 6 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
/F7 25 0 R
/F9 32 0 R
>>
endobj
96 0 obj
<<
/Length 97 0 R
>>
stream
BT
108.96 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0369 Tc 0.0413 Tw (Advanced Regular Expressions) Tj
356.76 0 TD 0.0765 Tc 0 Tw (139) Tj
ET
108.48 701.88 0.48 0.96 re f
480.72 701.88 0.48 0.96 re f
108.96 701.88 371.76 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
553.8 746.76 0.24 0.48 re f
585 746.76 0.24 0.48 re f
554.04 746.76 30.96 0.48 re f
585 80.76 0.24 0.48 re f
554.76 80.76 0.24 0.48 re f
555 80.76 30 0.48 re f
547.8 75 0.48 0.24 re f
547.8 34.8 0.48 0.24 re f
547.8 35.04 0.48 39.96 re f
510 504 54 108 re f
510 611.76 54.24 0.48 re f
563.76 503.76 0.48 108.24 re f
509.76 503.76 54.24 0.48 re f
509.76 504 0.48 108.24 re f
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 605.52 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 602.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 598.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (.) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 595.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 592.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (A) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 583.2 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 575.28 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (v) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 568.56 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (a) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 560.64 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (n) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 553.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 545.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (e) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 538.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 530.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 526.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (T) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 521.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 514.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (l) Tj
ET
Q
BT
0.9955 0 0 0.9955 108.96 670.32 Tm
/F4 10 Tf
0.0015 Tc 1.34 Tw (ers, back references, look-ahead patterns, and named character classes. If you) Tj
0 -12.0547 TD 0.0137 Tc 0.9698 Tw (are just starting out with regular expressions, you can ignore most of this sec-) Tj
T* 0.0053 Tc 0.5486 Tw (tion, except for the one about backslash sequences. Once you master the basics,) Tj
T* 0.0147 Tc -0.0579 Tw (of if you are already familiar with regular expressions in Tcl \(or the UNIX ) Tj
345.1274 0 TD /F7 10 Tf
0.0175 Tc 0 Tw (vi) Tj
8.5589 0 TD /F4 10 Tf
0.0026 Tc -0.0113 Tw ( edi-) Tj
-353.6863 -12.0547 TD 0.0247 Tc 0.5692 Tw (tor or ) Tj
29.6547 0 TD /F7 10 Tf
0.0029 Tc 0 Tw (grep) Tj
20.0109 0 TD /F4 10 Tf
0.0161 Tc 0.5678 Tw ( utility\), then you may be interested in the new features of advanced) Tj
-49.6656 -12.0547 TD 0.0032 Tc -0.0119 Tw (regular expressions.) Tj
24.1095 -30.1369 TD /F2 10 Tf
0.0244 Tc -0.0532 Tw (Compatibility with Patterns in ) Tj
-0.082 Tc 0.1742 Tw (Tcl 8.0) Tj
0 -18.0821 TD /F4 10 Tf
0.0094 Tc 1.7768 Tw (Advanced regular expressions add syntax in an upward compatible wa) Tj
-1.2738 Tc 0 Tw (y) Tj
-0.0087 Tc (.) Tj
-24.1095 -12.0547 TD 0.0156 Tc 2.3565 Tw (Old patterns continue to work with the new matche) Tj
-0.9461 Tc 0 Tw (r) Tj
0.0244 Tc 2.2974 Tw (, but advanced regular) Tj
0 -12.0547 TD 0.017 Tc -0.212 Tw (expressions will raise errors if given to old versions of Tcl. ) Tj
-0.0186 Tc -0.1909 Tw (For example, the ques-) Tj
T* 0.0075 Tc 0.0516 Tw (tion mark is used in many of the new constructs, and it is artfully placed in loca-) Tj
T* 0.0124 Tc 0.2477 Tw (tions that would not be legal in older versions of regular expressions. The added) Tj
T* 0.0181 Tc 0.0033 Tw (syntax is summarized in ) Tj
-0.0216 Tc 0.0733 Tw (Table 11\2262 on page 145.) Tj
24.1095 -12.0547 TD 0.015 Tc 1.1818 Tw (If you have unbraced patterns from older code, they are very likely to be) Tj
-24.1095 -12.0547 TD 0.0082 Tc -0.0514 Tw (correct in Tcl 8.1 and later versions. ) Tj
0.0013 Tc -0.0703 Tw (For example, the following pattern picks out) Tj
0 -12.0547 TD 0.0125 Tc 1.0737 Tw (everything up to the next newline. The pattern is unbraced, so Tcl substitutes) Tj
T* 0.0146 Tc 0.321 Tw (the newline character for each occurrence of ) Tj
ET
BT
317.28 454.32 TD
/F5 9 Tf
0 Tc 0 Tw (\\n) Tj
ET
BT
0.9955 0 0 0.9955 328.08 454.32 Tm
/F4 10 Tf
0.0131 Tc 0.3157 Tw (. The square brackets are quoted) Tj
-220.1197 -12.0547 TD 0.0189 Tc -0.0156 Tw (so that Tcl does not think they delimit a nested command:) Tj
ET
BT
144.96 429 TD
/F5 9 Tf
-0.0092 Tc 0.0092 Tw (regexp "\(\\[^\\n\\]+\)\\n" $input) Tj
ET
BT
0.9955 0 0 0.9955 132.96 415.32 Tm
/F4 10 Tf
0.0148 Tc 2.9299 Tw (The above command behaves identically when using advanced regular) Tj
-24.1095 -12.0547 TD 0.009 Tc 0.0225 Tw (expressions, although you can now also write it like this:) Tj
ET
BT
144.96 390 TD
/F5 9 Tf
-0.005 Tc 0.005 Tw (regexp {\([^\\n]+\)\\n} $input) Tj
ET
BT
0.9955 0 0 0.9955 108.96 376.32 Tm
/F4 10 Tf
0.012 Tc 0.1936 Tw (The curly braces hide the brackets from the Tcl parse) Tj
-0.9461 Tc 0 Tw (r) Tj
0.0155 Tc 0.1824 Tw (, so they do not need to be) Tj
0 -12.0547 TD 0.0129 Tc -0.0016 Tw (escaped with backslash. This saves us two characters and looks a bit cleane) Tj
-0.9461 Tc 0 Tw (r) Tj
-0.0087 Tc 0 Tw (. ) Tj
24.1095 -30.1369 TD /F2 10 Tf
0.0219 Tc 0.0096 Tw (Backslash Escape Sequences) Tj
0 -18.0821 TD /F4 10 Tf
0.015 Tc -0.0599 Tw (The most significant change in advanced regular expression syntax is back-) Tj
-24.1095 -12.0547 TD 0.0099 Tc 1.1869 Tw (slash substitutions. In Tcl 8.0 and earlie) Tj
-0.9461 Tc 0 Tw (r) Tj
0.015 Tc 1.1817 Tw (, a backslash is only used to turn off) Tj
0 -12.0547 TD 0.0162 Tc -0.2359 Tw (special characters such as: ) Tj
ET
BT
233.52 292.32 TD
/F5 9 Tf
0 Tc -0.42 Tw (. + * ? [ ]. ) Tj
ET
BT
0.9955 0 0 0.9955 301.2 292.32 Tm
/F4 10 Tf
0.0106 Tc -0.2302 Tw (Otherwise it was ignored. ) Tj
-0.0442 Tc -0.2053 Tw (For example,) Tj
ET
BT
108.96 280.32 TD
/F5 9 Tf
0 Tc 0 Tw (\\n) Tj
ET
BT
0.9955 0 0 0.9955 119.76 280.32 Tm
/F4 10 Tf
0.0022 Tc 1.0338 Tw ( was simply ) Tj
ET
BT
179.88 280.32 TD
/F5 9 Tf
0 Tc 0 Tw (n) Tj
ET
BT
0.9955 0 0 0.9955 185.28 280.32 Tm
/F4 10 Tf
0.0046 Tc 1.0415 Tw ( to the Tcl 8.0 regular expression engine. This was a source of) Tj
-76.6682 -12.0547 TD 0.0129 Tc 1.1746 Tw (confusion, and it meant you could not always quote patterns in braces to hide) Tj
0 -12.0547 TD 0.0069 Tc 1.3104 Tw (their special characters from Tcl\222s parse) Tj
-0.9461 Tc 0 Tw (r) Tj
0.0071 Tc 1.3102 Tw (. In advanced regular expressions, ) Tj
ET
BT
470.28 256.32 TD
/F5 9 Tf
0 Tc 0 Tw (\\n) Tj
ET
BT
0.9955 0 0 0.9955 108.96 244.32 Tm
/F4 10 Tf
0.0117 Tc -0.2012 Tw (now means the newline character to the regular expression engine, so you should) Tj
0 -12.0547 TD 0.0077 Tc -0.0013 Tw (never need to let Tcl do backslash processing. ) Tj
24.1095 -15.0684 TD 0.029 Tc -0.0378 Tw (Again, ) Tj
33.1506 0 TD /F7 10 Tf
0.0177 Tc -0.0264 Tw (always group your pattern with curly braces) Tj
203.2431 0 TD /F4 10 Tf
0.0141 Tc -0.0228 Tw ( to avoid confusion.) Tj
-236.3936 -15.0684 TD 0.016 Tc 0.7709 Tw (Advanced regular expressions add a lot of new backslash sequences. They) Tj
-24.1095 -12.0547 TD 0.0277 Tc 0.6064 Tw (are listed in ) Tj
0.0083 Tc 0.6661 Tw (Table 11\2264 on page 146. Some of the more useful ones include ) Tj
ET
BT
464.88 190.32 TD
/F5 9 Tf
0 Tc 0 Tw (\\s,) Tj
ET
BT
0.9955 0 0 0.9955 108.96 178.32 Tm
/F4 10 Tf
0.0054 Tc 1.0407 Tw (which matches space-like characters, ) Tj
ET
BT
287.04 178.32 TD
/F5 9 Tf
0 Tc 0 Tw (\\w,) Tj
ET
BT
0.9955 0 0 0.9955 303.24 178.32 Tm
/F4 10 Tf
0.013 Tc 0.9828 Tw ( which matches letters, digit, and the) Tj
-195.1664 -12.0547 TD 0.0045 Tc 0.9512 Tw (underscore, ) Tj
ET
BT
166.2 166.32 TD
/F5 9 Tf
0 Tc 0 Tw (\\y,) Tj
ET
BT
0.9955 0 0 0.9955 182.4 166.32 Tm
/F4 10 Tf
0.0123 Tc 0.9653 Tw ( which matches the beginning or end of a word, and ) Tj
ET
BT
433.56 166.32 TD
/F5 9 Tf
0 Tc 0 Tw (\\B,) Tj
ET
BT
0.9955 0 0 0.9955 449.76 166.32 Tm
/F4 10 Tf
0 Tc 0.9551 Tw ( which) Tj
-342.3549 -12.0547 TD 0.006 Tc 0.0255 Tw (matches a backslash. ) Tj
ET
endstream
endobj
97 0 obj
8970
endobj
95 0 obj
<<
/Type /Page
/Parent 88 0 R
/Resources <<
/Font <<
/F0 6 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
/F7 25 0 R
>>
/ProcSet 2 0 R
>>
/Contents 96 0 R
>>
endobj
99 0 obj
<<
/Length 100 0 R
>>
stream
BT
114 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0365 Tc -0.0782 Tw (140 ) Tj
256.92 0 TD 0.03 Tc 0.0483 Tw (Regular Expressions) Tj
73.8 0 TD 0.0261 Tc 0.0282 Tw ( Chap. 11) Tj
ET
113.52 701.88 0.48 0.96 re f
486 701.88 0.48 0.96 re f
114 701.88 372 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
554.76 746.76 0.24 0.48 re f
584.04 746.76 0.24 0.48 re f
555 746.76 29.04 0.48 re f
585 80.76 0.24 0.48 re f
553.8 80.76 0.24 0.48 re f
554.04 80.76 30.96 0.48 re f
548.76 69.96 0.48 0.24 re f
548.76 33.72 0.48 0.24 re f
548.76 33.96 0.48 36 re f
BT
0.9955 0 0 0.9955 138 670.32 Tm
/F2 10 Tf
0.0195 Tc -0.0482 Tw (Character Classes) Tj
0 -18.0821 TD /F4 10 Tf
0.0077 Tc 1.3699 Tw (Character classes are names for sets of characters. The named character) Tj
-24.1095 -12.0547 TD 0.0177 Tc -0.0265 Tw (class syntax is valid only inside a bracketed character set. The syntax is ) Tj
ET
BT
150 627 TD
/F5 9 Tf
0 Tc 0 Tw ([:) Tj
10.8 0 TD /F9 9 Tf
-0.012 Tc (identifier) Tj
53.88 0 TD /F5 9 Tf
0 Tc (:]) Tj
ET
BT
0.9955 0 0 0.9955 138 613.32 Tm
/F4 10 Tf
-0.0552 Tc 0.529 Tw (For example, ) Tj
ET
BT
201.24 613.32 TD
/F5 9 Tf
0 Tc 0 Tw (alpha) Tj
ET
BT
0.9955 0 0 0.9955 228.24 613.32 Tm
/F4 10 Tf
0.0167 Tc 0.4458 Tw ( is the name for the set of uppercase and lowercase let-) Tj
-114.7612 -12.0547 TD 0.0068 Tc 0.0046 Tw (ters. The following two patterns are ) Tj
168.6459 0 TD /F7 10 Tf
0.0279 Tc 0 Tw (almost) Tj
30.9807 0 TD /F4 10 Tf
0.024 Tc -0.0328 Tw ( the same:) Tj
ET
BT
150 588 TD
/F5 9 Tf
-0.015 Tc 0 Tw ([A-Za-z]) Tj
0 -12.96 TD -0.0109 Tc ([[:alpha:]]) Tj
ET
BT
0.9955 0 0 0.9955 114 561.36 Tm
/F4 10 Tf
0.0148 Tc -0.1441 Tw (The difference is that the alpha character class also includes accented characters) Tj
0 -12.0547 TD 0.0099 Tc 0.4134 Tw (like \350. If you match data that contains nonASCII characters, the named charac-) Tj
T* 0.0128 Tc 0.0113 Tw (ter classes are more general than trying to name the characters explicitl) Tj
-1.2738 Tc 0 Tw (y) Tj
-0.0087 Tc (.) Tj
24.1095 -12.0547 TD 0.0182 Tc 2.1209 Tw (There are also backslash sequences that are shorthand for some of the) Tj
-24.1095 -12.0547 TD 0.0099 Tc 0.0055 Tw (named character classes. The following patterns to match digits are equivalent:) Tj
ET
BT
150 500.04 TD
/F5 9 Tf
-0.024 Tc 0 Tw ([0-9]) Tj
0 -13.08 TD -0.0109 Tc ([[:digit:]]) Tj
0 -12.96 TD 0 Tc (\\d) Tj
ET
BT
0.9955 0 0 0.9955 138 460.32 Tm
/F4 10 Tf
0.0105 Tc 1.9784 Tw (The following patterns match space-like characters including backspace,) Tj
-24.1095 -12.0547 TD 0.0068 Tc 0.0146 Tw (form feed, newline, carriage return, tag, and vertical tab:) Tj
ET
BT
150 435 TD
/F5 9 Tf
-0.0086 Tc 0.0086 Tw ([ \\b\\f\\n\\r\\t\\v]) Tj
0 -12.96 TD -0.0133 Tc 0 Tw ([:space:]) Tj
0 -13.08 TD 0 Tc (\\s) Tj
ET
BT
0.9955 0 0 0.9955 138 395.28 Tm
/F4 10 Tf
0.0192 Tc 1.7401 Tw (The named character classes and the associated backslash sequence are) Tj
-24.1095 -12.0547 TD 0.0154 Tc -0.0241 Tw (listed in ) Tj
-0.0026 Tc -0.0061 Tw (Table 11\2263 on page 146.) Tj
24.1095 -12.0547 TD -1.0158 Tc 0 Tw (Y) Tj
0.0114 Tc -0.0201 Tw (ou can use character classes in combination with other characters or char-) Tj
-24.1095 -12.0547 TD 0.0124 Tc 0.461 Tw (acter classes inside a character set definition. The following patterns match let-) Tj
0 -12.0547 TD -0.0068 Tc 0.0384 Tw (ters, digits, and underscore:) Tj
ET
BT
150 333.96 TD
/F5 9 Tf
-0.0057 Tc 0 Tw ([[:digit:][:alpha:]_]) Tj
0 -12.96 TD -0.0086 Tc ([\\d[:alpha:]_]) Tj
T* -0.01 Tc ([[:alnum:]_]) Tj
0 -13.08 TD 0 Tc (\\w) Tj
ET
BT
0.9955 0 0 0.9955 138 281.28 Tm
/F4 10 Tf
0.01 Tc 0.1621 Tw (Note that ) Tj
ET
BT
185.28 281.28 TD
/F5 9 Tf
-0.04 Tc 0 Tw (\\d,) Tj
ET
BT
0.9955 0 0 0.9955 201.48 281.28 Tm
/F4 10 Tf
0 Tc -0.0087 Tw ( ) Tj
ET
BT
204.36 281.28 TD
/F5 9 Tf
-0.06 Tc 0 Tw (\\s) Tj
ET
BT
0.9955 0 0 0.9955 215.16 281.28 Tm
/F4 10 Tf
0.0205 Tc 0.1516 Tw ( and ) Tj
ET
BT
238.32 281.28 TD
/F5 9 Tf
0 Tc 0 Tw (\\w) Tj
ET
BT
0.9955 0 0 0.9955 249.12 281.28 Tm
/F4 10 Tf
0.0095 Tc 0.1158 Tw ( can be used either inside or outside character sets.) Tj
-135.7365 -12.0547 TD 0.0151 Tc 1.1926 Tw (When used outside a bracketed expression, they form their own character set.) Tj
0 -12.0547 TD 0.014 Tc 1.0622 Tw (There are also ) Tj
ET
BT
186.12 257.28 TD
/F5 9 Tf
0 Tc 0 Tw (\\D,) Tj
ET
BT
0.9955 0 0 0.9955 202.2 257.28 Tm
/F4 10 Tf
-0.0087 Tw ( ) Tj
ET
BT
206.04 257.28 TD
/F5 9 Tf
0 Tw (\\S,) Tj
ET
BT
0.9955 0 0 0.9955 222.24 257.28 Tm
/F4 10 Tf
0.0205 Tc 1.0557 Tw ( and ) Tj
ET
BT
247.32 257.28 TD
/F5 9 Tf
0 Tc 0 Tw (\\W,) Tj
ET
BT
0.9955 0 0 0.9955 263.52 257.28 Tm
/F4 10 Tf
0.017 Tc 1.0592 Tw ( which are the complement of ) Tj
ET
BT
408.48 257.28 TD
/F5 9 Tf
0 Tc 0 Tw (\\d,) Tj
ET
BT
0.9955 0 0 0.9955 424.68 257.28 Tm
/F4 10 Tf
-0.0087 Tw ( ) Tj
ET
BT
428.52 257.28 TD
/F5 9 Tf
0 Tw (\\s,) Tj
ET
BT
0.9955 0 0 0.9955 444.72 257.28 Tm
/F4 10 Tf
0.0205 Tc 1.0557 Tw ( and ) Tj
ET
BT
469.8 257.28 TD
/F5 9 Tf
0 Tc 0 Tw (\\w.) Tj
ET
BT
0.9955 0 0 0.9955 114 245.28 Tm
/F4 10 Tf
0.0037 Tc 0.4698 Tw (These escapes \(i.e., ) Tj
ET
BT
205.68 245.28 TD
/F5 9 Tf
0 Tc 0 Tw (\\D) Tj
ET
BT
0.9955 0 0 0.9955 216.48 245.28 Tm
/F4 10 Tf
0.0135 Tc 0.4733 Tw ( for not-a-digit\) cannot be used inside a bracketed charac-) Tj
-102.9475 -12.0547 TD 0.0188 Tc -0.0276 Tw (ter set.) Tj
24.1095 -12.0547 TD 0.0078 Tc 1.2894 Tw (There are two special character classes, ) Tj
ET
BT
331.2 221.28 TD
/F5 9 Tf
-0.02 Tc 0 Tw ([[:<:]) Tj
ET
BT
0.9955 0 0 0.9955 363.6 221.28 Tm
/F4 10 Tf
0.0205 Tc 1.2968 Tw ( and ) Tj
ET
BT
389.04 221.28 TD
/F5 9 Tf
0 Tc 0 Tw ([[:>:]]) Tj
ET
BT
0.9955 0 0 0.9955 426.84 221.28 Tm
/F4 10 Tf
0.0089 Tc 1.3084 Tw (, that match) Tj
-314.2673 -12.0547 TD 0.0186 Tc 0.5065 Tw (the beginning and end of a word, respectivel) Tj
-1.1533 Tc 0 Tw (y) Tj
0.0181 Tc 0.5156 Tw (. A word is defined as one or more) Tj
0 -12.0547 TD 0.0077 Tc 0.0238 Tw (characters that match ) Tj
ET
BT
219 197.28 TD
/F5 9 Tf
0 Tc 0 Tw (\\w.) Tj
ET
BT
0.9955 0 0 0.9955 138 171.36 Tm
/F2 10 Tf
0.0178 Tc -0.0466 Tw (Nongreedy Quantifiers) Tj
0 -18.0821 TD /F4 10 Tf
0.0155 Tc 0.0102 Tw (The *, +, and ? characters are ) Tj
139.8351 0 TD /F7 10 Tf
0.0124 Tc 0 Tw (quantifiers) Tj
50.5094 0 TD /F4 10 Tf
0.0182 Tc -0.0028 Tw ( that specify repetition. By default) Tj
-214.454 -12.0547 TD 0.0119 Tc 0.4736 Tw (these match as many characters as possible, which is called ) Tj
283.7688 0 TD /F7 10 Tf
0.0137 Tc 0 Tw (greedy) Tj
30.0163 0 TD /F4 10 Tf
-0.0142 Tc 0.548 Tw ( matching. A) Tj
-313.7851 -12.0547 TD /F7 10 Tf
0.0103 Tc 0 Tw (nongreedy) Tj
47.2546 0 TD /F4 10 Tf
0.0062 Tc 0.6146 Tw ( match will match as few characters as possible. ) Tj
-1.0158 Tc 0 Tw (Y) Tj
0.021 Tc 0.5729 Tw (ou can specify non-) Tj
ET
endstream
endobj
100 0 obj
7231
endobj
98 0 obj
<<
/Type /Page
/Parent 88 0 R
/Resources <<
/Font 101 0 R
/ProcSet 2 0 R
>>
/Contents 99 0 R
>>
endobj
101 0 obj
<<
/F0 6 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
/F7 25 0 R
/F9 32 0 R
>>
endobj
103 0 obj
<<
/Length 104 0 R
>>
stream
BT
108.96 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0369 Tc 0.0413 Tw (Advanced Regular Expressions) Tj
356.76 0 TD 0.0765 Tc 0 Tw (141) Tj
ET
108.48 701.88 0.48 0.96 re f
480.72 701.88 0.48 0.96 re f
108.96 701.88 371.76 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
553.8 746.76 0.24 0.48 re f
585 746.76 0.24 0.48 re f
554.04 746.76 30.96 0.48 re f
585 80.76 0.24 0.48 re f
554.76 80.76 0.24 0.48 re f
555 80.76 30 0.48 re f
547.8 75 0.48 0.24 re f
547.8 34.8 0.48 0.24 re f
547.8 35.04 0.48 39.96 re f
510 504 54 108 re f
510 611.76 54.24 0.48 re f
563.76 503.76 0.48 108.24 re f
509.76 503.76 54.24 0.48 re f
509.76 504 0.48 108.24 re f
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 605.52 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 602.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 598.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (.) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 595.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 592.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (A) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 583.2 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 575.28 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (v) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 568.56 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (a) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 560.64 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (n) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 553.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 545.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (e) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 538.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 530.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 526.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (T) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 521.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 514.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (l) Tj
ET
Q
BT
0.9955 0 0 0.9955 108.96 670.32 Tm
/F4 10 Tf
0.0135 Tc 1.34 Tw (greedy matching by putting a question mark after these quantifiers. Consider) Tj
0 -12.0547 TD 0.0123 Tc 0.6929 Tw (the pattern to match "one or more of not-a-newline followed by a newline." The) Tj
T* 0.016 Tc 0.0097 Tw (not-a-newline must be explicit with the greedy quantifie) Tj
-0.9461 Tc 0 Tw (r) Tj
0.0088 Tc -0.0175 Tw (, as in:) Tj
ET
BT
144.96 633 TD
/F5 9 Tf
0 Tc 0 Tw ([^\\n]+\\n) Tj
ET
BT
0.9955 0 0 0.9955 132.96 619.32 Tm
/F4 10 Tf
0.0134 Tc -0.0221 Tw (Otherwise, if the pattern were just) Tj
ET
BT
144.96 606 TD
/F5 9 Tf
0 Tc 0 Tw (.+\\n) Tj
ET
BT
0.9955 0 0 0.9955 108.96 592.32 Tm
/F4 10 Tf
0.0171 Tc 0.9686 Tw (then the "." could well match newlines, so the pattern would greedily consume) Tj
0 -12.0547 TD 0.0148 Tc 0.0506 Tw (everything until the very last newline in the input. A nongreedy match would be) Tj
T* 0.0165 Tc -0.0052 Tw (satisfied with the very first newline instead:) Tj
ET
BT
144.96 555 TD
/F5 9 Tf
0 Tc 0 Tw (.+?\\n) Tj
ET
BT
0.9955 0 0 0.9955 132.96 541.32 Tm
/F4 10 Tf
0.0148 Tc 0.1846 Tw (By using the nongreedy quantifier we\222ve cut the pattern from eight charac-) Tj
-24.1095 -12.0547 TD 0.0157 Tc 0.671 Tw (ters to five. Another example that is shorter with a nongreedy quantifier is the) Tj
0 -12.0547 TD 0.0197 Tc 1.0565 Tw (HTML example from page 138. The following pattern also matches everything) Tj
T* 0.0139 Tc 0.0979 Tw (between ) Tj
ET
BT
150.12 505.32 TD
/F5 9 Tf
-0.03 Tc 0 Tw () Tj
ET
BT
0.9955 0 0 0.9955 171.72 505.32 Tm
/F4 10 Tf
0.0205 Tc 0.031 Tw ( and ) Tj
ET
BT
194.64 505.32 TD
/F5 9 Tf
-0.024 Tc 0 Tw ( | ) Tj
ET
BT
0.9955 0 0 0.9955 221.64 505.32 Tm
/F4 10 Tf
-0.0087 Tc (:) Tj
ET
BT
144.96 492 TD
/F5 9 Tf
-0.0086 Tc (\(.*?\) | ) Tj
ET
BT
0.9955 0 0 0.9955 132.96 478.32 Tm
/F4 10 Tf
0.0394 Tc 0.9161 Tw (Even ) Tj
ET
BT
160.56 478.32 TD
/F5 9 Tf
0 Tc 0 Tw (?) Tj
ET
BT
0.9955 0 0 0.9955 165.84 478.32 Tm
/F4 10 Tf
0.0187 Tc 1.0574 Tw ( can be made nongreed) Tj
-1.2738 Tc 0 Tw (y) Tj
-0.0087 Tc 1.085 Tw (, ) Tj
ET
BT
286.44 478.32 TD
/F5 9 Tf
0 Tc 0 Tw (??) Tj
ET
BT
0.9955 0 0 0.9955 297.24 478.32 Tm
/F4 10 Tf
0.0127 Tc 1.0462 Tw (, which means it prefers to match zero) Tj
-189.139 -12.0547 TD 0.0132 Tc -0.1597 Tw (instead of one. This only makes sense inside the context of a larger pattern. Send) Tj
0 -12.0547 TD 0.0193 Tc -0.0281 Tw (me e-mail if you have a compelling example for it!) Tj
24.1095 -30.1369 TD /F2 10 Tf
0.0237 Tc -0.0525 Tw (Bound Quantifiers) Tj
0 -18.0821 TD /F4 10 Tf
0.0176 Tc 0.0941 Tw (The ) Tj
ET
BT
153.6 406.32 TD
/F5 9 Tf
0 Tc 0 Tw ({m,n}) Tj
ET
BT
0.9955 0 0 0.9955 180.6 406.32 Tm
/F4 10 Tf
0.0201 Tc 0.0314 Tw ( syntax is a quantifier that means match at least ) Tj
ET
BT
409.56 406.32 TD
/F5 9 Tf
0 Tc 0 Tw (m) Tj
ET
BT
0.9955 0 0 0.9955 414.96 406.32 Tm
/F4 10 Tf
0.0147 Tc 0.067 Tw ( and at most ) Tj
ET
BT
475.56 406.32 TD
/F5 9 Tf
0 Tc 0 Tw (n) Tj
ET
BT
0.9955 0 0 0.9955 108.96 394.32 Tm
/F4 10 Tf
0.0187 Tc -0.0181 Tw (of the previous matching item. There are two variations on this syntax. A simple) Tj
ET
BT
108.96 382.32 TD
/F5 9 Tf
0 Tc 0 Tw ({m}) Tj
ET
BT
0.9955 0 0 0.9955 125.16 382.32 Tm
/F4 10 Tf
0.0187 Tc -0.2685 Tw ( means match exactly ) Tj
ET
BT
227.16 382.32 TD
/F5 9 Tf
0 Tc 0 Tw (m) Tj
ET
BT
0.9955 0 0 0.9955 232.44 382.32 Tm
/F4 10 Tf
0.0186 Tc -0.2513 Tw ( of the previous matching item. A ) Tj
ET
BT
387.36 382.32 TD
/F5 9 Tf
0 Tc 0 Tw ({m,}) Tj
ET
BT
0.9955 0 0 0.9955 408.96 382.32 Tm
/F4 10 Tf
0.0203 Tc -0.2701 Tw ( means match ) Tj
ET
BT
475.56 382.32 TD
/F5 9 Tf
0 Tc 0 Tw (m) Tj
ET
BT
0.9955 0 0 0.9955 108.96 370.32 Tm
/F4 10 Tf
0.017 Tc 0.9386 Tw (or more of the previous matching item. All of these can be made nongreedy by) Tj
0 -12.0547 TD 0.0162 Tc 0.0052 Tw (adding a ? after them.) Tj
24.1095 -30.1369 TD /F2 10 Tf
0.0174 Tc -0.0461 Tw (Back References) Tj
0 -18.0821 TD /F4 10 Tf
0.0148 Tc 2.4878 Tw (A back reference is a feature you cannot easily get with basic regular) Tj
-24.1095 -12.0547 TD 0.0139 Tc 0.7774 Tw (expressions. A back reference matches the value of a subpattern captured with) Tj
0 -12.0547 TD 0.0098 Tc 0.1947 Tw (parentheses. If you have several sets of parentheses you can refer back to differ-) Tj
T* 0.0176 Tc -0.0799 Tw (ent captured expressions with \\1, \\2, and so on. ) Tj
-0.0152 Tc -0.0658 Tw (You count by left parentheses to) Tj
T* 0.0037 Tc 0.0479 Tw (determine the reference.) Tj
24.1095 -12.0547 TD -0.0021 Tc -0.192 Tw (For example, suppose you want to match a quoted string, where you can use) Tj
-24.1095 -12.0547 TD 0.0042 Tc 0.397 Tw (either single or double quotes. ) Tj
-0.0022 Tc 0.3686 Tw (You need to use an alternation of two patterns to) Tj
0 -12.0547 TD 0.0194 Tc -0.0282 Tw (match strings that are enclosed in double quotes or in single quotes:) Tj
ET
BT
144.96 213 TD
/F5 9 Tf
-0.0071 Tc 0 Tw (\("[^"]*"|\222[^\222]*\222\)) Tj
ET
BT
0.9955 0 0 0.9955 132.96 199.32 Tm
/F4 10 Tf
0 Tc -0.0087 Tw (With a back reference, ) Tj
ET
BT
239.16 199.32 TD
/F5 9 Tf
0 Tc 0 Tw (\\1) Tj
ET
BT
0.9955 0 0 0.9955 249.96 199.32 Tm
/F4 10 Tf
0.0223 Tc -0.031 Tw (, the pattern becomes simpler:) Tj
ET
BT
144.96 186 TD
/F5 9 Tf
0 Tc 0 Tw (\(\222|"\).*?\\1) Tj
ET
BT
0.9955 0 0 0.9955 132.96 172.32 Tm
/F4 10 Tf
0.0176 Tc 1.7015 Tw (The first set of parenthesis matches the leading quote, and then the \\1) Tj
-24.1095 -12.0547 TD 0.0108 Tc 0.2216 Tw (refers back to that particular quote characte) Tj
-0.9461 Tc 0 Tw (r) Tj
0.014 Tc 0.2184 Tw (. The nongreedy quantifier ensures) Tj
0 -12.0547 TD 0.0134 Tc -0.002 Tw (that the pattern matches up to the first occurrence of the matching quote.) Tj
ET
endstream
endobj
104 0 obj
8470
endobj
102 0 obj
<<
/Type /Page
/Parent 88 0 R
/Resources <<
/Font <<
/F0 6 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
>>
/ProcSet 2 0 R
>>
/Contents 103 0 R
>>
endobj
106 0 obj
<<
/Length 107 0 R
>>
stream
BT
114 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0365 Tc -0.0782 Tw (142 ) Tj
256.92 0 TD 0.03 Tc 0.0483 Tw (Regular Expressions) Tj
73.8 0 TD 0.0261 Tc 0.0282 Tw ( Chap. 11) Tj
ET
113.52 701.88 0.48 0.96 re f
486 701.88 0.48 0.96 re f
114 701.88 372 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
554.76 746.76 0.24 0.48 re f
584.04 746.76 0.24 0.48 re f
555 746.76 29.04 0.48 re f
585 80.76 0.24 0.48 re f
553.8 80.76 0.24 0.48 re f
554.04 80.76 30.96 0.48 re f
548.76 69.96 0.48 0.24 re f
548.76 33.72 0.48 0.24 re f
548.76 33.96 0.48 36 re f
BT
0.9955 0 0 0.9955 138 670.32 Tm
/F2 10 Tf
0.0244 Tc 0 Tw (Look-ahead) Tj
0 -18.0821 TD /F4 10 Tf
0.0161 Tc 0.8069 Tw (Look-ahead patterns are subexpressions that are matched but do not con-) Tj
-24.1095 -12.0547 TD 0.0129 Tc 0.6454 Tw (sume any of the input. They act like constraints on the rest of the pattern, and) Tj
0 -12.0547 TD 0.0177 Tc 0.3445 Tw (they typically occur at the end of your pattern. A positive look-ahead causes the) Tj
T* 0.0067 Tc 0.4112 Tw (pattern to match if it also matches. A negative look-ahead causes the pattern to) Tj
T* 0.0153 Tc -0.2221 Tw (match if it would not match. These constraints make more sense in the context of) Tj
T* 0.0148 Tc -0.2164 Tw (matching variables and in regular expression substitutions done with the ) Tj
ET
BT
453.6 592.32 TD
/F5 9 Tf
0 Tc 0 Tw (regsub) Tj
ET
BT
0.9955 0 0 0.9955 114 580.32 Tm
/F4 10 Tf
0.0231 Tc 1.4147 Tw (command. ) Tj
-0 Tc 1.5453 Tw (For example, the following pattern matches a filename that begins) Tj
0 -12.0547 TD 0.0089 Tc -0.0176 Tw (with ) Tj
ET
BT
137.64 568.32 TD
/F5 9 Tf
0 Tc 0 Tw (A) Tj
ET
BT
0.9955 0 0 0.9955 143.04 568.32 Tm
/F4 10 Tf
0.0059 Tc 0.0457 Tw ( and ends with ) Tj
ET
BT
213.96 568.32 TD
/F5 9 Tf
0 Tc 0 Tw (.txt) Tj
-63.96 -13.32 TD -0.012 Tc (^A.*\\.txt$) Tj
ET
BT
0.9955 0 0 0.9955 138 541.32 Tm
/F4 10 Tf
0.0124 Tc 1.4053 Tw (The next version of the pattern adds parentheses to group the file name) Tj
-24.1095 -12.0547 TD 0.014 Tc -0.0227 Tw (suffix. ) Tj
ET
BT
150 516 TD
/F5 9 Tf
-0.01 Tc 0 Tw (^A.*\(\\.txt\)$) Tj
ET
BT
0.9955 0 0 0.9955 138 502.32 Tm
/F4 10 Tf
0.023 Tc 0.354 Tw (The parentheses are not strictly necessar) Tj
-1.2738 Tc 0 Tw (y) Tj
0.0138 Tc 0.4195 Tw (, but they are introduced so that) Tj
-24.1095 -12.0547 TD 0.0225 Tc -0.1174 Tw (we can compare the pattern to one that uses look-ahead. A version of the pattern) Tj
0 -12.0547 TD 0.0151 Tc 0 Tw (that uses look-ahead looks like this:) Tj
ET
BT
150 465 TD
/F5 9 Tf
-0.0086 Tc 0 Tw (^A.*\(?=\\.txt\)$) Tj
ET
BT
0.9955 0 0 0.9955 138 451.32 Tm
/F4 10 Tf
0.0165 Tc 1.4213 Tw (The pattern with the look-ahead constraint matches only the part of the) Tj
-24.1095 -12.0547 TD 0.0202 Tc -0.1897 Tw (filename before the ) Tj
ET
BT
205.32 439.32 TD
/F5 9 Tf
0 Tc 0 Tw (.txt) Tj
ET
BT
0.9955 0 0 0.9955 226.92 439.32 Tm
/F4 10 Tf
0.0149 Tc -0.1683 Tw (, but only if the ) Tj
ET
BT
299.4 439.32 TD
/F5 9 Tf
0 Tc 0 Tw (.txt) Tj
ET
BT
0.9955 0 0 0.9955 321 439.32 Tm
/F4 10 Tf
0.0028 Tc -0.132 Tw ( is present. In other words, the ) Tj
ET
BT
464.4 439.32 TD
/F5 9 Tf
0 Tc 0 Tw (.txt) Tj
ET
BT
0.9955 0 0 0.9955 114 427.32 Tm
/F4 10 Tf
0.0148 Tc 0.5229 Tw (is not consumed by the match. This is visible in the value of the matching vari-) Tj
0 -12.0547 TD 0.0165 Tc 0.035 Tw (ables used with the ) Tj
ET
BT
206.52 415.32 TD
/F5 9 Tf
0 Tc 0 Tw (regexp) Tj
ET
BT
0.9955 0 0 0.9955 238.92 415.32 Tm
/F4 10 Tf
0.0178 Tc 0.0337 Tw ( command. It would also affect the substitutions done) Tj
-125.4899 -12.0547 TD 0.0159 Tc -0.0247 Tw (in the ) Tj
ET
BT
143.76 403.32 TD
/F5 9 Tf
0 Tc 0 Tw (regsub) Tj
ET
BT
0.9955 0 0 0.9955 176.16 403.32 Tm
/F4 10 Tf
0.0231 Tc -0.0319 Tw ( command.) Tj
-38.3341 -12.0547 TD 0.0158 Tc 0.0236 Tw (There is negative look-ahead too. The following pattern matches a filename) Tj
-24.1095 -12.0547 TD 0.0206 Tc -0.0294 Tw (that begins with ) Tj
ET
BT
192.48 379.32 TD
/F5 9 Tf
0 Tc 0 Tw (A) Tj
ET
BT
0.9955 0 0 0.9955 197.88 379.32 Tm
/F4 10 Tf
0.0172 Tc -0.0058 Tw ( and does not end with ) Tj
ET
BT
305.04 379.32 TD
/F5 9 Tf
0 Tc 0 Tw (.txt) Tj
ET
BT
0.9955 0 0 0.9955 326.64 379.32 Tm
/F4 10 Tf
-0.0087 Tc (.) Tj
ET
BT
150 366 TD
/F5 9 Tf
-0.0086 Tc (^A.*\(?!\\.txt\)$) Tj
ET
BT
0.9955 0 0 0.9955 114 352.32 Tm
/F4 10 Tf
0.0147 Tc -0.0234 Tw (Writing this pattern without negative look-ahead is awkward.) Tj
24.1095 -30.1369 TD /F2 10 Tf
0.0208 Tc -0.0496 Tw (Character Codes) Tj
0 -18.0821 TD /F4 10 Tf
0.0176 Tc 0.4558 Tw (The ) Tj
ET
BT
159 304.32 TD
/F5 9 Tf
0 Tc 0 Tw (\\) Tj
5.4 0 TD /F9 9 Tf
(nn) Tj
ET
BT
0.9955 0 0 0.9955 175.2 304.32 Tm
/F4 10 Tf
0.0205 Tc 0.3927 Tw ( and ) Tj
ET
BT
198.96 304.32 TD
/F5 9 Tf
0 Tc 0 Tw (\\) Tj
5.4 0 TD /F9 9 Tf
(mmm) Tj
ET
BT
0.9955 0 0 0.9955 220.56 304.32 Tm
/F4 10 Tf
0.0112 Tc 0.4623 Tw ( syntax, where ) Tj
ET
BT
292.2 304.32 TD
/F9 9 Tf
0 Tc 0 Tw (n) Tj
ET
BT
0.9955 0 0 0.9955 297.6 304.32 Tm
/F4 10 Tf
0.0205 Tc 0.4529 Tw ( and ) Tj
ET
BT
321.48 304.32 TD
/F9 9 Tf
0 Tc 0 Tw (m) Tj
ET
BT
0.9955 0 0 0.9955 326.88 304.32 Tm
/F4 10 Tf
0.0086 Tc 0.4477 Tw ( are digits, can also mean an 8-bit) Tj
-213.8512 -12.0547 TD 0.0154 Tc -0.2653 Tw (character code corresponding to the octal value ) Tj
ET
BT
331.8 292.32 TD
/F9 9 Tf
0 Tc 0 Tw (nn) Tj
ET
BT
0.9955 0 0 0.9955 342.6 292.32 Tm
/F4 10 Tf
0.0395 Tc -0.2894 Tw ( or ) Tj
ET
BT
357.12 292.32 TD
/F9 9 Tf
-0.04 Tc 0 Tw (mmm) Tj
ET
BT
0.9955 0 0 0.9955 373.32 292.32 Tm
/F4 10 Tf
0.0201 Tc -0.2699 Tw (. This has priority over a) Tj
-260.5031 -12.0547 TD 0.0057 Tc 1.3116 Tw (back reference. Howeve) Tj
-0.9461 Tc 0 Tw (r) Tj
0.008 Tc 1.3361 Tw (, I just wouldn\222t use this notation for character codes.) Tj
0 -12.0547 TD 0.0098 Tc -0.119 Tw (Instead, use the Unicode escape sequence, ) Tj
ET
BT
310.68 268.32 TD
/F5 9 Tf
0 Tc 0 Tw (\\u) Tj
10.8 0 TD /F9 9 Tf
(nnnn) Tj
ET
BT
0.9955 0 0 0.9955 343.08 268.32 Tm
/F4 10 Tf
0.0083 Tc -0.1376 Tw (, which specifies a 16-bit value.) Tj
-230.1252 -12.0547 TD 0.0176 Tc 0.8174 Tw (The ) Tj
ET
BT
135.48 256.32 TD
/F5 9 Tf
0 Tc 0 Tw (\\x) Tj
10.68 0 TD /F9 9 Tf
(nn) Tj
ET
BT
0.9955 0 0 0.9955 156.96 256.32 Tm
/F4 10 Tf
0.0138 Tc 0.8815 Tw ( sequence also specifies an 8-bit character code. Unfortunatel) Tj
-1.1533 Tc 0 Tw (y) Tj
-0.0169 Tc 0.9727 Tw (, the ) Tj
ET
BT
475.2 256.32 TD
/F5 9 Tf
0 Tc 0 Tw (\\x) Tj
ET
BT
0.9955 0 0 0.9955 114 244.32 Tm
/F4 10 Tf
0.0208 Tc 1.5839 Tw (escape consumes all hex digits after it \(not just two!\) and then truncates the) Tj
0 -12.0547 TD 0.0156 Tc 0.4712 Tw (hexadecimal value down to 8 bits. This misfeature of ) Tj
ET
BT
364.2 232.32 TD
/F5 9 Tf
0 Tc 0 Tw (\\x) Tj
ET
BT
0.9955 0 0 0.9955 375 232.32 Tm
/F4 10 Tf
0.0168 Tc 0.5049 Tw ( is not considered a bug) Tj
-262.1908 -12.0547 TD 0.0144 Tc 0.001 Tw (and will probably not change even in future versions of Tcl.) Tj
24.1095 -12.0547 TD 0.0176 Tc 0.3352 Tw (The ) Tj
ET
BT
158.88 208.32 TD
/F5 9 Tf
0 Tc 0 Tw (\\U) Tj
10.8 0 TD /F9 9 Tf
-0.015 Tc (yyyyyyyy) Tj
ET
BT
0.9955 0 0 0.9955 212.76 208.32 Tm
/F4 10 Tf
0.0152 Tc 0.3267 Tw ( syntax is reserved for 32-bit Unicode, but I don\222t expect to) Tj
-99.2106 -12.0547 TD 0.017 Tc 0.0044 Tw (see that implemented anytime soon.) Tj
24.1095 -30.1369 TD /F2 10 Tf
0.0186 Tc -0.0474 Tw (Collating Elements) Tj
0 -18.0821 TD /F4 10 Tf
0.0174 Tc -0.2563 Tw (Collating elements are characters or long names for characters that you can) Tj
-24.1095 -12.0547 TD 0.0116 Tc 1.0646 Tw (use inside character sets. Currentl) Tj
-1.2738 Tc 0 Tw (y) Tj
0.0121 Tc 1.1093 Tw (, Tcl only has some long names for various) Tj
ET
endstream
endobj
107 0 obj
8122
endobj
105 0 obj
<<
/Type /Page
/Parent 88 0 R
/Resources <<
/Font <<
/F0 6 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
/F9 32 0 R
>>
/ProcSet 2 0 R
>>
/Contents 106 0 R
>>
endobj
110 0 obj
<<
/Length 111 0 R
>>
stream
BT
108.96 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0369 Tc 0.0413 Tw (Advanced Regular Expressions) Tj
356.76 0 TD 0.0765 Tc 0 Tw (143) Tj
ET
108.48 701.88 0.48 0.96 re f
480.72 701.88 0.48 0.96 re f
108.96 701.88 371.76 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
553.8 746.76 0.24 0.48 re f
585 746.76 0.24 0.48 re f
554.04 746.76 30.96 0.48 re f
585 80.76 0.24 0.48 re f
554.76 80.76 0.24 0.48 re f
555 80.76 30 0.48 re f
547.8 75 0.48 0.24 re f
547.8 34.8 0.48 0.24 re f
547.8 35.04 0.48 39.96 re f
510 504 54 108 re f
510 611.76 54.24 0.48 re f
563.76 503.76 0.48 108.24 re f
509.76 503.76 54.24 0.48 re f
509.76 504 0.48 108.24 re f
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 605.52 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 602.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 598.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (.) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 595.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 592.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (A) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 583.2 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 575.28 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (v) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 568.56 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (a) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 560.64 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (n) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 553.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 545.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (e) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 538.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 530.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 526.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (T) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 521.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 514.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (l) Tj
ET
Q
BT
0.9955 0 0 0.9955 108.96 670.32 Tm
/F4 10 Tf
0.0058 Tc -0.0145 Tw (ASCII punctuation characters. Potentiall) Tj
-1.2738 Tc 0 Tw (y) Tj
0.0188 Tc 0.0241 Tw (, it could support names for every Uni-) Tj
0 -12.0547 TD 0.012 Tc 1.1847 Tw (code characte) Tj
-0.9461 Tc 0 Tw (r) Tj
0.0093 Tc 1.2204 Tw (, but it doesn\222t because the mapping tables would be huge. This) Tj
T* 0.0149 Tc -0.1602 Tw (section will briefly mention the syntax so that you can understand it if you see it.) Tj
T* 0.0142 Tc 0.0012 Tw (But its usefulness is still limited.) Tj
24.1095 -12.0547 TD 0.0117 Tc 0.06 Tw (Within a bracketed expression, the following syntax is used to specify a col-) Tj
-24.1095 -12.0547 TD 0.0218 Tc -0.0306 Tw (lating element:) Tj
ET
BT
144.96 597 TD
/F5 9 Tf
0 Tc 0 Tw ([.) Tj
10.8 0 TD /F9 9 Tf
-0.012 Tc (identifier) Tj
54 0 TD /F5 9 Tf
0 Tc (.]) Tj
ET
BT
0.9955 0 0 0.9955 132.96 583.32 Tm
/F4 10 Tf
0.0167 Tc -0.1274 Tw (The identifier can be a character or a long name. The supported long names) Tj
-24.1095 -12.0547 TD 0.0171 Tc 0.4563 Tw (can be found in the ) Tj
ET
BT
202.32 571.32 TD
/F5 9 Tf
-0.0057 Tc 0 Tw (generic/regc_locale.c) Tj
ET
BT
0.9955 0 0 0.9955 315.6 571.32 Tm
/F4 10 Tf
0.0141 Tc 0.4422 Tw ( file in the Tcl source code distribu-) Tj
-207.5828 -12.0547 TD 0.0182 Tc -0.0068 Tw (tion. A few examples are shown below:) Tj
ET
BT
144.96 546 TD
/F5 9 Tf
0 Tc 0 Tw ([.c.]) Tj
0 -12.96 TD ([.#.]) Tj
0 -13.08 TD -0.008 Tc ([.number-sign.]) Tj
ET
BT
0.9955 0 0 0.9955 132.96 490.32 Tm
/F2 10 Tf
0.0198 Tc -0.0485 Tw (Equivalence Classes) Tj
0 -18.0821 TD /F4 10 Tf
0.0161 Tc 0.04 Tw (An equivalence class is all characters that sort to the same position. This is) Tj
-24.1095 -12.0547 TD 0.0139 Tc 0.339 Tw (another feature that has limited usefulness in the current version of Tcl. In Tcl,) Tj
0 -12.0547 TD 0.012 Tc 1.6341 Tw (characters sort by their Unicode character value, so there are no equivalence) Tj
T* 0.0206 Tc 1.9339 Tw (classes that contain more than one character! Howeve) Tj
-0.9461 Tc 0 Tw (r) Tj
0.0227 Tc 1.9275 Tw (, you could imagine a) Tj
T* 0.0087 Tc 0.3959 Tw (character class for \222o\222, \222\362\222, and other accented versions of the letter o. The syntax) Tj
T* 0.015 Tc -0.0037 Tw (for equivalence classes within bracketed expressions is:) Tj
ET
BT
144.96 399 TD
/F5 9 Tf
0 Tc 0 Tw ([=) Tj
10.8 0 TD /F9 9 Tf
(char) Tj
21.6 0 TD /F5 9 Tf
(=]) Tj
ET
BT
0.9955 0 0 0.9955 108.96 385.32 Tm
/F4 10 Tf
0.0213 Tc 1.296 Tw (where ) Tj
ET
BT
141.36 385.32 TD
/F9 9 Tf
0 Tc 0 Tw (char) Tj
ET
BT
0.9955 0 0 0.9955 162.96 385.32 Tm
/F4 10 Tf
0.0101 Tc 1.3164 Tw ( is any one of the characters in the character class. This syntax is) Tj
-54.2464 -12.0547 TD 0.0092 Tc 0.0223 Tw (valid only inside a character class definition.) Tj
24.1095 -30.1369 TD /F2 10 Tf
0.0184 Tc 0.0132 Tw (Newline Sensitive Matching) Tj
0 -18.0821 TD /F4 10 Tf
0.0168 Tc 2.7032 Tw (By default, the newline character is just an ordinary character to the) Tj
-24.1095 -12.0547 TD 0.005 Tc 0.4685 Tw (matching engine. ) Tj
-0.0048 Tc 0.5319 Tw (You can make the newline character special with two options:) Tj
ET
BT
108.96 301.32 TD
/F5 9 Tf
0 Tc 0 Tw (lineanchor) Tj
ET
BT
0.9955 0 0 0.9955 162.96 301.32 Tm
/F4 10 Tf
0.0205 Tc -0.2703 Tw ( and ) Tj
ET
BT
185.52 301.32 TD
/F5 9 Tf
-0.03 Tc 0 Tw (linestop) Tj
ET
BT
0.9955 0 0 0.9955 228.48 301.32 Tm
/F4 10 Tf
-0 Tc -0.2253 Tw (. You can set these options with flags to the ) Tj
ET
BT
428.64 301.32 TD
/F5 9 Tf
0 Tc 0 Tw (regexp) Tj
ET
BT
0.9955 0 0 0.9955 461.04 301.32 Tm
/F4 10 Tf
0.0205 Tc -0.2703 Tw ( and) Tj
ET
BT
108.96 289.32 TD
/F5 9 Tf
0 Tc 0 Tw (regsub) Tj
ET
BT
0.9955 0 0 0.9955 141.36 289.32 Tm
/F4 10 Tf
0.0145 Tc 1.0315 Tw ( Tcl commands, or you can use the embedded options described later in) Tj
-32.5478 -12.0547 TD -0.0026 Tc -0.0061 Tw (Table 11\2265 on page 147.) Tj
24.1095 -12.0547 TD 0.0176 Tc 1.2996 Tw (The ) Tj
ET
BT
154.8 265.32 TD
/F5 9 Tf
-0.012 Tc 0 Tw (lineanchor) Tj
ET
BT
0.9955 0 0 0.9955 208.68 265.32 Tm
/F4 10 Tf
0.0145 Tc 1.2726 Tw ( option makes the ) Tj
ET
BT
298.68 265.32 TD
/F5 9 Tf
0 Tc 0 Tw (^) Tj
ET
BT
0.9955 0 0 0.9955 304.08 265.32 Tm
/F4 10 Tf
0.0205 Tc 1.2365 Tw ( and ) Tj
ET
BT
329.52 265.32 TD
/F5 9 Tf
0 Tc 0 Tw ($) Tj
ET
BT
0.9955 0 0 0.9955 334.92 265.32 Tm
/F4 10 Tf
0.0115 Tc 1.2576 Tw ( anchors work relative to new-) Tj
-226.9909 -12.0547 TD -0.0073 Tc 1.0836 Tw (lines. The ) Tj
ET
BT
159 253.32 TD
/F5 9 Tf
0 Tc 0 Tw (^) Tj
ET
BT
0.9955 0 0 0.9955 164.4 253.32 Tm
/F4 10 Tf
0.0114 Tc 1.082 Tw ( matches immediately after a newline, and ) Tj
ET
BT
371.76 253.32 TD
/F5 9 Tf
0 Tc 0 Tw ($) Tj
ET
BT
0.9955 0 0 0.9955 377.04 253.32 Tm
/F4 10 Tf
0.0181 Tc 1.0581 Tw ( matches immediately) Tj
-269.3031 -12.0547 TD 0.0149 Tc -0.135 Tw (before a newline. These anchors continue to match the very beginning and end of) Tj
0 -12.0547 TD 0.0043 Tc 0.4348 Tw (the input, too. With or without the ) Tj
ET
BT
273.72 229.32 TD
/F5 9 Tf
-0.012 Tc 0 Tw (lineanchor) Tj
ET
BT
0.9955 0 0 0.9955 327.6 229.32 Tm
/F4 10 Tf
0.0155 Tc 0.4338 Tw ( option, you can use ) Tj
ET
BT
423.6 229.32 TD
/F5 9 Tf
-0.06 Tc 0 Tw (\\A) Tj
ET
BT
0.9955 0 0 0.9955 434.4 229.32 Tm
/F4 10 Tf
0.0205 Tc 0.4529 Tw ( and ) Tj
ET
BT
458.16 229.32 TD
/F5 9 Tf
0 Tc 0 Tw (\\Z) Tj
ET
BT
0.9955 0 0 0.9955 468.96 229.32 Tm
/F4 10 Tf
0.0132 Tc 0.3397 Tw ( to) Tj
-361.6425 -12.0547 TD 0.0123 Tc -0.021 Tw (match the beginning and end of the string.) Tj
24.1095 -12.0547 TD 0.0176 Tc 0.5763 Tw (The ) Tj
ET
BT
154.08 205.32 TD
/F5 9 Tf
0 Tc 0 Tw (linestop) Tj
ET
BT
0.9955 0 0 0.9955 197.28 205.32 Tm
/F4 10 Tf
0.0152 Tc 0.5386 Tw ( option prevents ) Tj
ET
BT
276.24 205.32 TD
/F5 9 Tf
0 Tc 0 Tw (.) Tj
ET
BT
0.9955 0 0 0.9955 281.64 205.32 Tm
/F4 10 Tf
0.0122 Tc 0.5474 Tw ( \(i.e., period\) and character sets that begin) Tj
-173.4678 -12.0547 TD 0.0089 Tc 0.5851 Tw (with ) Tj
ET
BT
133.2 193.32 TD
/F5 9 Tf
0 Tc 0 Tw (^) Tj
ET
BT
0.9955 0 0 0.9955 138.6 193.32 Tm
/F4 10 Tf
0.01 Tc 0.584 Tw ( from matching a newline characte) Tj
-0.9461 Tc 0 Tw (r) Tj
0.007 Tc 0.567 Tw (. In other words, unless you explicitly) Tj
-29.7752 -12.0547 TD 0.0054 Tc -0.0141 Tw (include ) Tj
ET
BT
145.44 181.32 TD
/F5 9 Tf
0 Tc 0 Tw (\\n) Tj
ET
BT
0.9955 0 0 0.9955 156.12 181.32 Tm
/F4 10 Tf
0.0096 Tc 0.0085 Tw ( in your pattern, it will not match across newlines.) Tj
ET
endstream
endobj
111 0 obj
9197
endobj
108 0 obj
<<
/Type /Page
/Parent 109 0 R
/Resources <<
/Font <<
/F0 6 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
/F9 32 0 R
>>
/ProcSet 2 0 R
>>
/Contents 110 0 R
>>
endobj
113 0 obj
<<
/Length 114 0 R
>>
stream
BT
114 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0365 Tc -0.0782 Tw (144 ) Tj
256.92 0 TD 0.03 Tc 0.0483 Tw (Regular Expressions) Tj
73.8 0 TD 0.0261 Tc 0.0282 Tw ( Chap. 11) Tj
ET
113.52 701.88 0.48 0.96 re f
486 701.88 0.48 0.96 re f
114 701.88 372 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
554.76 746.76 0.24 0.48 re f
584.04 746.76 0.24 0.48 re f
555 746.76 29.04 0.48 re f
585 80.76 0.24 0.48 re f
553.8 80.76 0.24 0.48 re f
554.04 80.76 30.96 0.48 re f
548.76 69.96 0.48 0.24 re f
548.76 33.72 0.48 0.24 re f
548.76 33.96 0.48 36 re f
BT
0.9955 0 0 0.9955 138 670.32 Tm
/F2 10 Tf
0.0222 Tc -0.051 Tw (Embedded Options) Tj
0 -18.0821 TD /F4 10 Tf
-1.0158 Tc 0 Tw (Y) Tj
0.028 Tc 0.2387 Tw (ou can start a pattern with embedded options to turn on or off case sensi-) Tj
-24.1095 -12.0547 TD 0.014 Tc 0 Tw (tivit) Tj
-1.2738 Tc (y) Tj
0.0137 Tc 0.8214 Tw (, newline sensitivit) Tj
-1.1533 Tc 0 Tw (y) Tj
0.0149 Tc 0.8202 Tw (, and expanded syntax, which is explained in the next) Tj
0 -12.0547 TD 0.0079 Tc -0.2577 Tw (section. ) Tj
-1.0158 Tc 0 Tw (Y) Tj
0.0124 Tc -0.2951 Tw (ou can also switch from advanced regular expressions to a literal string,) Tj
T* 0.0122 Tc 0.001 Tw (or to older forms of regular expressions. The syntax is a leading:) Tj
ET
BT
150 603 TD
/F5 9 Tf
0 Tc 0 Tw (\(?) Tj
10.8 0 TD /F9 9 Tf
-0.024 Tc (chars) Tj
27 0 TD /F5 9 Tf
0 Tc (\)) Tj
ET
BT
0.9955 0 0 0.9955 114 589.32 Tm
/F4 10 Tf
0.0213 Tc -0.1506 Tw (where ) Tj
ET
BT
144.96 589.32 TD
/F9 9 Tf
0 Tc 0 Tw (chars) Tj
ET
BT
0.9955 0 0 0.9955 171.96 589.32 Tm
/F4 10 Tf
0.015 Tc -0.1333 Tw ( is any number of option characters. The option characters are listed) Tj
-58.2244 -12.0547 TD 0.009 Tc -0.0177 Tw (in ) Tj
-0.0026 Tc -0.0061 Tw (Table 11\2265 on page 147.) Tj
24.1095 -30.1369 TD /F2 10 Tf
0.0183 Tc -0.047 Tw (Expanded Syntax) Tj
0 -18.0821 TD /F4 10 Tf
0.0158 Tc 0.3152 Tw (Expanded syntax lets you include comments and extra white space in your) Tj
-24.1095 -12.0547 TD 0.0069 Tc 5.0474 Tw (patterns. This can greatly improve the readability of complex patterns.) Tj
0 -12.0547 TD 0.0177 Tc 0.9207 Tw (Expanded syntax is turned on with a ) Tj
ET
BT
293.88 505.32 TD
/F5 9 Tf
0 Tc 0 Tw (regexp) Tj
ET
BT
0.9955 0 0 0.9955 326.28 505.32 Tm
/F4 10 Tf
0.016 Tc 0.9396 Tw ( command option or an embedded) Tj
-213.2485 -12.0547 TD 0.02 Tc -0.0288 Tw (option. ) Tj
24.1095 -12.0547 TD 0.008 Tc 0.8013 Tw (Comments start with a # and run until the end of line. Extra white space) Tj
-24.1095 -12.0547 TD 0.0158 Tc 2.3194 Tw (and comments can occur anywhere except inside bracketed expressions \(i.e.,) Tj
0 -12.0547 TD 0.011 Tc 0.0557 Tw (character sets\) or within multicharacter syntax elements like ) Tj
ET
BT
400.08 457.32 TD
/F5 9 Tf
0 Tc 0 Tw (\(?=) Tj
ET
BT
0.9955 0 0 0.9955 416.28 457.32 Tm
/F4 10 Tf
0.0256 Tc 0.0058 Tw (. When you are) Tj
-303.6591 -12.0547 TD 0.0116 Tc 0.0724 Tw (in expanded mode, you can turn off the comment character or include an explicit) Tj
0 -12.0547 TD 0.0173 Tc 1.5411 Tw (space by preceding them with a backslash. Example 11\2261 shows a pattern to) Tj
T* 0.0025 Tc 0.5011 Tw (match URLs. The leading ) Tj
ET
BT
236.88 421.32 TD
/F5 9 Tf
0 Tc 0 Tw (\(?x\)) Tj
ET
BT
0.9955 0 0 0.9955 258.48 421.32 Tm
/F4 10 Tf
0.0148 Tc 0.5039 Tw ( turns on expanded syntax. The whole pattern is) Tj
-145.1392 -12.0547 TD 0.0139 Tc 0.5543 Tw (grouped in curly braces to hide it from Tcl. This example is considered again in) Tj
0 -12.0547 TD 0.0214 Tc -0.0302 Tw (more detail in Example 11\2263 on page 150:) Tj
ET
1 1 1 rg
114 363.96 372 8.04 re f
0 0 0 rg
136.8 367.8 0.24 0.48 re f
485.04 367.8 0.24 0.48 re f
137.04 367.8 348 0.48 re f
BT
138 374.64 TD
/F1 7.92 Tf
0.0054 Tc -0.0472 Tw (Example 11\226) Tj
3.9965 Tc 0 Tw (1) Tj
56.4 0 TD /F0 7.92 Tf
0.0336 Tc 0.0446 Tw (Expanded regular expressions allow comments.) Tj
-56.4 -22.68 TD /F5 9 Tf
-0.0109 Tc 0.0109 Tw (regexp {\(?x\) ) Tj
108 0 TD -0.012 Tc 0.012 Tw (# A pattern to match URLS) Tj
-72 -9.96 TD -0.015 Tc 0 Tw (\([^:]+\):) Tj
72 0 TD -0.0036 Tc -0.0364 Tw (# The protocol before the initial colon) Tj
-72 -9.96 TD -0.012 Tc 0 Tw (//\([^:/]+\)) Tj
72 0 TD 0 Tc -0.04 Tw (# The server name) Tj
-72 -10.08 TD -0.01 Tc 0 Tw (\(:\([0-9]+\)\)?) Tj
72 0 TD -0.0055 Tc -0.0245 Tw (# The optional port number) Tj
-72 -9.96 TD 0 Tc 0 Tw (\(/.*\)) Tj
72 0 TD -0.006 Tc -0.034 Tw (# The trailing pathname) Tj
ET
1 1 1 rg
114 291 372 8.04 re f
0 0 0 rg
136.8 294.72 0.24 0.48 re f
485.04 294.72 0.24 0.48 re f
137.04 294.72 348 0.48 re f
BT
138 302.04 TD
-0.0171 Tc 0.0171 Tw (} $input) Tj
ET
endstream
endobj
114 0 obj
4992
endobj
112 0 obj
<<
/Type /Page
/Parent 109 0 R
/Resources <<
/Font 115 0 R
/ProcSet 2 0 R
>>
/Contents 113 0 R
>>
endobj
115 0 obj
<<
/F0 6 0 R
/F1 7 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
/F9 32 0 R
>>
endobj
117 0 obj
<<
/Length 118 0 R
>>
stream
BT
108.96 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0451 Tc -0.0869 Tw (Syntax Summary) Tj
356.76 0 TD 0.0765 Tc 0 Tw (145) Tj
ET
108.48 701.88 0.48 0.96 re f
480.72 701.88 0.48 0.96 re f
108.96 701.88 371.76 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
553.8 746.76 0.24 0.48 re f
585 746.76 0.24 0.48 re f
554.04 746.76 30.96 0.48 re f
585 80.76 0.24 0.48 re f
554.76 80.76 0.24 0.48 re f
555 80.76 30 0.48 re f
547.8 75 0.48 0.24 re f
547.8 34.8 0.48 0.24 re f
547.8 35.04 0.48 39.96 re f
510 504 54 108 re f
510 611.76 54.24 0.48 re f
563.76 503.76 0.48 108.24 re f
509.76 503.76 54.24 0.48 re f
509.76 504 0.48 108.24 re f
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 605.52 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 602.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 598.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (.) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 595.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 592.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (A) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 583.2 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 575.28 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (v) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 568.56 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (a) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 560.64 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (n) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 553.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 545.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (e) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 538.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 530.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 526.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (T) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 521.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 514.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (l) Tj
ET
Q
BT
0.997 0 0 0.997 108.96 668.4 Tm
/F2 13 Tf
0.3032 Tc -0.0923 Tw (Syntax Summary) Tj
ET
BT
0.9955 0 0 0.9955 108.96 647.4 Tm
/F4 10 Tf
-0.0409 Tc 1.2379 Tw (Table 11\226) Tj
5.0457 Tc 0 Tw (1) Tj
0.0184 Tc 1.2185 Tw (summarizes the syntax of regular expressions available in all ver-) Tj
0 -12.0547 TD 0.0137 Tc -0.0224 Tw (sions of Tcl:) Tj
24.1095 -234.1032 TD 0.0091 Tc 0.5247 Tw (Advanced regular expressions, which were introduced in Tcl 8.1, add more) Tj
-24.1095 -12.0547 TD 0.023 Tc -0.0318 Tw (syntax that is summarized in ) Tj
-0.0353 Tc 0.0268 Tw (Table 11\2262:) Tj
ET
BT
126.96 608.64 TD
/F1 7.92 Tf
-0.0822 Tc 0.1004 Tw (Table 11\226) Tj
3.9965 Tc -3.9182 Tw (1 ) Tj
48.36 0 TD /F0 7.92 Tf
0.0333 Tc 0.005 Tw (Basic regular expression syntax.) Tj
-44.28 -16.68 TD /F5 9 Tf
0 Tc 0 Tw (.) Tj
24 0 TD /F10 9 Tf
-0.0297 Tc 0.0597 Tw (Matches any character.) Tj
-24 -16.92 TD /F5 9 Tf
0 Tc 0 Tw (*) Tj
24 0 TD /F10 9 Tf
-0.0059 Tc 0.0093 Tw (Matches zero or more instances of the previous pattern item.) Tj
-24 -17.04 TD /F5 9 Tf
0 Tc 0 Tw (+) Tj
24 0 TD /F10 9 Tf
-0.0066 Tc 0.0233 Tw (Matches one or more instances of the previous pattern item.) Tj
-24 -17.04 TD /F5 9 Tf
0 Tc 0 Tw (?) Tj
24 0 TD /F10 9 Tf
-0.0065 Tc 0.0231 Tw (Matches zero or one instances of the previous pattern item.) Tj
-24 -16.92 TD /F5 9 Tf
0 Tc -0.12 Tw (\( \)) Tj
24 0 TD /F10 9 Tf
-0.0081 Tc 0.0281 Tw (Groups a subpattern. The repetition and alternation operators apply to the preceding ) Tj
0 -10.08 TD -0.0022 Tc 0 Tw (subpattern.) Tj
-24 -16.92 TD /F5 9 Tf
0 Tc (|) Tj
24 0 TD /F10 9 Tf
-0.0038 Tc (Alternation.) Tj
-24 -17.04 TD /F5 9 Tf
0 Tc -0.12 Tw ([ ]) Tj
24 0 TD /F10 9 Tf
-0.0069 Tc 0.0236 Tw (Delimit a set of characters. Ranges are specified as [) Tj
188.16 0 TD /F11 9 Tf
-0.023 Tc 0 Tw (x-y) Tj
10.92 0 TD /F10 9 Tf
-0.009 Tc 0.0219 Tw (]. If the first character in the ) Tj
-199.08 -9.96 TD 0.0156 Tc -0.0456 Tw (set is ) Tj
20.4 0 TD /F5 9 Tf
0 Tc 0 Tw (^) Tj
5.4 0 TD /F10 9 Tf
-0.0044 Tc 0 Tw (, then there is a match if the remaining characters in the set are ) Tj
227.4 0 TD /F11 9 Tf
0.006 Tc 0 Tw (not) Tj
11.52 0 TD /F10 9 Tf
-0.0052 Tc -0.0848 Tw ( present.) Tj
-288.72 -17.04 TD /F5 9 Tf
0 Tc 0 Tw (^) Tj
24 0 TD /F10 9 Tf
-0.0013 Tc -0.0124 Tw (Anchor the pattern to the beginning of the string. Only when first.) Tj
-24 -17.04 TD /F5 9 Tf
0 Tc 0 Tw ($) Tj
24 0 TD /F10 9 Tf
-0.0055 Tc 0.0137 Tw (Anchor the pattern to the end of the string. Only when last.) Tj
-40.08 -72.24 TD /F1 7.92 Tf
-0.0822 Tc 0.1004 Tw (Table 11\226) Tj
3.9965 Tc -3.9182 Tw (2 ) Tj
48.36 0 TD /F0 7.92 Tf
0.0345 Tc -0.0162 Tw (Additional advanced regular expression syntax) Tj
2.2382 Tc 0 Tw (.) Tj
-44.28 -16.68 TD /F5 9 Tf
0 Tc ({) Tj
5.4 0 TD /F9 9 Tf
(m) Tj
5.28 0 TD /F5 9 Tf
(}) Tj
37.32 0 TD /F10 9 Tf
-0.0017 Tc 0.0317 Tw (Matches ) Tj
32.64 0 TD /F9 9 Tf
0 Tc 0 Tw (m) Tj
5.4 0 TD /F10 9 Tf
-0.0062 Tc 0.0162 Tw ( instances of the previous pattern item.) Tj
-86.04 -17.04 TD /F5 9 Tf
0 Tc 0 Tw ({) Tj
5.4 0 TD /F9 9 Tf
(m) Tj
5.28 0 TD /F5 9 Tf
(}?) Tj
37.32 0 TD /F10 9 Tf
-0.0017 Tc 0.0317 Tw (Matches ) Tj
32.64 0 TD /F9 9 Tf
0 Tc 0 Tw (m) Tj
5.4 0 TD /F10 9 Tf
-0.0042 Tc -0 Tw ( instances of the previous pattern item. Nongreed) Tj
-0.66 Tc 0 Tw (y) Tj
0.03 Tc (.) Tj
-86.04 -17.04 TD /F5 9 Tf
0 Tc ({m,}) Tj
48 0 TD /F10 9 Tf
-0.0017 Tc 0.0317 Tw (Matches ) Tj
32.64 0 TD /F9 9 Tf
0 Tc 0 Tw (m) Tj
5.4 0 TD /F10 9 Tf
-0.007 Tc 0.007 Tw ( or more instances of the previous pattern item.) Tj
-86.04 -16.92 TD /F5 9 Tf
0 Tc 0 Tw ({m,}?) Tj
48 0 TD /F10 9 Tf
-0.0017 Tc 0.0317 Tw (Matches ) Tj
32.64 0 TD /F9 9 Tf
0 Tc 0 Tw (m) Tj
5.4 0 TD /F10 9 Tf
-0.0077 Tc 0.011 Tw ( or more instances of the previous pattern item. Nongreed) Tj
-0.54 Tc 0 Tw (y) Tj
0.03 Tc (.) Tj
-86.04 -17.04 TD /F5 9 Tf
0 Tc ({m,n}) Tj
48 0 TD /F10 9 Tf
-0.0017 Tc 0.0317 Tw (Matches ) Tj
32.64 0 TD /F9 9 Tf
0 Tc 0 Tw (m) Tj
5.4 0 TD /F10 9 Tf
-0.0056 Tc -0.0244 Tw ( through ) Tj
32.4 0 TD /F9 9 Tf
0 Tc 0 Tw (n) Tj
5.4 0 TD /F10 9 Tf
0.0009 Tc -0.0309 Tw ( instances of the previous pattern item.) Tj
-123.84 -17.04 TD /F5 9 Tf
0 Tc 0 Tw ({m,n}?) Tj
48 0 TD /F10 9 Tf
-0.0017 Tc 0.0317 Tw (Matches ) Tj
32.64 0 TD /F9 9 Tf
0 Tc 0 Tw (m) Tj
5.4 0 TD /F10 9 Tf
-0.0056 Tc -0.0244 Tw ( through ) Tj
32.4 0 TD /F9 9 Tf
0 Tc 0 Tw (n) Tj
5.4 0 TD /F10 9 Tf
-0.0014 Tc -0.0201 Tw ( instances of the previous pattern item. Nongreed) Tj
-0.315 Tc 0 Tw (y.) Tj
-123.84 -16.92 TD /F5 9 Tf
0 Tc (*?) Tj
48 0 TD /F10 9 Tf
-0.0066 Tc 0.0126 Tw (Matches zero or more instances of the previous pattern item. Nongreed) Tj
-0.54 Tc 0 Tw (y) Tj
0.03 Tc (.) Tj
-48 -17.04 TD /F5 9 Tf
0 Tc (+?) Tj
48 0 TD /F10 9 Tf
-0.0051 Tc 0.0111 Tw (Matches one or more instances of the previous pattern item. Nongreed) Tj
-0.66 Tc 0 Tw (y) Tj
0.03 Tc (.) Tj
-48 -17.04 TD /F5 9 Tf
0 Tc (??) Tj
48 0 TD /F10 9 Tf
-0.005 Tc 0.011 Tw (Matches zero or one instances of the previous pattern item. Nongreed) Tj
-0.66 Tc 0 Tw (y) Tj
0.03 Tc (.) Tj
-48 -16.92 TD /F5 9 Tf
0 Tc (\(?:) Tj
16.08 0 TD /F9 9 Tf
(re) Tj
10.8 0 TD /F5 9 Tf
(\)) Tj
21.12 0 TD /F10 9 Tf
-0.0087 Tc 0.0387 Tw (Groups a subpattern, ) Tj
76.8 0 TD /F9 9 Tf
0 Tc 0 Tw (re) Tj
10.8 0 TD /F10 9 Tf
-0.003 Tc -0.007 Tw (, but does not capture the result.) Tj
-135.6 -17.04 TD /F5 9 Tf
0 Tc 0 Tw (\(?=) Tj
16.08 0 TD /F9 9 Tf
(re) Tj
10.8 0 TD /F5 9 Tf
(\)) Tj
21.12 0 TD /F10 9 Tf
-0.0027 Tc -0.0073 Tw (Positive look-ahead. Matches the point where ) Tj
166.44 0 TD /F9 9 Tf
0 Tc 0 Tw (re) Tj
10.8 0 TD /F10 9 Tf
-0.0099 Tc 0.0399 Tw ( begins.) Tj
-225.24 -17.04 TD /F5 9 Tf
0 Tc 0 Tw (\(?!) Tj
16.08 0 TD /F9 9 Tf
(re) Tj
10.8 0 TD /F5 9 Tf
(\)) Tj
21.12 0 TD /F10 9 Tf
-0.0028 Tc -0.0072 Tw (Negative look-ahead. Matches the point where ) Tj
169.92 0 TD /F9 9 Tf
0 Tc 0 Tw (re) Tj
10.8 0 TD /F10 9 Tf
-0.0159 Tc 0.0459 Tw ( does not begin.) Tj
-228.72 -16.92 TD /F5 9 Tf
0 Tc 0 Tw (\(?) Tj
10.68 0 TD /F9 9 Tf
(abc) Tj
16.2 0 TD /F5 9 Tf
(\)) Tj
21.12 0 TD /F10 9 Tf
-0.0036 Tc -0.0064 Tw (Embedded options, where ) Tj
95.76 0 TD /F9 9 Tf
0 Tc 0 Tw (abc) Tj
16.2 0 TD /F10 9 Tf
-0.0064 Tc 0.0097 Tw ( is any number of option letters listed in ) Tj
-0.1023 Tc 0.1323 Tw (Table 11\2265.) Tj
ET
126.96 601.8 336 0.48 re f
126.96 428.76 336 0.48 re f
114.96 356.76 360 0.48 re f
114.96 135.72 360 0.48 re f
endstream
endobj
118 0 obj
9262
endobj
116 0 obj
<<
/Type /Page
/Parent 109 0 R
/Resources <<
/Font 121 0 R
/ProcSet 2 0 R
>>
/Contents 117 0 R
>>
endobj
121 0 obj
<<
/F0 6 0 R
/F1 7 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
/F9 32 0 R
/F10 119 0 R
/F11 120 0 R
>>
endobj
123 0 obj
<<
/Length 124 0 R
>>
stream
BT
114 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0365 Tc -0.0782 Tw (146 ) Tj
256.92 0 TD 0.03 Tc 0.0483 Tw (Regular Expressions) Tj
73.8 0 TD 0.0261 Tc 0.0282 Tw ( Chap. 11) Tj
ET
113.52 701.88 0.48 0.96 re f
486 701.88 0.48 0.96 re f
114 701.88 372 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
554.76 746.76 0.24 0.48 re f
584.04 746.76 0.24 0.48 re f
555 746.76 29.04 0.48 re f
585 80.76 0.24 0.48 re f
553.8 80.76 0.24 0.48 re f
554.04 80.76 30.96 0.48 re f
548.76 69.96 0.48 0.24 re f
548.76 33.72 0.48 0.24 re f
548.76 33.96 0.48 36 re f
BT
0.9955 0 0 0.9955 138 572.4 Tm
/F4 10 Tf
0.0036 Tc 1.0606 Tw (Table 11\2263 lists the named character classes defined in advanced regular) Tj
-24.1095 -12.0547 TD 0.0108 Tc 1.9264 Tw (expressions and their associated backslash sequences, if an) Tj
-1.1533 Tc 0 Tw (y) Tj
0.0137 Tc 1.9064 Tw (. Character class) Tj
0 -12.1753 TD 0.0092 Tc 0.0357 Tw (names are valid inside bracketed character sets with the ) Tj
ET
BT
378.24 548.28 TD
/F5 9 Tf
-0.06 Tc 0 Tw ([:) Tj
10.8 0 TD /F9 9 Tf
0 Tc (class) Tj
26.88 0 TD /F5 9 Tf
(:]) Tj
ET
BT
0.9955 0 0 0.9955 426.72 548.28 Tm
/F4 10 Tf
0.0212 Tc -0.03 Tw ( syntax.) Tj
-290.0372 -265.2045 TD 0.0072 Tc -0.0159 Tw (Table 11\2264 lists backslash sequences supported in Tcl 8.1.) Tj
ET
BT
123.96 654.96 TD
/F5 9 Tf
0 Tc 0 Tw (\\) Tj
5.4 0 TD /F9 9 Tf
(c) Tj
42.6 0 TD /F10 9 Tf
-0.0022 Tc -0.0192 Tw (One of many backslash escapes listed in ) Tj
-0.0903 Tc 0 Tw (Table 11\2264.) Tj
-48 -16.92 TD /F5 9 Tf
0 Tc 0 Tw ([: :]) Tj
48 0 TD /F10 9 Tf
-0.0037 Tc -0.0063 Tw (Delimits a character class within a bracketed expression. See ) Tj
-0.1386 Tc 0.1686 Tw (Table ) Tj
243.24 0 TD -0.066 Tc 0 Tw (11\2263.) Tj
-291.24 -17.04 TD /F5 9 Tf
0 Tc ([. .]) Tj
48 0 TD /F10 9 Tf
-0.0085 Tc 0.0385 Tw (Delimits a collating element within a bracketed expression.) Tj
-48 -17.04 TD /F5 9 Tf
0 Tc 0 Tw ([= =]) Tj
48 0 TD /F10 9 Tf
-0.0028 Tc -0.0187 Tw (Delimits an equivalence class within a bracketed expression.) Tj
-51.96 -82.32 TD /F1 7.92 Tf
-0.0972 Tc 0.1154 Tw (Table 11\226) Tj
4.1165 Tc -4.1582 Tw (3 ) Tj
48.24 0 TD /F0 7.92 Tf
0.0414 Tc -0.0832 Tw (Character classes.) Tj
-44.28 -16.68 TD /F5 9 Tf
0 Tc 0 Tw (alnum) Tj
48 0 TD /F10 9 Tf
-0.0058 Tc 0.0158 Tw (Upper and lower case letters and digits.) Tj
-48 -16.92 TD /F5 9 Tf
0 Tc 0 Tw (alpha) Tj
48 0 TD /F10 9 Tf
-0.0078 Tc 0.0378 Tw (Upper and lower case letters.) Tj
-48 -17.04 TD /F5 9 Tf
0 Tc 0 Tw (blank) Tj
48 0 TD /F10 9 Tf
-0.008 Tc 0.038 Tw (Space and tab.) Tj
-48 -17.04 TD /F5 9 Tf
0 Tc 0 Tw (cntrl) Tj
48 0 TD /F10 9 Tf
-0.0068 Tc 0.0368 Tw (Control characters:) Tj
68.64 0 TD /F5 9 Tf
0 Tc 0 Tw ( \\u0001) Tj
37.8 0 TD /F10 9 Tf
-0.0056 Tc -0.0244 Tw ( through ) Tj
32.4 0 TD /F5 9 Tf
0 Tc 0 Tw (\\u001) Tj
-0.72 Tc (F) Tj
31.68 0 TD /F10 9 Tf
0.03 Tc (.) Tj
-218.52 -16.92 TD /F5 9 Tf
0 Tc (digit) Tj
48 0 TD /F10 9 Tf
-0.0013 Tc -0.0087 Tw (The digits zero through nine. Also ) Tj
125.64 0 TD /F5 9 Tf
-0.06 Tc 0 Tw (\\d) Tj
10.8 0 TD /F10 9 Tf
0.03 Tc (.) Tj
-184.44 -17.04 TD /F5 9 Tf
0 Tc (graph) Tj
48 0 TD /F10 9 Tf
0 Tc -0.0301 Tw (Printing characters that are not in ) Tj
121.8 0 TD /F5 9 Tf
0 Tc 0 Tw (cntrl) Tj
27 0 TD /F10 9 Tf
-0.0285 Tc 0.0585 Tw ( or ) Tj
12 0 TD /F5 9 Tf
-0.024 Tc 0 Tw (space) Tj
27 0 TD /F10 9 Tf
0.03 Tc (.) Tj
-235.8 -17.04 TD /F5 9 Tf
0 Tc (lower) Tj
48 0 TD /F10 9 Tf
0.0009 Tc -0.0909 Tw (Lowercase letters.) Tj
-48 -16.92 TD /F5 9 Tf
0 Tc 0 Tw (print) Tj
48 0 TD /F10 9 Tf
-0.003 Tc -0.007 Tw (The same as ) Tj
46.68 0 TD /F5 9 Tf
0 Tc 0 Tw (alnum) Tj
27 0 TD /F10 9 Tf
0.03 Tc (.) Tj
-121.68 -17.04 TD /F5 9 Tf
0 Tc (punct) Tj
48 0 TD /F10 9 Tf
-0.0059 Tc 0.0359 Tw (Punctuation characters.) Tj
-48 -17.04 TD /F5 9 Tf
0 Tc 0 Tw (space) Tj
48 0 TD /F10 9 Tf
-0.005 Tc -0.001 Tw (Space, newline, carriage return, tab, vertical tab, form feed. Also ) Tj
235.2 0 TD /F5 9 Tf
0 Tc 0 Tw (\\s) Tj
10.68 0 TD /F10 9 Tf
0.03 Tc (.) Tj
-293.88 -16.92 TD /F5 9 Tf
0 Tc (upper) Tj
48 0 TD /F10 9 Tf
-0.0039 Tc 0.0339 Tw (Uppercase letters.) Tj
-48 -17.04 TD /F5 9 Tf
0 Tc 0 Tw (xdigit) Tj
48 0 TD /F10 9 Tf
-0.0051 Tc -0.0049 Tw (Hexadecimal digits: zero through nine, a-f, A-) Tj
-0.684 Tc 0 Tw (F) Tj
0.03 Tc (.) Tj
-51.96 -60.36 TD /F1 7.92 Tf
-0.0972 Tc 0.1154 Tw (Table 11\226) Tj
4.1165 Tc -4.1582 Tw (4 ) Tj
48.24 0 TD /F0 7.92 Tf
0.042 Tc -0.0538 Tw (Backslash escapes in regular expressions) Tj
2.2382 Tc 0 Tw (.) Tj
-44.28 -16.68 TD /F5 9 Tf
0 Tc (\\a) Tj
48 0 TD /F10 9 Tf
-0.0257 Tc 0.0557 Tw (Alert, or "bell", character.) Tj
-48 -16.92 TD /F5 9 Tf
0 Tc 0 Tw (\\A) Tj
48 0 TD /F10 9 Tf
-0.0032 Tc -0.0011 Tw (Matches only at the beginning of the string.) Tj
-48 -17.04 TD /F5 9 Tf
0 Tc 0 Tw (\\b) Tj
48 0 TD /F10 9 Tf
-0.0268 Tc 0.0568 Tw (Backspace character, ) Tj
77.76 0 TD /F5 9 Tf
0 Tc 0 Tw (\\u0008) Tj
32.4 0 TD /F10 9 Tf
0.03 Tc (.) Tj
-158.16 -17.04 TD /F5 9 Tf
0 Tc (\\B) Tj
48 0 TD /F10 9 Tf
-0.0081 Tc 0.0381 Tw (Synonym for backslash.) Tj
-48 -16.92 TD /F5 9 Tf
0 Tc 0 Tw (\\c) Tj
10.8 0 TD /F9 9 Tf
(X) Tj
37.2 0 TD /F10 9 Tf
-0.0026 Tc (Control-) Tj
30.48 0 TD /F9 9 Tf
0 Tc (X) Tj
5.4 0 TD /F10 9 Tf
0.03 Tc (.) Tj
-83.88 -17.04 TD /F5 9 Tf
0 Tc (\\d) Tj
48 0 TD /F10 9 Tf
-0.0115 Tc 0.0415 Tw (Digits. Same as ) Tj
58.44 0 TD /F5 9 Tf
-0.0109 Tc 0 Tw ([[:digit:]]) Tj
-106.44 -17.04 TD 0 Tc (\\D) Tj
48 0 TD /F10 9 Tf
-0.0092 Tc 0.0152 Tw (Not a digit. Same as ) Tj
74.88 0 TD /F5 9 Tf
0 Tc 0 Tw ([^[:digit:]]) Tj
-126.84 532.68 TD /F1 7.92 Tf
-0.0972 Tc 0.1154 Tw (Table 11\226) Tj
4.1165 Tc -4.1582 Tw (2 ) Tj
48.24 0 TD /F0 7.92 Tf
0.0377 Tc -0.0314 Tw (Additional advanced regular expression syntax. \(Continued\)) Tj
ET
120 664.8 360 0.48 re f
120 596.76 360 0.48 re f
120 514.8 360 0.48 re f
120 310.8 360 0.48 re f
120 250.8 360 0.48 re f
120 131.76 360 0.48 re f
endstream
endobj
124 0 obj
6368
endobj
122 0 obj
<<
/Type /Page
/Parent 109 0 R
/Resources <<
/Font 125 0 R
/ProcSet 2 0 R
>>
/Contents 123 0 R
>>
endobj
125 0 obj
<<
/F0 6 0 R
/F1 7 0 R
/F4 14 0 R
/F5 16 0 R
/F9 32 0 R
/F10 119 0 R
>>
endobj
127 0 obj
<<
/Length 128 0 R
>>
stream
BT
108.96 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0451 Tc -0.0869 Tw (Syntax Summary) Tj
356.76 0 TD 0.0765 Tc 0 Tw (147) Tj
ET
108.48 701.88 0.48 0.96 re f
480.72 701.88 0.48 0.96 re f
108.96 701.88 371.76 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
553.8 746.76 0.24 0.48 re f
585 746.76 0.24 0.48 re f
554.04 746.76 30.96 0.48 re f
585 80.76 0.24 0.48 re f
554.76 80.76 0.24 0.48 re f
555 80.76 30 0.48 re f
547.8 75 0.48 0.24 re f
547.8 34.8 0.48 0.24 re f
547.8 35.04 0.48 39.96 re f
510 504 54 108 re f
510 611.76 54.24 0.48 re f
563.76 503.76 0.48 108.24 re f
509.76 503.76 54.24 0.48 re f
509.76 504 0.48 108.24 re f
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 605.52 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 602.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 598.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (.) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 595.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 592.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (A) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 583.2 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 575.28 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (v) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 568.56 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (a) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 560.64 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (n) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 553.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 545.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (e) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 538.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 530.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 526.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (T) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 521.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 514.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (l) Tj
ET
Q
BT
0.9955 0 0 0.9955 132.96 263.28 Tm
/F4 10 Tf
0.0048 Tc 0.2276 Tw (Table 11\2265 lists the embedded option characters used with the ) Tj
ET
BT
426.24 263.28 TD
/F5 9 Tf
0 Tc 0 Tw (\(?) Tj
10.8 0 TD /F9 9 Tf
-0.04 Tc (abc) Tj
16.2 0 TD /F5 9 Tf
0 Tc (\)) Tj
ET
BT
0.9955 0 0 0.9955 458.64 263.28 Tm
/F4 10 Tf
0.02 Tc 0.2124 Tw ( syn-) Tj
-351.2754 -12.0547 TD 0.0281 Tc 0 Tw (tax.) Tj
ET
BT
119.04 654.96 TD
/F5 9 Tf
0 Tc (\\e) Tj
48 0 TD /F10 9 Tf
-0.0221 Tc -0.0079 Tw (Escape character, ) Tj
64.68 0 TD /F5 9 Tf
0 Tc 0 Tw (\\u001B) Tj
32.4 0 TD /F10 9 Tf
0.03 Tc (.) Tj
-145.08 -16.92 TD /F5 9 Tf
0 Tc (\\f) Tj
48 0 TD /F10 9 Tf
-0.0047 Tc 0.0347 Tw (Form feed, ) Tj
41.64 0 TD /F5 9 Tf
-0.02 Tc 0 Tw (\\u000C) Tj
32.4 0 TD /F10 9 Tf
0.03 Tc (.) Tj
-122.04 -17.04 TD /F5 9 Tf
0 Tc (\\m) Tj
48 0 TD /F10 9 Tf
-0.0107 Tc 0.0407 Tw (Matches the beginning of a word.) Tj
-48 -17.04 TD /F5 9 Tf
0 Tc 0 Tw (\\M) Tj
48 0 TD /F10 9 Tf
-0.0097 Tc 0.0397 Tw (Matches the end of a word.) Tj
-48 -16.92 TD /F5 9 Tf
0 Tc 0 Tw (\\n) Tj
48 0 TD /F10 9 Tf
0.0022 Tc 0.0278 Tw (Newline, ) Tj
34.92 0 TD /F5 9 Tf
-0.02 Tc 0 Tw (\\u000A) Tj
32.28 0 TD /F10 9 Tf
0.03 Tc (.) Tj
-115.2 -17.04 TD /F5 9 Tf
0 Tc (\\r) Tj
48 0 TD /F10 9 Tf
-0 Tc -0.0294 Tw (Carriage return, ) Tj
59.16 0 TD /F5 9 Tf
0 Tc 0 Tw (\\u000D) Tj
32.28 0 TD /F10 9 Tf
0.03 Tc (.) Tj
-139.44 -17.04 TD /F5 9 Tf
0 Tc (\\s) Tj
48 0 TD /F10 9 Tf
-0.0097 Tc 0.0397 Tw (Space. Same as ) Tj
57.84 0 TD /F5 9 Tf
-0.0109 Tc 0 Tw ([[:space:]]) Tj
-105.84 -16.92 TD 0 Tc (\\S) Tj
48 0 TD /F10 9 Tf
0.0056 Tc -0.0236 Tw (Not a space. Same as ) Tj
78.36 0 TD /F5 9 Tf
-0.01 Tc 0 Tw ([^[:space:]]) Tj
-126.36 -17.04 TD 0 Tc (\\t) Tj
48 0 TD /F10 9 Tf
-0.0015 Tc 0.0315 Tw (Horizontal tab, ) Tj
56.16 0 TD /F5 9 Tf
-0.02 Tc 0 Tw (\\u0009) Tj
32.28 0 TD /F10 9 Tf
0.03 Tc (.) Tj
-136.44 -17.04 TD /F5 9 Tf
0 Tc (\\u) Tj
10.68 0 TD /F9 9 Tf
(XXXX) Tj
37.32 0 TD /F10 9 Tf
0.0018 Tc -0.0318 Tw (A 16-bit Unicode character code.) Tj
-48 -16.92 TD /F5 9 Tf
0 Tc 0 Tw (\\v) Tj
48 0 TD /F10 9 Tf
-0.978 Tc (V) Tj
-0.009 Tc 0.039 Tw (ertical tab, ) Tj
45.6 0 TD /F5 9 Tf
0 Tc 0 Tw (\\u000B) Tj
32.4 0 TD /F10 9 Tf
0.03 Tc (.) Tj
-126 -17.04 TD /F5 9 Tf
0 Tc (\\w) Tj
48 0 TD /F10 9 Tf
-0.0089 Tc 0.0389 Tw (Letters, digit, and underscore. Same as ) Tj
141.48 0 TD /F5 9 Tf
-0.01 Tc 0 Tw ([[:alnum:]_]) Tj
-189.48 -17.04 TD 0 Tc (\\W) Tj
48 0 TD /F10 9 Tf
-0.0212 Tc 0.0512 Tw (Not a letter, digit, or underscore. Same as ) Tj
151.08 0 TD /F5 9 Tf
-0.0092 Tc 0 Tw ([^[:alnum:]_]) Tj
-199.08 -16.92 TD 0 Tc (\\x) Tj
10.68 0 TD /F9 9 Tf
(hh) Tj
37.32 0 TD /F10 9 Tf
-0.0073 Tc 0.0253 Tw (An 8-bit hexadecimal character code. Consumes all hex digits after ) Tj
243.84 0 TD /F5 9 Tf
0 Tc 0 Tw (\\x.) Tj
-291.84 -17.04 TD (\\y) Tj
48 0 TD /F10 9 Tf
-0.0119 Tc 0.0419 Tw (Matches the beginning or end of a word.) Tj
-48 -17.04 TD /F5 9 Tf
0 Tc 0 Tw (\\Y) Tj
48 0 TD /F10 9 Tf
-0.0052 Tc 0.0052 Tw (Matches a point that is not the beginning or end of a word.) Tj
-48 -16.92 TD /F5 9 Tf
0 Tc 0 Tw (\\Z) Tj
48 0 TD /F10 9 Tf
-0.0037 Tc 0.0097 Tw (Matches the end of the string.) Tj
-48 -17.04 TD /F5 9 Tf
0 Tc 0 Tw (\\0) Tj
48 0 TD /F10 9 Tf
0.0072 Tc 0.0228 Tw (NULL, ) Tj
28.44 0 TD /F5 9 Tf
-0.02 Tc 0 Tw (\\u0000) Tj
-76.44 -17.04 TD 0 Tc (\\) Tj
5.4 0 TD /F9 9 Tf
(x) Tj
42.6 0 TD /F10 9 Tf
0.003 Tc 0.027 Tw (Where ) Tj
26.16 0 TD /F9 9 Tf
0 Tc 0 Tw (x) Tj
5.4 0 TD /F10 9 Tf
-0.01 Tc 0.0228 Tw ( is a digit, this is a back-reference.) Tj
-79.56 -16.92 TD /F5 9 Tf
0 Tc 0 Tw (\\) Tj
5.4 0 TD /F9 9 Tf
(xy) Tj
42.6 0 TD /F10 9 Tf
0.003 Tc -0.213 Tw (Where ) Tj
26.04 0 TD /F9 9 Tf
0 Tc 0 Tw (x) Tj
5.28 0 TD /F10 9 Tf
-0.012 Tc -0.138 Tw ( and ) Tj
17.16 0 TD /F9 9 Tf
0 Tc 0 Tw (y) Tj
5.4 0 TD /F10 9 Tf
-0.0046 Tc -0.1654 Tw ( are digits, either a decimal back-reference, or an 8-bit octal character ) Tj
-53.88 -10.08 TD 0.0156 Tc 0 Tw (code.) Tj
-48 -16.92 TD /F5 9 Tf
0 Tc (\\) Tj
5.4 0 TD /F9 9 Tf
(xyz) Tj
42.6 0 TD /F10 9 Tf
0.003 Tc -0.093 Tw (Where ) Tj
26.04 0 TD /F9 9 Tf
0 Tc 0 Tw (x) Tj
5.4 0 TD /F10 9 Tf
0.03 Tc -0.12 Tw (, ) Tj
4.44 0 TD /F9 9 Tf
0 Tc 0 Tw (y) Tj
5.4 0 TD /F10 9 Tf
-0.012 Tc -0.078 Tw ( and ) Tj
17.28 0 TD /F9 9 Tf
0 Tc 0 Tw (z) Tj
5.4 0 TD /F10 9 Tf
-0.005 Tc -0.0959 Tw ( are digits, either a decimal back-reference or an 8-bit octal charac-) Tj
-63.96 -10.08 TD -0.0071 Tc 0.0371 Tw (ter code.) Tj
-52.08 -70.32 TD /F1 7.92 Tf
-0.0822 Tc 0.1004 Tw (Table 11\226) Tj
3.9965 Tc -3.9182 Tw (5 ) Tj
48.36 0 TD /F0 7.92 Tf
0.036 Tc -0.0178 Tw (Embedded option characters used with the \(?) Tj
160.92 0 TD /F9 9 Tf
0 Tc 0 Tw (x) Tj
5.28 0 TD /F0 7.92 Tf
0.0391 Tc 0.0391 Tw (\) syntax) Tj
2.2382 Tc 0 Tw (.) Tj
-210.48 -16.68 TD /F5 9 Tf
0 Tc (b) Tj
36 0 TD /F10 9 Tf
-0.0059 Tc 0.0159 Tw (The rest of the pattern is a basic regular expression \(a la ) Tj
203.16 0 TD /F11 9 Tf
-0.009 Tc 0 Tw (vi) Tj
6.48 0 TD /F10 9 Tf
0.0315 Tc -0.1215 Tw ( or ) Tj
12 0 TD /F11 9 Tf
-0.0742 Tc 0 Tw (grep) Tj
16.08 0 TD /F10 9 Tf
0.0165 Tc (\).) Tj
-273.72 -16.92 TD /F5 9 Tf
0 Tc (c) Tj
36 0 TD /F10 9 Tf
-0.0069 Tc 0.0169 Tw (Case sensitive matching. This is the default.) Tj
-36 -17.04 TD /F5 9 Tf
0 Tc 0 Tw (e) Tj
36 0 TD /F10 9 Tf
-0.0075 Tc 0.0255 Tw (The rest of the pattern is an extended regular expression \() Tj
206.64 0 TD /F11 9 Tf
-0.034 Tc 0.064 Tw (a la) Tj
13.68 0 TD /F10 9 Tf
-0.0968 Tc 0.1268 Tw ( Tcl 8.0\).) Tj
-256.32 -17.04 TD /F5 9 Tf
0 Tc 0 Tw (i) Tj
36 0 TD /F10 9 Tf
-0.0077 Tc 0.0377 Tw (Case insensitive matching.) Tj
-36 -16.92 TD /F5 9 Tf
0 Tc 0 Tw (m) Tj
36 0 TD /F10 9 Tf
0.0125 Tc -0.0625 Tw (Synonym for the ) Tj
62.64 0 TD /F5 9 Tf
0 Tc 0 Tw (n) Tj
5.4 0 TD /F10 9 Tf
-0.0077 Tc -0.0823 Tw ( option.) Tj
-108.12 531.6 TD /F1 7.92 Tf
-0.0822 Tc 0.1004 Tw (Table 11\226) Tj
3.9965 Tc -3.9182 Tw (4 ) Tj
48.36 0 TD /F0 7.92 Tf
0.0337 Tc -0.0034 Tw (Backslash escapes in regular expressions. \(Continued\)) Tj
ET
114.96 664.8 360 0.48 re f
114.96 287.76 360 0.48 re f
114.96 217.8 360 0.48 re f
114.96 132.72 360 0.48 re f
endstream
endobj
128 0 obj
8965
endobj
126 0 obj
<<
/Type /Page
/Parent 109 0 R
/Resources <<
/Font 129 0 R
/ProcSet 2 0 R
>>
/Contents 127 0 R
>>
endobj
129 0 obj
<<
/F0 6 0 R
/F1 7 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
/F9 32 0 R
/F10 119 0 R
/F11 120 0 R
>>
endobj
131 0 obj
<<
/Length 132 0 R
>>
stream
BT
114 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0365 Tc -0.0782 Tw (148 ) Tj
256.92 0 TD 0.03 Tc 0.0483 Tw (Regular Expressions) Tj
73.8 0 TD 0.0261 Tc 0.0282 Tw ( Chap. 11) Tj
ET
113.52 701.88 0.48 0.96 re f
486 701.88 0.48 0.96 re f
114 701.88 372 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
554.76 746.76 0.24 0.48 re f
584.04 746.76 0.24 0.48 re f
555 746.76 29.04 0.48 re f
585 80.76 0.24 0.48 re f
553.8 80.76 0.24 0.48 re f
554.04 80.76 30.96 0.48 re f
548.76 69.96 0.48 0.24 re f
548.76 33.72 0.48 0.24 re f
548.76 33.96 0.48 36 re f
BT
0.997 0 0 0.997 114 513.36 Tm
/F2 13 Tf
0.2695 Tc -0.0585 Tw (The ) Tj
ET
BT
140.28 513.36 TD
/F8 13.92 Tf
0.048 Tc 0 Tw (regexp) Tj
ET
BT
0.997 0 0 0.997 190.56 513.36 Tm
/F2 13 Tf
0.3135 Tc 0.0177 Tw ( Command) Tj
ET
BT
0.9955 0 0 0.9955 114 492.36 Tm
/F4 10 Tf
0.0176 Tc 0.8174 Tw (The ) Tj
ET
BT
135.36 492.36 TD
/F5 9 Tf
-0.02 Tc 0 Tw (regexp) Tj
ET
BT
0.9955 0 0 0.9955 167.76 492.36 Tm
/F4 10 Tf
0.0162 Tc 0.8189 Tw ( command provides direct access to the regular expression matche) Tj
-0.9461 Tc 0 Tw (r) Tj
-0.0087 Tc (.) Tj
-54.0053 -12.0547 TD 0.0201 Tc 0.4935 Tw (Not only does it tell you whether a string matches a pattern, it can also extract) Tj
0 -12.0547 TD 0.0195 Tc -0.0202 Tw (one or more matching substrings. The return value is 1 if some part of the string) Tj
T* 0.0157 Tc -0.0244 Tw (matches the pattern; it is 0 otherwise. Its syntax is:) Tj
ET
BT
150 443.04 TD
/F5 9 Tf
-0.02 Tc 0.02 Tw (regexp ) Tj
37.8 0 TD /F9 9 Tf
-0.0046 Tc 0.0046 Tw (?flags? pattern string ?match) Tj
156.36 0 TD /F5 9 Tf
0 Tc 0 Tw ( ) Tj
5.4 0 TD /F9 9 Tf
-0.015 Tc 0.015 Tw (sub1 sub2) Tj
48.48 0 TD /F5 9 Tf
0 Tc 0 Tw (...?) Tj
ET
BT
0.9955 0 0 0.9955 138 429.36 Tm
/F4 10 Tf
0.0176 Tc -0.0264 Tw (The ) Tj
ET
BT
158.52 429.36 TD
/F9 9 Tf
0 Tc 0 Tw (flags) Tj
ET
BT
0.9955 0 0 0.9955 185.52 429.36 Tm
/F4 10 Tf
0.0171 Tc -0.0258 Tw ( are described in ) Tj
-0.0791 Tc 0.0708 Tw (Table ) Tj
107.6489 0 TD 0.0085 Tc 0 Tw (11\2266:) Tj
-155.3857 -257.2483 TD 0.0176 Tc 2.8667 Tw (The ) Tj
ET
BT
161.4 173.28 TD
/F9 9 Tf
0 Tc 0 Tw (pattern) Tj
ET
BT
0.9955 0 0 0.9955 199.2 173.28 Tm
/F4 10 Tf
0.0167 Tc 2.928 Tw ( argument is a regular expression as described earlie) Tj
-0.9461 Tc 0 Tw (r) Tj
0.0206 Tc 2.8637 Tw (. If) Tj
ET
BT
114 161.28 TD
/F9 9 Tf
-0.02 Tc 0 Tw (string) Tj
ET
BT
0.9955 0 0 0.9955 146.4 161.28 Tm
/F4 10 Tf
0.0054 Tc 1.1914 Tw ( matches ) Tj
ET
BT
192.6 161.28 TD
/F9 9 Tf
-0.0171 Tc 0 Tw (pattern) Tj
ET
BT
0.9955 0 0 0.9955 230.4 161.28 Tm
/F4 10 Tf
0.0224 Tc 1.1086 Tw (, then the results of the match are stored in the vari-) Tj
-116.9311 -12.0547 TD 0.0192 Tc 0.7063 Tw (ables named in the command. These match variable arguments are optional. If) Tj
0 -12.0547 TD 0.0155 Tc 0.699 Tw (present, ) Tj
ET
BT
155.04 137.28 TD
/F9 9 Tf
0 Tc 0 Tw (match) Tj
ET
BT
0.9955 0 0 0.9955 182.04 137.28 Tm
/F4 10 Tf
0.0161 Tc 0.6898 Tw ( is set to be the part of the string that matched the pattern. The) Tj
ET
BT
123.96 654.96 TD
/F5 9 Tf
0 Tc 0 Tw (n) Tj
36 0 TD /F10 9 Tf
-0.0016 Tc -0.0164 Tw (Newline sensitive matching . Both ) Tj
126.36 0 TD /F5 9 Tf
-0.012 Tc 0 Tw (lineanchor) Tj
53.88 0 TD /F10 9 Tf
-0.012 Tc 0.042 Tw ( and ) Tj
17.52 0 TD /F5 9 Tf
-0.015 Tc 0 Tw (linestop) Tj
43.08 0 TD /F10 9 Tf
-0.0096 Tc 0.0396 Tw ( mode.) Tj
-276.84 -16.92 TD /F5 9 Tf
0 Tc 0 Tw (p) Tj
36 0 TD /F10 9 Tf
0.0011 Tc -0.0431 Tw (Partial newline sensitive matching. Only ) Tj
148.32 0 TD /F5 9 Tf
-0.015 Tc 0 Tw (linestop) Tj
43.2 0 TD /F10 9 Tf
-0.0096 Tc 0.0396 Tw ( mode.) Tj
-227.52 -17.04 TD /F5 9 Tf
0 Tc 0 Tw (q) Tj
36 0 TD /F10 9 Tf
0.0026 Tc -0.0326 Tw (The rest of the pattern is a literal string.) Tj
-36 -17.04 TD /F5 9 Tf
0 Tc 0 Tw (s) Tj
36 0 TD /F10 9 Tf
0.0063 Tc -0.0963 Tw (No newline sensitivit) Tj
-0.66 Tc 0 Tw (y) Tj
-0.0053 Tc 0.0053 Tw (. This is the default.) Tj
-36 -16.92 TD /F5 9 Tf
0 Tc 0 Tw (t) Tj
36 0 TD /F10 9 Tf
-0.0139 Tc 0.0289 Tw (Tight syntax; no embedded comments. This is the default.) Tj
-36 -17.04 TD /F5 9 Tf
0 Tc 0 Tw (w) Tj
36 0 TD /F10 9 Tf
-0 Tc -0.0415 Tw (Inverse partial newline-sensitive matching. Only ) Tj
177.24 0 TD /F5 9 Tf
-0.012 Tc 0 Tw (lineanchor) Tj
54 0 TD /F10 9 Tf
-0.0096 Tc 0.0396 Tw ( mode.) Tj
-267.24 -17.04 TD /F5 9 Tf
0 Tc 0 Tw (x) Tj
36 0 TD /F10 9 Tf
-0.0024 Tc -0.0191 Tw (Expanded syntax with embedded white space and comments.) Tj
-39.96 -150.24 TD /F1 7.92 Tf
-0.0972 Tc 0.1154 Tw (Table 11\226) Tj
4.1165 Tc -4.1582 Tw (6 ) Tj
48.24 0 TD /F0 7.92 Tf
0.0366 Tc 0.0116 Tw (Options to the regexp command.) Tj
-44.28 -16.68 TD /F5 9 Tf
0 Tc 0 Tw (-nocase) Tj
72 0 TD /F10 9 Tf
-0.0009 Tc -0.0091 Tw (Lowercase characters in ) Tj
89.16 0 TD /F9 9 Tf
-0.0171 Tc 0 Tw (pattern) Tj
37.68 0 TD /F10 9 Tf
-0.0083 Tc 0.0212 Tw ( can match either lowercase or uppercase ) Tj
-126.84 -10.08 TD -0.0087 Tc 0.0387 Tw (letters in ) Tj
33.48 0 TD /F9 9 Tf
0 Tc 0 Tw (string) Tj
32.4 0 TD /F10 9 Tf
0.03 Tc (.) Tj
-137.88 -16.92 TD /F5 9 Tf
0 Tc (-indices) Tj
72 0 TD /F10 9 Tf
-0.0018 Tc -0.1897 Tw (The match variables each contain a pair of numbers that are in indices delimit-) Tj
0 -10.08 TD -0.0035 Tc -0.0865 Tw (ing the match within ) Tj
76.08 0 TD /F9 9 Tf
0 Tc 0 Tw (string) Tj
32.4 0 TD /F10 9 Tf
-0.0039 Tc -0.0861 Tw (. Otherwise, the matching string itself is copied ) Tj
-108.48 -9.96 TD 0.0046 Tc -0.0546 Tw (into the match variables.) Tj
-72 -17.04 TD /F5 9 Tf
0 Tc 0 Tw (-expanded) Tj
72 0 TD /F10 9 Tf
-0.0054 Tc 0.0087 Tw (The pattern uses the expanded syntax discussed on page 144.) Tj
-72 -16.92 TD /F5 9 Tf
0 Tc 0 Tw (-line) Tj
72 0 TD /F10 9 Tf
-0.0053 Tc 0.0113 Tw (The same as specifying both ) Tj
104.64 0 TD /F5 9 Tf
-0.0109 Tc 0.0109 Tw (-lineanchor ) Tj
64.68 0 TD /F10 9 Tf
-0.012 Tc 0.042 Tw (and ) Tj
15.24 0 TD /F5 9 Tf
-0.0133 Tc 0 Tw (-linestop) Tj
48.48 0 TD /F10 9 Tf
0.03 Tc (.) Tj
-305.04 -17.04 TD /F5 9 Tf
-0.0109 Tc (-lineanchor) Tj
72 0 TD /F10 9 Tf
-0.0043 Tc -0.2057 Tw (Change the behavior of ) Tj
85.56 0 TD /F5 9 Tf
0 Tc 0 Tw (^) Tj
5.4 0 TD /F10 9 Tf
-0.012 Tc -0.198 Tw ( and ) Tj
17.04 0 TD /F5 9 Tf
0 Tc 0 Tw ($) Tj
5.4 0 TD /F10 9 Tf
-0.0037 Tc -0.2063 Tw ( so they are line-oriented as discussed on page ) Tj
-113.4 -9.96 TD -0.0075 Tc 0 Tw (143.) Tj
-72 -17.04 TD /F5 9 Tf
0 Tc (-linestop) Tj
72 0 TD /F10 9 Tf
-0.0027 Tc -0.0073 Tw (Change matching so that) Tj
89.16 0 TD /F5 9 Tf
0 Tc 0 Tw ( . ) Tj
16.2 0 TD /F10 9 Tf
0.0012 Tc -0.0462 Tw (and character classes do not match newlines as ) Tj
-105.36 -9.96 TD -0.0105 Tc 0.0405 Tw (discussed on page 143) Tj
ET
BT
0.9955 0 0 0.9955 276.6 251.04 Tm
/F4 10 Tf
-0.0087 Tc 0 Tw (.) Tj
ET
BT
123.96 234 TD
/F5 9 Tf
0 Tc (-about) Tj
72 0 TD /F10 9 Tf
-0.0051 Tc 0.0024 Tw (Useful for debugging. It returns information about the pattern instead of try-) Tj
0 -9.96 TD -0.0055 Tc 0.0155 Tw (ing to match it against the input.) Tj
-72 -17.04 TD /F5 9 Tf
0 Tc 0 Tw (--) Tj
72 0 TD /F10 9 Tf
0.002 Tc -0.192 Tw (Signals the end of the options. ) Tj
-0.0199 Tc -0.1768 Tw (You must use this if your pattern begins with ) Tj
272.4 0 TD /F5 9 Tf
0 Tc 0 Tw (-) Tj
5.4 0 TD /F10 9 Tf
0.03 Tc (.) Tj
-353.76 464.64 TD /F1 7.92 Tf
-0.0972 Tc 0.1154 Tw (Table 11\226) Tj
4.1165 Tc -4.1582 Tw (5 ) Tj
48.24 0 TD /F0 7.92 Tf
0.036 Tc 0.0022 Tw (Embedded option characters used with the \(?) Tj
160.92 0 TD /F9 9 Tf
0 Tc 0 Tw (x) Tj
5.4 0 TD /F0 7.92 Tf
0.0325 Tc -0.0143 Tw (\) syntax. \(Continued\)) Tj
ET
120 664.8 360 0.48 re f
120 545.76 360 0.48 re f
120 395.76 360 0.48 re f
120 199.8 360 0.48 re f
endstream
endobj
132 0 obj
8164
endobj
130 0 obj
<<
/Type /Page
/Parent 109 0 R
/Resources <<
/Font 133 0 R
/ProcSet 2 0 R
>>
/Contents 131 0 R
>>
endobj
133 0 obj
<<
/F0 6 0 R
/F1 7 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
/F8 29 0 R
/F9 32 0 R
/F10 119 0 R
>>
endobj
136 0 obj
<<
/Length 137 0 R
>>
stream
BT
108.96 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0513 Tc -0.093 Tw (The ) Tj
16.08 0 TD /F5 7.92 Tf
0.048 Tc 0 Tw (regexp) Tj
28.68 0 TD /F0 7.92 Tf
0.0447 Tc 0.0335 Tw ( Command) Tj
312 0 TD 0.0765 Tc 0 Tw (149) Tj
ET
108.48 701.88 0.48 0.96 re f
480.72 701.88 0.48 0.96 re f
108.96 701.88 371.76 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
553.8 746.76 0.24 0.48 re f
585 746.76 0.24 0.48 re f
554.04 746.76 30.96 0.48 re f
585 80.76 0.24 0.48 re f
554.76 80.76 0.24 0.48 re f
555 80.76 30 0.48 re f
547.8 75 0.48 0.24 re f
547.8 34.8 0.48 0.24 re f
547.8 35.04 0.48 39.96 re f
510 504 54 108 re f
510 611.76 54.24 0.48 re f
563.76 503.76 0.48 108.24 re f
509.76 503.76 54.24 0.48 re f
509.76 504 0.48 108.24 re f
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 605.52 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 602.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 598.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (.) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 595.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 592.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (A) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 583.2 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 575.28 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (v) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 568.56 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (a) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 560.64 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (n) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 553.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 545.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (e) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 538.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 530.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 526.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (T) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 521.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 514.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (l) Tj
ET
Q
BT
0.9955 0 0 0.9955 108.96 670.32 Tm
/F4 10 Tf
0.014 Tc 0.205 Tw (remaining variables are set to be the substrings of ) Tj
ET
BT
345.6 670.32 TD
/F9 9 Tf
0 Tc 0 Tw (string) Tj
ET
BT
0.9955 0 0 0.9955 378 670.32 Tm
/F4 10 Tf
0.0158 Tc 0.1563 Tw ( that matched the cor-) Tj
-270.2675 -12.0547 TD 0.0124 Tc 0.3003 Tw (responding subpatterns in ) Tj
ET
BT
234.12 658.32 TD
/F9 9 Tf
0 Tc 0 Tw (pattern) Tj
ET
BT
0.9955 0 0 0.9955 271.92 658.32 Tm
/F4 10 Tf
0.0091 Tc 0.2835 Tw (. The correspondence is based on the order of) Tj
-163.7035 -12.0547 TD 0.0149 Tc 0.8403 Tw (left parentheses in the pattern to avoid ambiguities that can arise from nested) Tj
0 -12.0547 TD -0.0018 Tc -0.0069 Tw (subpatterns. ) Tj
24.1095 -12.0547 TD 0.0135 Tc 1.0225 Tw (Example 11\2262 uses ) Tj
ET
BT
227.76 622.32 TD
/F5 9 Tf
-0.02 Tc 0 Tw (regexp) Tj
ET
BT
0.9955 0 0 0.9955 260.04 622.32 Tm
/F4 10 Tf
0.0084 Tc 0.9925 Tw ( to pick the hostname out of the ) Tj
ET
BT
416.52 622.32 TD
/F5 9 Tf
0 Tc 0 Tw (DISPLAY) Tj
ET
BT
0.9955 0 0 0.9955 454.32 622.32 Tm
/F4 10 Tf
0.0108 Tc 0.9448 Tw ( envi-) Tj
-346.9357 -12.0547 TD 0.009 Tc 0.0064 Tw (ronment variable, which has the form:) Tj
ET
BT
144.96 597 TD
/F9 9 Tf
-0.0052 Tc 0 Tw (hostname:display.screen) Tj
ET
1 1 1 rg
108.96 564 372 8.04 re f
0 0 0 rg
131.76 567.72 0.24 0.48 re f
480 567.72 0.24 0.48 re f
132 567.72 348 0.48 re f
BT
132.96 574.68 TD
/F1 7.92 Tf
0.0436 Tc 0.0347 Tw (Example ) Tj
-0.1235 Tc 0 Tw (11\226) Tj
4.1165 Tc (2) Tj
56.52 0 TD /F0 7.92 Tf
0.0419 Tc -0.0637 Tw (Using regular expressions to parse a string.) Tj
-56.52 -22.68 TD /F5 9 Tf
-0.0052 Tc 0.0052 Tw (set env\(DISPLAY\) sage:0.1) Tj
0 -9.96 TD -0.0063 Tc 0.0063 Tw (regexp {\([^:]*\):} $env\(DISPLAY\) match host) Tj
0 -10.08 TD /F9 9 Tf
0 Tc 0 Tw (=> 1) Tj
0 -9.96 TD /F5 9 Tf
(set match) Tj
T* /F9 9 Tf
(=> sage:) Tj
0 -10.08 TD /F5 9 Tf
(set host) Tj
ET
1 1 1 rg
108.96 480.96 372 8.04 re f
0 0 0 rg
131.76 484.8 0.24 0.48 re f
480 484.8 0.24 0.48 re f
132 484.8 348 0.48 re f
BT
132.96 492 TD
/F9 9 Tf
(=> sage) Tj
ET
BT
0.9955 0 0 0.9955 132.96 465.36 Tm
/F4 10 Tf
0.0195 Tc 0.3534 Tw (The pattern involves a complementary set, ) Tj
ET
BT
335.28 465.36 TD
/F5 9 Tf
0 Tc 0 Tw ([^:]) Tj
ET
BT
0.9955 0 0 0.9955 356.88 465.36 Tm
/F4 10 Tf
0.0177 Tc 0.3352 Tw (, to match anything except) Tj
-249.0511 -12.0547 TD 0.0219 Tc 1.1025 Tw (a colon. It uses repetition, ) Tj
ET
BT
237 453.36 TD
/F5 9 Tf
0 Tc 0 Tw (*) Tj
ET
BT
0.9955 0 0 0.9955 242.4 453.36 Tm
/F4 10 Tf
0.011 Tc 1.1376 Tw (, to repeat that zero or more times. It groups that) Tj
-134.0488 -12.0547 TD 0.016 Tc 1.1808 Tw (part into a subexpression with parentheses. The literal colon ensures that the) Tj
ET
BT
108.96 429.36 TD
/F5 9 Tf
0 Tc 0 Tw (DISPLAY) Tj
ET
BT
0.9955 0 0 0.9955 146.76 429.36 Tm
/F4 10 Tf
0.0203 Tc -0.2423 Tw ( value matches the format we expect. The part of the string that matches) Tj
-37.9725 -12.0547 TD 0.0148 Tc -0.1441 Tw (the complete pattern is stored into the ) Tj
ET
BT
287.64 417.36 TD
/F5 9 Tf
0 Tc 0 Tw (match) Tj
ET
BT
0.9955 0 0 0.9955 314.64 417.36 Tm
/F4 10 Tf
0.0049 Tc -0.1342 Tw ( variable. The part that matches the) Tj
-206.6184 -12.0547 TD 0.0161 Tc 0.3067 Tw (subpattern is stored into ) Tj
ET
BT
226.8 405.36 TD
/F5 9 Tf
0 Tc 0 Tw (host) Tj
ET
BT
0.9955 0 0 0.9955 248.4 405.36 Tm
/F4 10 Tf
0.0194 Tc 0.2732 Tw (. The whole pattern has been grouped with braces) Tj
-140.0762 -12.0547 TD 0.0068 Tc 0.0113 Tw (to quote the square brackets. Without braces it would be:) Tj
ET
BT
144.96 380.04 TD
/F5 9 Tf
-0.0063 Tc 0.0063 Tw (regexp \(\\[^:\\]*\): $env\(DISPLAY\) match host) Tj
ET
BT
0.9955 0 0 0.9955 132.96 366.36 Tm
/F4 10 Tf
0.0152 Tc -0.0756 Tw (With advanced regular expressions the nongreedy quantifier ) Tj
ET
BT
415.32 366.36 TD
/F5 9 Tf
0 Tc 0 Tw (*?) Tj
ET
BT
0.9955 0 0 0.9955 426.12 366.36 Tm
/F4 10 Tf
0.0083 Tc -0.017 Tw ( can replace) Tj
-318.607 -12.0547 TD 0.0181 Tc -0.0269 Tw (the complementary set:) Tj
ET
BT
144.96 341.04 TD
/F5 9 Tf
-0.0071 Tc 0.0071 Tw (regexp \(.*?\): $env\(DISPLAY\) match host) Tj
ET
BT
0.9955 0 0 0.9955 132.96 327.36 Tm
/F4 10 Tf
0.0199 Tc -0.2456 Tw (This is quite a powerful statement, and it is efficient. If we had only had the) Tj
ET
BT
108.96 315.36 TD
/F5 9 Tf
0 Tc 0 Tw (string) Tj
ET
BT
0.9955 0 0 0.9955 141.36 315.36 Tm
/F4 10 Tf
0.0093 Tc 0.2787 Tw ( command to work with, we would have needed to resort to the following,) Tj
-32.5478 -12.0547 TD 0.0181 Tc -0.0268 Tw (which takes roughly twice as long to interpret:) Tj
ET
BT
144.96 290.04 TD
/F5 9 Tf
-0.0077 Tc 0.0077 Tw (set i [string first : $env\(DISPLAY\)]) Tj
0 -13.08 TD -0.012 Tc 0.012 Tw (if {$i >= 0} {) Tj
24 -12.96 TD -0.0082 Tc 0.0082 Tw (set host [string range $env\(DISPLAY\) 0 [expr $i-1]]) Tj
-24 -12.96 TD 0 Tc 0 Tw (}) Tj
ET
BT
0.9955 0 0 0.9955 132.96 221.4 Tm
/F2 10 Tf
0.0285 Tc -0.0573 Tw (A Pattern to Match URLs) Tj
0 -18.0821 TD /F4 10 Tf
0.0144 Tc 3.8796 Tw (Example 11\2263 demonstrates a pattern with several subpatterns that) Tj
-24.1095 -12.0547 TD 0.0138 Tc 0.5286 Tw (extract the different parts of a URL. There are lots of subpatterns, and you can) Tj
0 -12.0547 TD 0.0117 Tc -0.2615 Tw (determine which match variable is associated with which subpattern by counting) Tj
T* 0.0129 Tc 0.0155 Tw (the left parenthesis. The pattern will be discussed in more detail after the exam-) Tj
T* 0.0196 Tc 0 Tw (ple:) Tj
ET
endstream
endobj
137 0 obj
8259
endobj
134 0 obj
<<
/Type /Page
/Parent 135 0 R
/Resources <<
/Font 138 0 R
/ProcSet 2 0 R
>>
/Contents 136 0 R
>>
endobj
138 0 obj
<<
/F0 6 0 R
/F1 7 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
/F9 32 0 R
>>
endobj
140 0 obj
<<
/Length 141 0 R
>>
stream
BT
114 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0365 Tc -0.0782 Tw (150 ) Tj
256.92 0 TD 0.03 Tc 0.0483 Tw (Regular Expressions) Tj
73.8 0 TD 0.0261 Tc 0.0282 Tw ( Chap. 11) Tj
ET
113.52 701.88 0.48 0.96 re f
486 701.88 0.48 0.96 re f
114 701.88 372 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
554.76 746.76 0.24 0.48 re f
584.04 746.76 0.24 0.48 re f
555 746.76 29.04 0.48 re f
585 80.76 0.24 0.48 re f
553.8 80.76 0.24 0.48 re f
554.04 80.76 30.96 0.48 re f
548.76 69.96 0.48 0.24 re f
548.76 33.72 0.48 0.24 re f
548.76 33.96 0.48 36 re f
1 1 1 rg
114 660.96 372 8.04 re f
0 0 0 rg
136.8 664.8 0.24 0.48 re f
485.04 664.8 0.24 0.48 re f
137.04 664.8 348 0.48 re f
BT
138 671.64 TD
/F1 7.92 Tf
0.0054 Tc -0.0472 Tw (Example 11\226) Tj
3.9965 Tc 0 Tw (3) Tj
56.4 0 TD /F0 7.92 Tf
0.0505 Tc -0.0922 Tw (A pattern to match URLs.) Tj
-56.4 -22.68 TD /F5 9 Tf
-0.0088 Tc 0.0088 Tw (set url http://www.beedub.com:80/index.html) Tj
0 -9.96 TD -0.0171 Tc 0.0171 Tw (regexp {) Tj
43.08 0 TD -0.0069 Tc 0 Tw (\([^:]+\)://\([^:/]+\)\(:\([0-9]+\)\)?\(/.*\)) Tj
188.76 0 TD 0 Tc (} $url \\) Tj
-213.84 -9.96 TD -0.0086 Tc 0.0086 Tw (match protocol x serverport path) Tj
-18 -10.08 TD /F9 9 Tf
0 Tc 0 Tw (=> 1) Tj
0 -9.96 TD /F5 9 Tf
-0.015 Tc 0.015 Tw (set match) Tj
T* /F9 9 Tf
-0.0097 Tc 0.0097 Tw (=> http://www.beedub.com:80/index.html) Tj
0 -10.08 TD /F5 9 Tf
-0.0109 Tc 0.0109 Tw (set protocol) Tj
0 -9.96 TD /F9 9 Tf
-0.02 Tc 0.02 Tw (=> http) Tj
T* /F5 9 Tf
-0.0133 Tc 0.0133 Tw (set server) Tj
0 -10.08 TD /F9 9 Tf
-0.0075 Tc 0.0075 Tw (=> www.beedub.com) Tj
0 -9.96 TD /F5 9 Tf
-0.03 Tc 0.03 Tw (set x) Tj
T* /F9 9 Tf
-0.024 Tc 0.024 Tw (=> :80) Tj
0 -10.08 TD /F5 9 Tf
-0.0171 Tc 0.0171 Tw (set port) Tj
0 -9.96 TD /F9 9 Tf
-0.03 Tc 0.03 Tw (=> 80) Tj
T* /F5 9 Tf
-0.0171 Tc 0.0171 Tw (set path) Tj
ET
1 1 1 rg
114 488.04 372 7.92 re f
0 0 0 rg
136.8 491.76 0.24 0.48 re f
485.04 491.76 0.24 0.48 re f
137.04 491.76 348 0.48 re f
BT
138 498.96 TD
/F9 9 Tf
-0.0092 Tc 0.0092 Tw (=> /index.html) Tj
ET
BT
0.9955 0 0 0.9955 138 472.32 Tm
/F4 10 Tf
0.0179 Tc -0.117 Tw (Let\222s look at the pattern one piece at a time. The first part looks for the pro-) Tj
-24.1095 -12.0547 TD 0.02 Tc -0.2202 Tw (tocol, which is separated by a colon from the rest of the URL. The first part of the) Tj
0 -12.0547 TD 0.0102 Tc 0.5356 Tw (pattern is one or more characters that are not a colon, followed by a colon. This) Tj
T* 0.0099 Tc -0.0186 Tw (matches the ) Tj
ET
BT
172.92 436.32 TD
/F5 9 Tf
0 Tc 0 Tw (http:) Tj
ET
BT
0.9955 0 0 0.9955 199.92 436.32 Tm
/F4 10 Tf
0.023 Tc -0.0317 Tw ( part of the URL:) Tj
ET
BT
150 423 TD
/F5 9 Tf
-0.02 Tc 0 Tw ([^:]+:) Tj
ET
BT
0.9955 0 0 0.9955 138 409.32 Tm
/F4 10 Tf
0.0171 Tc -0.0259 Tw (Using nongreedy ) Tj
ET
BT
219.12 409.32 TD
/F5 9 Tf
0 Tc 0 Tw (+?) Tj
ET
BT
0.9955 0 0 0.9955 229.8 409.32 Tm
/F4 10 Tf
0.0213 Tc -0.0301 Tw ( quantifie) Tj
-0.9461 Tc 0 Tw (r) Tj
0.0179 Tc -0.0267 Tw (, you could also write that as:) Tj
ET
BT
150 396 TD
/F5 9 Tf
0 Tc 0 Tw (.+?:) Tj
ET
BT
0.9955 0 0 0.9955 138 382.32 Tm
/F4 10 Tf
0.0118 Tc 0.7862 Tw (The next part of the pattern looks for the server name, which comes after) Tj
-24.1095 -12.0547 TD 0.0158 Tc 0.1391 Tw (two slashes. The server name is followed either by a colon and a port numbe) Tj
-0.9461 Tc 0 Tw (r) Tj
0.0234 Tc 0.0883 Tw (, or) Tj
0 -12.0547 TD 0.0122 Tc 1.7224 Tw (by a slash. The pattern uses a complementary set that specifies one or more) Tj
T* 0.0106 Tc 0.8245 Tw (characters that are ) Tj
94.027 0 TD /F7 10 Tf
0.0234 Tc 0 Tw (not) Tj
14.7068 0 TD /F4 10 Tf
0.0164 Tc 0.8187 Tw ( a colon or a slash. This matches the ) Tj
ET
BT
399.72 346.32 TD
/F5 9 Tf
-0.0075 Tc 0 Tw (//www.beedub.com) Tj
ET
BT
0.9955 0 0 0.9955 114 334.32 Tm
/F4 10 Tf
0.023 Tc -0.0317 Tw (part of the URL:) Tj
ET
BT
150 321 TD
/F5 9 Tf
-0.015 Tc 0 Tw (//[^:/]+) Tj
ET
BT
0.9955 0 0 0.9955 138 307.32 Tm
/F4 10 Tf
0.0198 Tc 0.1468 Tw (The port number is optional, so a subpattern is delimited with parentheses) Tj
-24.1095 -12.0547 TD 0.0216 Tc 0.5075 Tw (and followed by a question mark. An additional set of parentheses are added to) Tj
0 -12.0547 TD 0.0159 Tc 0.085 Tw (capture the port number without the leading colon. This matches the ) Tj
ET
BT
436.2 283.32 TD
/F5 9 Tf
-0.04 Tc 0 Tw (:80) Tj
ET
BT
0.9955 0 0 0.9955 452.4 283.32 Tm
/F4 10 Tf
0.0191 Tc 0.0926 Tw ( part of) Tj
-339.9439 -12.0547 TD 0.0262 Tc -0.035 Tw (the URL:) Tj
ET
BT
150 258 TD
/F5 9 Tf
-0.01 Tc 0 Tw (\(:\([0-9]+\)\)?) Tj
ET
BT
0.9955 0 0 0.9955 138 244.32 Tm
/F4 10 Tf
0.0117 Tc 0.8234 Tw (The last part of the pattern is everything else, starting with a slash. This) Tj
-24.1095 -12.0547 TD 0.0099 Tc -0.0186 Tw (matches the ) Tj
ET
BT
172.92 232.32 TD
/F5 9 Tf
0 Tc 0 Tw (/index.html) Tj
ET
BT
0.9955 0 0 0.9955 232.32 232.32 Tm
/F4 10 Tf
0.023 Tc -0.0317 Tw ( part of the URL:) Tj
ET
BT
150 219 TD
/F5 9 Tf
0 Tc 0 Tw (/.*) Tj
ET
BT
0.9955 0 0 0.9955 138 205.32 Tm
/F7 10 Tf
-0.0011 Tc -0.0075 Tw (Use subpatterns to parse strings.) Tj
0 -13.0191 TD /F4 10 Tf
0.0047 Tc 1.8671 Tw (To make this pattern really useful, we delimit several subpatterns with) Tj
-24.1095 -12.0547 TD 0.0126 Tc 0 Tw (parentheses:) Tj
ET
BT
150 167.04 TD
/F5 9 Tf
-0.0069 Tc (\([^:]+\)://\([^:/]+\)\(:\([0-9]+\)\)?\(/.*\)) Tj
ET
BT
0.9955 0 0 0.9955 138 153.36 Tm
/F4 10 Tf
0.0059 Tc 1.3223 Tw (These parentheses do not change the way the pattern matches. Only the) Tj
-24.1095 -12.0547 TD 0.0157 Tc -0.145 Tw (optional port number really needs the parentheses in this example. Howeve) Tj
-0.9461 Tc 0 Tw (r) Tj
0.0132 Tc -0.1425 Tw (, the) Tj
ET
BT
114 129.36 TD
/F5 9 Tf
-0.02 Tc 0 Tw (regexp) Tj
ET
BT
0.9955 0 0 0.9955 146.4 129.36 Tm
/F4 10 Tf
0.0124 Tc 0.1396 Tw ( command gives us access to the strings that match these subpatterns. In) Tj
ET
1 1 1 rg
72.12 176.04 35.76 35.76 re f
90 210.12 m
74.04 194.04 l
90 178.08 l
105.96 194.04 l
90 210.12 l
f*
0 0 0 rg
90.24 209.88 m
74.28 193.8 l
73.92 193.8 l
74.28 194.16 l
90.24 178.2 l
90.24 177.84 l
89.88 178.2 l
105.84 194.16 l
106.2 194.16 l
106.44 193.92 l
106.2 193.8 l
90.12 177.72 l
89.88 177.84 l
73.8 193.92 l
73.92 194.16 l
89.88 210.24 l
90.24 209.88 l
f
105.84 193.8 m
89.88 209.88 l
89.88 210.24 l
90.12 210.48 l
90.24 210.24 l
106.2 194.16 l
105.84 193.8 l
f
0.302 0.302 0.302 rg
90 178.08 m
74.04 194.04 l
90 194.04 l
90 178.08 l
f*
0 0 0 rg
89.88 177.84 m
73.44 194.28 l
74.04 194.28 l
74.28 194.16 l
90.24 178.2 l
89.88 177.84 l
f
74.04 193.8 16.2 0.48 re f
90.24 194.04 m
90.24 177.48 l
89.88 177.84 l
89.76 178.08 l
89.76 194.04 l
90.24 194.04 l
f
0.102 0.102 0.102 rg
90 178.08 m
105.96 194.04 l
90 194.04 l
90 178.08 l
f*
0 0 0 rg
89.88 178.2 m
105.96 194.28 l
106.68 194.28 l
90.24 177.84 l
89.88 178.2 l
f
89.76 193.8 16.2 0.48 re f
90.24 194.04 m
90.24 177.84 l
89.76 177.36 l
89.76 194.04 l
90.24 194.04 l
f
0.702 0.702 0.702 rg
90 210.12 m
105.96 194.04 l
90 194.04 l
90 210.12 l
f*
0 0 0 rg
90.24 210.24 m
106.2 194.16 l
106.56 193.8 l
105.84 193.8 l
89.88 209.88 l
90.24 210.24 l
f
89.76 193.8 16.2 0.48 re f
89.76 194.04 m
89.76 210.72 l
90.24 210.24 l
90.24 194.04 l
89.76 194.04 l
f
0.9686 0.9686 0.9686 rg
90 210.12 m
74.04 194.04 l
90 194.04 l
90 210.12 l
f*
0 0 0 rg
90.24 209.88 m
74.28 193.8 l
73.56 193.8 l
73.92 194.16 l
89.88 210.24 l
90.24 209.88 l
f
74.04 193.8 16.2 0.48 re f
89.76 194.04 m
89.76 210.12 l
90.24 210.6 l
90.24 194.04 l
89.76 194.04 l
f
0.502 0.502 0.502 rg
90 201.12 m
83.04 194.04 l
90 187.08 l
96.96 194.04 l
90 201.12 l
f*
0.102 0.102 0.102 rg
90.24 200.88 m
83.28 193.8 l
82.92 193.8 l
83.28 194.16 l
90.24 187.2 l
90.24 186.84 l
89.88 187.2 l
96.84 194.16 l
97.2 194.16 l
97.44 193.92 l
97.2 193.8 l
90.12 186.72 l
89.88 186.84 l
82.8 193.92 l
82.92 194.16 l
89.88 201.24 l
90.24 200.88 l
f
96.84 193.8 m
89.88 200.88 l
89.88 201.24 l
90.12 201.48 l
90.24 201.24 l
97.2 194.16 l
96.84 193.8 l
f
endstream
endobj
141 0 obj
8469
endobj
139 0 obj
<<
/Type /Page
/Parent 135 0 R
/Resources <<
/Font 142 0 R
/ProcSet 2 0 R
>>
/Contents 140 0 R
>>
endobj
142 0 obj
<<
/F0 6 0 R
/F1 7 0 R
/F4 14 0 R
/F5 16 0 R
/F7 25 0 R
/F9 32 0 R
>>
endobj
144 0 obj
<<
/Length 145 0 R
>>
stream
BT
108.96 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0513 Tc -0.093 Tw (The ) Tj
16.08 0 TD /F5 7.92 Tf
0.048 Tc 0 Tw (regexp) Tj
28.68 0 TD /F0 7.92 Tf
0.0447 Tc 0.0335 Tw ( Command) Tj
312 0 TD 0.0765 Tc 0 Tw (151) Tj
ET
108.48 701.88 0.48 0.96 re f
480.72 701.88 0.48 0.96 re f
108.96 701.88 371.76 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
553.8 746.76 0.24 0.48 re f
585 746.76 0.24 0.48 re f
554.04 746.76 30.96 0.48 re f
585 80.76 0.24 0.48 re f
554.76 80.76 0.24 0.48 re f
555 80.76 30 0.48 re f
547.8 75 0.48 0.24 re f
547.8 34.8 0.48 0.24 re f
547.8 35.04 0.48 39.96 re f
510 504 54 108 re f
510 611.76 54.24 0.48 re f
563.76 503.76 0.48 108.24 re f
509.76 503.76 54.24 0.48 re f
509.76 504 0.48 108.24 re f
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 605.52 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 602.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 598.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (.) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 595.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 592.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (A) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 583.2 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 575.28 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (v) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 568.56 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (a) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 560.64 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (n) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 553.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 545.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (e) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 538.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 530.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 526.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (T) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 521.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 514.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (l) Tj
ET
Q
BT
0.9955 0 0 0.9955 108.96 670.32 Tm
/F4 10 Tf
0.0251 Tc 0.147 Tw (one step ) Tj
ET
BT
150.36 670.32 TD
/F5 9 Tf
0 Tc 0 Tw (regexp) Tj
ET
BT
0.9955 0 0 0.9955 182.64 670.32 Tm
/F4 10 Tf
0.0131 Tc 0.2193 Tw ( can test for a valid URL and divide it into the protocol part, the) Tj
-74.0162 -12.0547 TD 0.0281 Tc 0 Tw (serve) Tj
-1.0667 Tc (r) Tj
0.0185 Tc -0.01 Tw (, the port, and the trailing path. ) Tj
24.1095 -12.0547 TD 0.0134 Tc 1.5779 Tw (The parentheses around the port number include the : before the digits.) Tj
-24.1095 -12.0547 TD 0.0114 Tc 0.5424 Tw (We\222ve used a dummy variable that gets the : and the port numbe) Tj
-0.9461 Tc 0 Tw (r) Tj
0.0192 Tc 0.5145 Tw (, and another) Tj
0 -12.0547 TD 0.0125 Tc 0.2027 Tw (match variable that just gets the port numbe) Tj
-1.0667 Tc 0 Tw (r) Tj
0.0171 Tc 0.1851 Tw (. By using noncapturing parenthe-) Tj
T* 0.0106 Tc 1.1204 Tw (ses in advanced regular expressions, we can eliminate the unused match vari-) Tj
T* -0.0241 Tc 0.8593 Tw (able. ) Tj
0.0051 Tc 0.8542 Tw (We can also replace both complementary character sets with a nongreedy) Tj
ET
BT
108.96 586.32 TD
/F5 9 Tf
0 Tc 0 Tw (.+?) Tj
ET
BT
0.9955 0 0 0.9955 125.16 586.32 Tm
/F4 10 Tf
0.0139 Tc 0.0175 Tw ( match. Example 11\2264 shows this variation:) Tj
ET
1 1 1 rg
108.96 552.96 372 8.04 re f
0 0 0 rg
131.76 556.8 0.24 0.48 re f
480 556.8 0.24 0.48 re f
132 556.8 348 0.48 re f
BT
132.96 563.64 TD
/F1 7.92 Tf
0.0436 Tc 0.0347 Tw (Example ) Tj
-0.1235 Tc 0 Tw (11\226) Tj
4.1165 Tc (4) Tj
56.52 0 TD /F0 7.92 Tf
0.0292 Tc 0.049 Tw (An advanced regular expression to match URLs.) Tj
-56.52 -22.68 TD /F5 9 Tf
-0.0067 Tc 0.0067 Tw (set url http://www.beedub.com:80/book/) Tj
0 -9.96 TD 0 Tc 0 Tw (regexp {) Tj
43.2 0 TD -0.0075 Tc (\(.+?\)://\(.+?\)\(?::\([0-9]+\)\)?\(/.*\)) Tj
172.56 0 TD -0.02 Tc 0.02 Tw (} $url \\) Tj
-197.76 -9.96 TD -0.0044 Tc -0.0256 Tw (match protocol server port path) Tj
-18 -10.08 TD /F9 9 Tf
0 Tc 0 Tw (=> 1) Tj
0 -9.96 TD /F5 9 Tf
(set match) Tj
T* /F9 9 Tf
-0.0075 Tc 0.0075 Tw (=> http://www.beedub.com:80/book/) Tj
0 -10.08 TD /F5 9 Tf
-0.0109 Tc 0.0109 Tw (set protocol) Tj
0 -9.96 TD /F9 9 Tf
0 Tc 0 Tw (=> http) Tj
T* /F5 9 Tf
(set server) Tj
0 -10.08 TD /F9 9 Tf
-0.0075 Tc 0.0075 Tw (=> www.beedub.com) Tj
0 -9.96 TD /F5 9 Tf
0 Tc 0 Tw (set port) Tj
T* /F9 9 Tf
(=> 80) Tj
0 -10.08 TD /F5 9 Tf
(set path) Tj
ET
1 1 1 rg
108.96 399.96 372 8.04 re f
0 0 0 rg
131.76 403.8 0.24 0.48 re f
480 403.8 0.24 0.48 re f
132 403.8 348 0.48 re f
BT
132.96 411 TD
/F9 9 Tf
(=> /book/) Tj
ET
BT
0.9955 0 0 0.9955 132.96 374.4 Tm
/F2 10 Tf
0.0136 Tc 0.0179 Tw (Sample Regular Expressions) Tj
0 -18.0821 TD /F4 10 Tf
0.0171 Tc 0.0947 Tw (The table in this section lists regular expressions as you would use them in) Tj
-24.1095 -12.0547 TD 0.0169 Tc -0.1184 Tw (Tcl commands. Most are quoted with curly braces to turn off the special meaning) Tj
0 -12.0547 TD 0.0123 Tc 1.9516 Tw (of square brackets and dollar signs. Other patterns are grouped with double) Tj
T* 0.0168 Tc 3.7115 Tw (quotes and use backslash quoting because the patterns include backslash) Tj
T* 0.0209 Tc -0.1502 Tw (sequences like ) Tj
ET
BT
177.96 308.4 TD
/F5 9 Tf
-0.06 Tc 0 Tw (\\n) Tj
ET
BT
0.9955 0 0 0.9955 188.76 308.4 Tm
/F4 10 Tf
0.0205 Tc -0.1498 Tw ( and ) Tj
ET
BT
211.32 308.4 TD
/F5 9 Tf
0 Tc 0 Tw (\\t.) Tj
ET
BT
0.9955 0 0 0.9955 227.52 308.4 Tm
/F4 10 Tf
0.0145 Tc -0.1438 Tw ( In Tcl 8.0 and earlie) Tj
-1.0667 Tc 0 Tw (r) Tj
0.0133 Tc -0.1425 Tw (, these must be substituted by Tcl) Tj
-119.1009 -12.0547 TD 0.0187 Tc 1.3589 Tw (before the ) Tj
ET
BT
160.56 296.4 TD
/F5 9 Tf
-0.02 Tc 0 Tw (regexp) Tj
ET
BT
0.9955 0 0 0.9955 192.84 296.4 Tm
/F4 10 Tf
0.0114 Tc 1.3461 Tw ( command is called. In these cases, the equivalent advanced) Tj
-84.2627 -12.0547 TD 0.0218 Tc -0.0306 Tw (regular expression is also shown.) Tj
ET
BT
114.96 257.64 TD
/F1 7.92 Tf
-0.0822 Tc 0.1004 Tw (Table 11\226) Tj
3.9965 Tc -3.9182 Tw (7 ) Tj
48.36 0 TD /F0 7.92 Tf
0.0338 Tc -0.0155 Tw (Sample regular expressions) Tj
2.2382 Tc 0 Tw (.) Tj
-44.28 -16.68 TD /F5 9 Tf
0 Tc ({^[yY]}) Tj
144 0 TD /F10 9 Tf
0.003 Tc -0.063 Tw (Begins with y or ) Tj
-1.098 Tc 0 Tw (Y) Tj
0.0425 Tc -0.1325 Tw (, as in a ) Tj
-0.858 Tc 0 Tw (Y) Tj
-0.0617 Tc 0.0917 Tw (es answer.) Tj
-144 -16.92 TD /F5 9 Tf
-0.0071 Tc 0 Tw ({^\(yes|YES|Yes\)$}) Tj
144 0 TD /F10 9 Tf
-0.0056 Tc -0.0244 Tw (Exactly "yes", ") Tj
-0.858 Tc 0 Tw (Y) Tj
-0.0193 Tc 0.0493 Tw (es", or "YES".) Tj
-144 -17.04 TD /F5 9 Tf
0 Tc 0 Tw ("^\\[^ \\t:\\]+:") Tj
144 0 TD /F10 9 Tf
-0.0022 Tc -0.0212 Tw (Begins with colon-delimited field that has no spaces or ) Tj
0 -9.96 TD -0.0138 Tc 0 Tw (tabs.) Tj
-144 -17.04 TD /F5 9 Tf
0 Tc ({^\\S+:}) Tj
144 0 TD /F10 9 Tf
-0.0176 Tc 0.0476 Tw (Same as above, using ) Tj
79.56 0 TD /F5 9 Tf
0 Tc 0 Tw (\\S) Tj
10.8 0 TD /F10 9 Tf
-0.0156 Tc 0.0456 Tw ( for "not space".) Tj
-234.36 -17.04 TD /F5 9 Tf
0 Tc 0 Tw ("^\\[ \\t]*$") Tj
144 0 TD /F10 9 Tf
-0.0061 Tc -0.0039 Tw (A string of all spaces or tabs.) Tj
-144 -16.92 TD /F5 9 Tf
0 Tc 0 Tw ({\(?n\)^\\s*$}) Tj
144 0 TD /F10 9 Tf
-0 Tc -0.0494 Tw (A blank line using newline sensitive mode.) Tj
ET
114.96 250.8 360 0.48 re f
114.96 138.72 360 0.48 re f
endstream
endobj
145 0 obj
8110
endobj
143 0 obj
<<
/Type /Page
/Parent 135 0 R
/Resources <<
/Font 146 0 R
/ProcSet 2 0 R
>>
/Contents 144 0 R
>>
endobj
146 0 obj
<<
/F0 6 0 R
/F1 7 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
/F9 32 0 R
/F10 119 0 R
>>
endobj
148 0 obj
<<
/Length 149 0 R
>>
stream
BT
114 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0365 Tc -0.0782 Tw (152 ) Tj
256.92 0 TD 0.03 Tc 0.0483 Tw (Regular Expressions) Tj
73.8 0 TD 0.0261 Tc 0.0282 Tw ( Chap. 11) Tj
ET
113.52 701.88 0.48 0.96 re f
486 701.88 0.48 0.96 re f
114 701.88 372 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
554.76 746.76 0.24 0.48 re f
584.04 746.76 0.24 0.48 re f
555 746.76 29.04 0.48 re f
585 80.76 0.24 0.48 re f
553.8 80.76 0.24 0.48 re f
554.04 80.76 30.96 0.48 re f
548.76 69.96 0.48 0.24 re f
548.76 33.72 0.48 0.24 re f
548.76 33.96 0.48 36 re f
BT
0.997 0 0 0.997 114 357.36 Tm
/F2 13 Tf
0.2695 Tc -0.0585 Tw (The ) Tj
ET
BT
140.28 357.36 TD
/F8 13.92 Tf
0.048 Tc 0 Tw (regsub) Tj
ET
BT
0.997 0 0 0.997 190.56 357.36 Tm
/F2 13 Tf
0.3135 Tc 0.0177 Tw ( Command) Tj
ET
BT
0.9955 0 0 0.9955 114 336.36 Tm
/F4 10 Tf
0.0176 Tc 0.8174 Tw (The ) Tj
ET
BT
135.36 336.36 TD
/F5 9 Tf
-0.02 Tc 0 Tw (regsub) Tj
ET
BT
0.9955 0 0 0.9955 167.64 336.36 Tm
/F4 10 Tf
0.0096 Tc 0.8255 Tw ( command does string substitution based on pattern matching. It is) Tj
-53.8847 -12.0547 TD 0.0155 Tc 0.699 Tw (very useful for processing your data. It can perform simple tasks like replacing) Tj
0 -12.0547 TD 0.0226 Tc 0.9608 Tw (sequences of spaces and tabs with a single space. It can perform complex data) Tj
T* 0.0089 Tc -0.0055 Tw (transforms, too, as described in the next section. Its syntax is:) Tj
ET
BT
150 287.04 TD
/F5 9 Tf
-0.0171 Tc 0.0171 Tw (regsub ?) Tj
43.08 0 TD /F9 9 Tf
0 Tc 0 Tw (switches) Tj
43.2 0 TD /F5 9 Tf
(? ) Tj
10.8 0 TD /F9 9 Tf
-0.0089 Tc 0.0089 Tw (pattern string subspec varname) Tj
ET
BT
0.9955 0 0 0.9955 138 273.36 Tm
/F4 10 Tf
0.0176 Tc 0.2147 Tw (The ) Tj
ET
BT
158.76 273.36 TD
/F5 9 Tf
-0.02 Tc 0 Tw (regsub) Tj
ET
BT
0.9955 0 0 0.9955 191.04 273.36 Tm
/F4 10 Tf
0.0171 Tc 0.1617 Tw ( command returns the number of matches and replacements, or) Tj
-77.3915 -12.0547 TD 0.0067 Tc 0.2457 Tw (0 if there was no match. ) Tj
ET
BT
229.08 261.36 TD
/F5 9 Tf
-0.02 Tc 0 Tw (regsub) Tj
ET
BT
0.9955 0 0 0.9955 261.36 261.36 Tm
/F4 10 Tf
0.0191 Tc 0.2132 Tw ( copies ) Tj
ET
BT
295.32 261.36 TD
/F9 9 Tf
0 Tc 0 Tw (string) Tj
ET
BT
0.9955 0 0 0.9955 327.72 261.36 Tm
/F4 10 Tf
0.0132 Tc 0.2191 Tw ( to ) Tj
ET
BT
342.6 261.36 TD
/F9 9 Tf
-0.0343 Tc 0 Tw (varname) Tj
ET
BT
0.9955 0 0 0.9955 380.28 261.36 Tm
/F4 10 Tf
0.0219 Tc 0.2104 Tw (, replacing occurrences) Tj
-267.4949 -12.0547 TD -0.008 Tc 1.4459 Tw (of ) Tj
ET
BT
126.48 249.36 TD
/F9 9 Tf
0 Tc 0 Tw (pattern) Tj
ET
BT
0.9955 0 0 0.9955 164.28 249.36 Tm
/F4 10 Tf
0.0156 Tc 1.4022 Tw ( with the substitution specified by ) Tj
ET
BT
332.4 249.36 TD
/F9 9 Tf
-0.0343 Tc 0 Tw (subspec) Tj
ET
BT
0.9955 0 0 0.9955 369.96 249.36 Tm
/F4 10 Tf
0.0246 Tc 1.365 Tw (. If the pattern does not) Tj
-257.1278 -12.0547 TD 0.0116 Tc 2.4509 Tw (match, then ) Tj
ET
BT
177.12 237.36 TD
/F9 9 Tf
-0.02 Tc 0 Tw (string) Tj
ET
BT
0.9955 0 0 0.9955 209.4 237.36 Tm
/F4 10 Tf
0.0047 Tc 2.4879 Tw ( is copied to ) Tj
ET
BT
276 237.36 TD
/F9 9 Tf
-0.0171 Tc 0 Tw (varname) Tj
ET
BT
0.9955 0 0 0.9955 313.8 237.36 Tm
/F4 10 Tf
0.0142 Tc 2.4784 Tw ( without modification. The optional) Tj
-200.7116 -12.0547 TD 0.0101 Tc -0.0188 Tw (switches include:) Tj
8.4383 -20.1314 TD /F3 10 Tf
-0.0354 Tc 0 Tw (\225) Tj
ET
BT
135.6 205.32 TD
/F5 9 Tf
0 Tc (-all) Tj
ET
BT
0.9955 0 0 0.9955 157.2 205.32 Tm
/F4 10 Tf
0.0166 Tc -0.113 Tw (, which means to replace all occurrences of the pattern. Otherwise, only) Tj
-19.2876 -12.0547 TD 0.0172 Tc -0.0259 Tw (the first occurrence is replaced. ) Tj
-15.6712 -13.0191 TD /F3 10 Tf
-0.0354 Tc 0 Tw (\225) Tj
13.2602 0 TD /F4 10 Tf
0.0176 Tc 0.8174 Tw (The ) Tj
ET
BT
156.96 180.36 TD
/F5 9 Tf
-0.0343 Tc 0 Tw (-nocase) Tj
ET
BT
0.9955 0 0 0.9955 194.52 180.36 Tm
/F4 10 Tf
-0.0087 Tc 0.9644 Tw (, ) Tj
ET
BT
201 180.36 TD
/F5 9 Tf
-0.0133 Tc 0 Tw (-expanded) Tj
ET
BT
0.9955 0 0 0.9955 249.48 180.36 Tm
/F4 10 Tf
-0.0087 Tc 0.8439 Tw (, ) Tj
ET
BT
255.96 180.36 TD
/F5 9 Tf
-0.024 Tc 0 Tw (-line) Tj
ET
BT
0.9955 0 0 0.9955 282.72 180.36 Tm
/F4 10 Tf
-0.0087 Tc 0.8439 Tw (, ) Tj
ET
BT
289.08 180.36 TD
/F5 9 Tf
-0.0267 Tc 0 Tw (-linestop) Tj
ET
BT
0.9955 0 0 0.9955 337.44 180.36 Tm
/F4 10 Tf
0.0132 Tc 0.8822 Tw (, and ) Tj
ET
BT
364.92 180.36 TD
/F5 9 Tf
-0.0109 Tc 0 Tw (-lineanchor) Tj
ET
BT
0.9955 0 0 0.9955 424.2 180.36 Tm
/F4 10 Tf
0.0177 Tc 0.8174 Tw ( switches are) Tj
-287.5058 -12.0547 TD 0.0065 Tc 0.033 Tw (the same as in the ) Tj
ET
BT
225.36 168.36 TD
/F5 9 Tf
0 Tc 0 Tw (regexp) Tj
ET
BT
0.9955 0 0 0.9955 257.76 168.36 Tm
/F4 10 Tf
0.0202 Tc -0.0138 Tw ( command. They are described on page 148. ) Tj
-135.9776 -13.1397 TD /F3 10 Tf
-0.0354 Tc 0 Tw (\225) Tj
13.2602 0 TD /F4 10 Tf
0.0176 Tc -0.1469 Tw (The ) Tj
ET
BT
156 155.28 TD
/F5 9 Tf
0 Tc 0 Tw (--) Tj
ET
BT
0.9955 0 0 0.9955 166.8 155.28 Tm
/F4 10 Tf
0.0178 Tc -0.1362 Tw ( switch separates the pattern from the switches, which is necessary if) Tj
-28.9314 -12.0547 TD 0.02 Tc -0.0287 Tw (your pattern begins with a ) Tj
ET
BT
263.64 143.28 TD
/F5 9 Tf
0 Tc 0 Tw (-) Tj
ET
BT
0.9955 0 0 0.9955 269.04 143.28 Tm
/F4 10 Tf
-0.0087 Tc (.) Tj
ET
BT
123.96 654.96 TD
/F5 9 Tf
-0.0055 Tc ("\(\\n|^\)\\[^\\n\\]*\(\\n|$\)") Tj
144 0 TD /F10 9 Tf
-0.0146 Tc 0.0446 Tw (A blank line, the hard wa) Tj
-0.54 Tc 0 Tw (y) Tj
0.03 Tc (.) Tj
-144 -16.92 TD /F5 9 Tf
-0.0092 Tc ({^[A-Za-z]+$}) Tj
144 0 TD /F10 9 Tf
-0.0105 Tc 0.0405 Tw (Only letters.) Tj
-144 -17.04 TD /F5 9 Tf
-0.0075 Tc 0 Tw ({^[[:alpha:]]+$}) Tj
144 0 TD /F10 9 Tf
-0.0063 Tc 0.0063 Tw (Only letters, the Unicode wa) Tj
-0.54 Tc 0 Tw (y) Tj
0.03 Tc (.) Tj
-144 -17.04 TD /F5 9 Tf
-0.008 Tc ({[A-Za-z0-9_]+}) Tj
144 0 TD /F10 9 Tf
-0.0046 Tc 0.0046 Tw (Letters, digits, and the underscore.) Tj
-144 -16.92 TD /F5 9 Tf
0 Tc 0 Tw ({\\w+}) Tj
144 0 TD /F10 9 Tf
-0.0067 Tc 0.0167 Tw (Letters, digits, and the underscore using ) Tj
145.8 0 TD /F5 9 Tf
-0.3 Tc 0 Tw (\\w) Tj
10.2 0 TD /F10 9 Tf
0.03 Tc (.) Tj
-300 -17.04 TD /F5 9 Tf
-0.0109 Tc ({[][${}\\\\]}) Tj
144 0 TD /F10 9 Tf
0.0236 Tc -0.1136 Tw (The set of ) Tj
-0.0239 Tc 0.0139 Tw (Tcl special characters: ] [ $ { } \\ ) Tj
-144 -17.04 TD /F5 9 Tf
-0.01 Tc 0 Tw ("\\[^\\n\\]*\\n") Tj
144 0 TD /F10 9 Tf
0.0044 Tc -0.0644 Tw (Everything up to a newline.) Tj
-144 -16.92 TD /F5 9 Tf
0 Tc 0 Tw ({.*?\\n}) Tj
144 0 TD /F10 9 Tf
0.0017 Tc -0.0402 Tw (Everything up to a newline using nongreedy ) Tj
161.52 0 TD /F5 9 Tf
0 Tc 0 Tw (*?) Tj
-305.52 -17.04 TD ({\\.}) Tj
144 0 TD /F10 9 Tf
-0.0079 Tc 0.0379 Tw (A period.) Tj
-144 -17.04 TD /F5 9 Tf
-0.0075 Tc 0 Tw ({[][$^?+*\(\)|\\\\]}) Tj
144 0 TD /F10 9 Tf
0.0036 Tc -0.0736 Tw (The set of regular expression special characters:) Tj
0 -9.96 TD -0.0057 Tc 0.0117 Tw (] [ $ ^ ? + * \( \) | \\) Tj
-144 -17.04 TD /F5 9 Tf
-0.0086 Tc 0 Tw (\(.*?\)
) Tj
144 0 TD /F10 9 Tf
0.021 Tc -0.111 Tw (An ) Tj
13.32 0 TD /F5 9 Tf
0 Tc 0 Tw (H1) Tj
10.68 0 TD /F10 9 Tf
-0.0072 Tc 0.0222 Tw ( HTML tag. The subpattern matches the string ) Tj
-24 -9.96 TD -0.001 Tc -0.029 Tw (between the tags.) Tj
-144 -17.04 TD /F5 9 Tf
0 Tc 0 Tw () Tj
144 0 TD /F10 9 Tf
-0.0051 Tc 0.0351 Tw (HTML comments.) Tj
-144 -16.92 TD /F5 9 Tf
-0.005 Tc 0 Tw ({[0-9a-hA-H][0-9a-hA-H]}) Tj
144 0 TD /F10 9 Tf
0.0079 Tc -0.0979 Tw (2 hex digits.) Tj
-144 -17.04 TD /F5 9 Tf
-0.0071 Tc 0 Tw ({[[:xdigit:]]{2}}) Tj
144 0 TD /F10 9 Tf
-0.0031 Tc -0.0069 Tw (2 hex digits, using advanced regular expressions.) Tj
-144 -17.04 TD /F5 9 Tf
0 Tc 0 Tw ({\\d{1,3}}) Tj
144 0 TD /F10 9 Tf
0.001 Tc -0.0395 Tw (1 to 3 digits, using advanced regular expressions.) Tj
-147.96 274.68 TD /F1 7.92 Tf
-0.0972 Tc 0.1154 Tw (Table 11\226) Tj
4.1165 Tc -4.1582 Tw (7 ) Tj
48.24 0 TD /F0 7.92 Tf
0.0354 Tc 0.0028 Tw (Sample regular expressions. \(Continued\)) Tj
ET
120 664.8 360 0.48 re f
120 389.76 360 0.48 re f
endstream
endobj
149 0 obj
8426
endobj
147 0 obj
<<
/Type /Page
/Parent 135 0 R
/Resources <<
/Font 150 0 R
/ProcSet 2 0 R
>>
/Contents 148 0 R
>>
endobj
150 0 obj
<<
/F0 6 0 R
/F1 7 0 R
/F2 8 0 R
/F3 12 0 R
/F4 14 0 R
/F5 16 0 R
/F8 29 0 R
/F9 32 0 R
/F10 119 0 R
>>
endobj
152 0 obj
<<
/Length 153 0 R
>>
stream
BT
108.96 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0473 Tc -0.0891 Tw (Transforming Data to Program with ) Tj
126.72 0 TD /F5 7.92 Tf
0.048 Tc 0 Tw (regsub) Tj
230.04 0 TD /F0 7.92 Tf
0.0765 Tc (153) Tj
ET
108.48 701.88 0.48 0.96 re f
480.72 701.88 0.48 0.96 re f
108.96 701.88 371.76 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
553.8 746.76 0.24 0.48 re f
585 746.76 0.24 0.48 re f
554.04 746.76 30.96 0.48 re f
585 80.76 0.24 0.48 re f
554.76 80.76 0.24 0.48 re f
555 80.76 30 0.48 re f
547.8 75 0.48 0.24 re f
547.8 34.8 0.48 0.24 re f
547.8 35.04 0.48 39.96 re f
510 504 54 108 re f
510 611.76 54.24 0.48 re f
563.76 503.76 0.48 108.24 re f
509.76 503.76 54.24 0.48 re f
509.76 504 0.48 108.24 re f
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 605.52 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 602.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 598.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (.) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 595.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 592.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (A) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 583.2 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 575.28 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (v) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 568.56 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (a) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 560.64 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (n) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 553.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 545.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (e) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 538.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 530.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 526.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (T) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 521.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 514.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (l) Tj
ET
Q
BT
0.9955 0 0 0.9955 132.96 670.32 Tm
/F4 10 Tf
0.0169 Tc 0.0949 Tw (The replacement pattern, ) Tj
ET
BT
254.04 670.32 TD
/F9 9 Tf
-0.0343 Tc 0 Tw (subspec) Tj
ET
BT
0.9955 0 0 0.9955 291.6 670.32 Tm
/F4 10 Tf
0.0154 Tc 0.0964 Tw (, can contain literal characters as well as) Tj
-183.4733 -12.0547 TD 0.0164 Tc 0.015 Tw (the following special sequences:) Tj
8.4383 -20.0109 TD /F3 10 Tf
-0.0354 Tc 0 Tw (\225) Tj
ET
BT
130.56 638.4 TD
/F5 9 Tf
0 Tc (&) Tj
ET
BT
0.9955 0 0 0.9955 135.96 638.4 Tm
/F4 10 Tf
0.0207 Tc -0.0295 Tw ( is replaced with the string that matched the pattern.) Tj
-18.6849 -13.1397 TD /F3 10 Tf
-0.0354 Tc 0 Tw (\225) Tj
ET
BT
130.56 625.32 TD
/F5 9 Tf
0 Tc (\\) Tj
5.4 0 TD /F9 9 Tf
(x) Tj
ET
BT
0.9955 0 0 0.9955 141.36 625.32 Tm
/F4 10 Tf
0.0163 Tc -0.0652 Tw ( , where ) Tj
ET
BT
180.72 625.32 TD
/F9 9 Tf
0 Tc 0 Tw (x) Tj
ET
BT
0.9955 0 0 0.9955 186.12 625.32 Tm
/F4 10 Tf
0.0219 Tc -0.0306 Tw ( is a numbe) Tj
-1.0667 Tc 0 Tw (r) Tj
0.0136 Tc -0.0357 Tw (, is replaced with the string that matched the corre-) Tj
-53.4025 -12.0547 TD 0.0189 Tc 0.3741 Tw (sponding subpattern in ) Tj
ET
BT
244.44 613.32 TD
/F9 9 Tf
0 Tc 0 Tw (pattern) Tj
ET
BT
0.9955 0 0 0.9955 282.24 613.32 Tm
/F4 10 Tf
0.0136 Tc 0.4082 Tw (. The correspondence is based on the order) Tj
-149.9611 -12.0547 TD 0.0164 Tc -0.0051 Tw (of left parentheses in the pattern specification.) Tj
0 -18.0821 TD 0.0119 Tc 0.0061 Tw (The following replaces a user\222s home directory with a ~:) Tj
ET
BT
144.96 570 TD
/F5 9 Tf
-0.0067 Tc 0.0067 Tw (regsub ^$env\(HOME\)/ $pathname ~/ newpath) Tj
ET
BT
0.9955 0 0 0.9955 132.96 556.32 Tm
/F4 10 Tf
0.0125 Tc 0.027 Tw (The following constructs a C compile command line given a filename:) Tj
ET
BT
144.96 543 TD
/F5 9 Tf
-0.0086 Tc 0.0086 Tw (set file tclIO.c) Tj
0 -12.96 TD -0.0084 Tc 0.0084 Tw (regsub {\([^\\.]*\)\\.c$} $file {cc -c & -o \\1.o} ccCmd) Tj
ET
BT
0.9955 0 0 0.9955 132.96 516.36 Tm
/F4 10 Tf
0.0148 Tc 0.3984 Tw (The matching pattern captures everything before the trailing ) Tj
ET
BT
421.8 516.36 TD
/F5 9 Tf
0 Tc 0 Tw (.c) Tj
ET
BT
0.9955 0 0 0.9955 432.6 516.36 Tm
/F4 10 Tf
0.0166 Tc 0.3764 Tw ( in the file) Tj
-325.1166 -12.0547 TD 0.0036 Tc 1.0726 Tw (name. The ) Tj
ET
BT
162.6 504.36 TD
/F5 9 Tf
0 Tc 0 Tw (&) Tj
ET
BT
0.9955 0 0 0.9955 168 504.36 Tm
/F4 10 Tf
0.0154 Tc 1.0608 Tw ( is replaced with the complete match, ) Tj
ET
BT
350.28 504.36 TD
/F5 9 Tf
-0.0343 Tc 0 Tw (tclIO.c) Tj
ET
BT
0.9955 0 0 0.9955 387.84 504.36 Tm
/F4 10 Tf
0.0132 Tc 1.063 Tw (, and ) Tj
ET
BT
415.68 504.36 TD
/F5 9 Tf
0 Tc 0 Tw (\\1) Tj
ET
BT
0.9955 0 0 0.9955 426.48 504.36 Tm
/F4 10 Tf
0.0142 Tc 1.062 Tw ( is replaced) Tj
-318.9686 -12.0547 TD 0.0089 Tc 2.3933 Tw (with ) Tj
ET
BT
135 492.36 TD
/F5 9 Tf
-0.072 Tc 0 Tw (tclIO) Tj
ET
BT
0.9955 0 0 0.9955 161.64 492.36 Tm
/F4 10 Tf
0.0121 Tc 2.3499 Tw (, which matches the pattern between the parentheses. The value) Tj
-52.9203 -12.0547 TD 0.0202 Tc -0.0289 Tw (assigned to ) Tj
ET
BT
163.56 480.36 TD
/F5 9 Tf
0 Tc 0 Tw (ccCmd) Tj
ET
BT
0.9955 0 0 0.9955 190.56 480.36 Tm
/F4 10 Tf
0.0145 Tc -0.0232 Tw ( is:) Tj
ET
BT
144.96 467.04 TD
/F5 9 Tf
-0.006 Tc 0.006 Tw (cc -c tclIO.c -o tclIO.o) Tj
ET
BT
0.9955 0 0 0.9955 132.96 453.36 Tm
/F4 10 Tf
-0.0149 Tc 0.0665 Tw (We could execute that with:) Tj
ET
BT
144.96 440.04 TD
/F5 9 Tf
-0.0086 Tc 0.0086 Tw (eval exec $ccCmd) Tj
ET
BT
0.9955 0 0 0.9955 132.96 426.36 Tm
/F4 10 Tf
0.0163 Tc 0.0955 Tw (The following replaces sequences of multiple space characters with a single) Tj
-24.1095 -12.0547 TD 0.0276 Tc 0 Tw (space:) Tj
ET
BT
144.96 401.04 TD
/F5 9 Tf
-0.008 Tc 0.008 Tw (regsub -all {\\s+} $string " " string) Tj
ET
BT
0.9955 0 0 0.9955 132.96 387.36 Tm
/F4 10 Tf
0.0129 Tc 0.693 Tw (It is perfectly safe to specify the same variable as the input value and the) Tj
-24.1095 -12.0547 TD 0.0175 Tc 0.7934 Tw (result. Even if there is no match on the pattern, the input string is copied into) Tj
0 -12.0547 TD 0.0113 Tc -0.02 Tw (the output variable.) Tj
24.1095 -12.0547 TD 0.0176 Tc 2.5051 Tw (The ) Tj
ET
BT
156 351.36 TD
/F5 9 Tf
-0.02 Tc 0 Tw (regsub) Tj
ET
BT
0.9955 0 0 0.9955 188.28 351.36 Tm
/F4 10 Tf
0.013 Tc 2.4294 Tw ( command can count things for us. The following command) Tj
-79.6819 -12.0547 TD 0.0141 Tc 0.0143 Tw (counts the newlines in some text. In this case the substitution is not important:) Tj
ET
BT
144.96 326.04 TD
/F5 9 Tf
-0.0095 Tc 0.0095 Tw (set numLines [regsub -all \\n $text {} ignore]) Tj
ET
BT
0.997 0 0 0.997 108.96 288.36 Tm
/F2 13 Tf
0.2474 Tc 0.0358 Tw (Transforming Data to Program with ) Tj
ET
BT
335.52 288.36 TD
/F8 13.92 Tf
0.048 Tc 0 Tw (regsub) Tj
ET
BT
0.9955 0 0 0.9955 108.96 267.36 Tm
/F4 10 Tf
0.0177 Tc 1.0826 Tw (One of the most powerful combinations of Tcl commands is ) Tj
ET
BT
393.72 267.36 TD
/F5 9 Tf
0 Tc 0 Tw (regsub) Tj
ET
BT
0.9955 0 0 0.9955 426.12 267.36 Tm
/F4 10 Tf
0.0205 Tc 1.0557 Tw ( and ) Tj
ET
BT
451.32 267.36 TD
/F5 9 Tf
0 Tc 0 Tw (subst) Tj
ET
BT
0.9955 0 0 0.9955 478.2 267.36 Tm
/F4 10 Tf
-0.0087 Tc (.) Tj
-370.9246 -12.0547 TD 0.0183 Tc -0.012 Tw (This section describes a few examples that use ) Tj
ET
BT
326.64 255.36 TD
/F5 9 Tf
-0.02 Tc 0 Tw (regsub) Tj
ET
BT
0.9955 0 0 0.9955 358.92 255.36 Tm
/F4 10 Tf
0.0157 Tc -0.0244 Tw ( to transform data into Tcl) Tj
-251.1004 -12.0547 TD 0.005 Tc -0.0137 Tw (commands, and then use ) Tj
ET
BT
225.96 243.36 TD
/F5 9 Tf
-0.024 Tc 0 Tw (subst) Tj
ET
BT
0.9955 0 0 0.9955 252.96 243.36 Tm
/F4 10 Tf
0.0153 Tc -0.024 Tw ( to replace those commands with a new version of) Tj
-144.657 -12.0547 TD 0.0133 Tc -0.2168 Tw (the data. This technique is very efficient because it relies on two subsystems that) Tj
0 -12.0547 TD 0.0134 Tc -0.1983 Tw (are written in highly optimized C code: the regular expression engine and the Tcl) Tj
T* 0.0108 Tc 0 Tw (parse) Tj
-0.9461 Tc (r) Tj
0.0219 Tc -0.0307 Tw (. These examples are primarily written by Stephen Uhle) Tj
-0.9461 Tc 0 Tw (r) Tj
-0.0087 Tc (.) Tj
24.1095 -30.1369 TD /F2 10 Tf
0.0167 Tc 0.075 Tw (URL Decoding) Tj
0 -18.0821 TD /F4 10 Tf
0.0205 Tc 1.2968 Tw (When a URL is transmitted over the network, it is encoded by replacing) Tj
-24.1095 -12.0547 TD 0.0094 Tc 0.1024 Tw (special characters with a ) Tj
ET
BT
226.92 147.36 TD
/F5 9 Tf
0 Tc 0 Tw (%) Tj
5.4 0 TD /F9 9 Tf
(xx) Tj
ET
BT
0.9955 0 0 0.9955 243.12 147.36 Tm
/F4 10 Tf
0.0042 Tc 0.1077 Tw ( sequence, where ) Tj
ET
BT
324.48 147.36 TD
/F9 9 Tf
-0.06 Tc 0 Tw (xx) Tj
ET
BT
0.9955 0 0 0.9955 335.28 147.36 Tm
/F4 10 Tf
0.018 Tc 0.0737 Tw ( is the hexadecimal code for the) Tj
-227.3526 -12.0547 TD 0.0102 Tc 0 Tw (characte) Tj
-0.9461 Tc (r) Tj
0.0179 Tc 1.0397 Tw (. In addition, spaces are replaced with a plus \(+\). It would be tedious) Tj
ET
endstream
endobj
153 0 obj
9664
endobj
151 0 obj
<<
/Type /Page
/Parent 135 0 R
/Resources <<
/Font 154 0 R
/ProcSet 2 0 R
>>
/Contents 152 0 R
>>
endobj
154 0 obj
<<
/F0 6 0 R
/F2 8 0 R
/F3 12 0 R
/F4 14 0 R
/F5 16 0 R
/F8 29 0 R
/F9 32 0 R
>>
endobj
156 0 obj
<<
/Length 157 0 R
>>
stream
BT
114 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0365 Tc -0.0782 Tw (154 ) Tj
256.92 0 TD 0.03 Tc 0.0483 Tw (Regular Expressions) Tj
73.8 0 TD 0.0261 Tc 0.0282 Tw ( Chap. 11) Tj
ET
113.52 701.88 0.48 0.96 re f
486 701.88 0.48 0.96 re f
114 701.88 372 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
554.76 746.76 0.24 0.48 re f
584.04 746.76 0.24 0.48 re f
555 746.76 29.04 0.48 re f
585 80.76 0.24 0.48 re f
553.8 80.76 0.24 0.48 re f
554.04 80.76 30.96 0.48 re f
548.76 69.96 0.48 0.24 re f
548.76 33.72 0.48 0.24 re f
548.76 33.96 0.48 36 re f
BT
0.9955 0 0 0.9955 114 670.32 Tm
/F4 10 Tf
0.0119 Tc -0.1412 Tw (and very inefficient to scan a URL one character at a time with Tcl statements to) Tj
0 -12.0547 TD 0.0182 Tc 1.0901 Tw (undo this encoding. It would be more efficient to do this with a custom C pro-) Tj
T* 0.0099 Tc -0.0186 Tw (gram, but still very tedious. Instead, a combination of ) Tj
ET
BT
364.08 646.32 TD
/F5 9 Tf
0 Tc 0 Tw (regsub) Tj
ET
BT
0.9955 0 0 0.9955 396.36 646.32 Tm
/F4 10 Tf
0.0205 Tc -0.0293 Tw ( and ) Tj
ET
BT
419.28 646.32 TD
/F5 9 Tf
0 Tc 0 Tw (subst) Tj
ET
BT
0.9955 0 0 0.9955 446.28 646.32 Tm
/F4 10 Tf
0.0113 Tc -0.02 Tw ( can effi-) Tj
-333.796 -12.0547 TD 0.0084 Tc 0.0096 Tw (ciently decode the URL in just a few Tcl commands.) Tj
24.1095 -12.0547 TD 0.0152 Tc 0.1152 Tw (Replacing the + with spaces requires quoting the + because it is the one-or-) Tj
-24.1095 -12.0547 TD 0.0148 Tc 0 Tw (more special character in regular expressions:) Tj
ET
BT
150 597 TD
/F5 9 Tf
-0.0052 Tc -0.0148 Tw (regsub -all {\\+} $url { } url) Tj
ET
BT
0.9955 0 0 0.9955 138 583.32 Tm
/F4 10 Tf
0.0176 Tc 0.6969 Tw (The ) Tj
ET
BT
159.24 583.32 TD
/F5 9 Tf
0 Tc 0 Tw (%) Tj
5.4 0 TD /F9 9 Tf
(xx) Tj
ET
BT
0.9955 0 0 0.9955 175.44 583.32 Tm
/F4 10 Tf
0.0106 Tc 0.7039 Tw ( are replaced with a ) Tj
ET
BT
273.24 583.32 TD
/F5 9 Tf
0 Tc 0 Tw (format) Tj
ET
BT
0.9955 0 0 0.9955 305.64 583.32 Tm
/F4 10 Tf
0.016 Tc 0.6986 Tw ( command that will generate the right) Tj
-192.5143 -12.0547 TD 0.0091 Tc 0 Tw (character:) Tj
ET
BT
150 558 TD
/F5 9 Tf
-0.0086 Tc 0.0086 Tw (regsub -all {%\([0-9a-hA-H][0-9a-hA-H]\)} $url \\) Tj
24 -12.96 TD -0.0126 Tc 0.0126 Tw ({[format %c 0x\\1]} url) Tj
ET
BT
0.9955 0 0 0.9955 138 531.36 Tm
/F4 10 Tf
0.0176 Tc 0.4558 Tw (The ) Tj
ET
BT
159 531.36 TD
/F5 9 Tf
0 Tc 0 Tw (%c) Tj
ET
BT
0.9955 0 0 0.9955 169.8 531.36 Tm
/F4 10 Tf
0.0192 Tc 0.4542 Tw ( directive to ) Tj
ET
BT
228.6 531.36 TD
/F5 9 Tf
-0.02 Tc 0 Tw (format) Tj
ET
BT
0.9955 0 0 0.9955 260.88 531.36 Tm
/F4 10 Tf
0.0133 Tc 0.4736 Tw ( tells it to generate the character from a charac-) Tj
-147.5501 -12.0547 TD 0.0206 Tc 2.8035 Tw (ter code numbe) Tj
-1.0667 Tc 0 Tw (r) Tj
0 Tc 2.8437 Tw (. We force a hexadecimal interpretation with a leading ) Tj
ET
BT
472.44 519.36 TD
/F5 9 Tf
0 Tc 0 Tw (0x) Tj
ET
BT
0.9955 0 0 0.9955 483.24 519.36 Tm
/F4 10 Tf
-0.0087 Tc (.) Tj
-370.9246 -12.0547 TD 0.0188 Tc 0.6957 Tw (Advanced regular expressions let us write the "2 hex digits" pattern a bit more) Tj
0 -12.0547 TD -0.0018 Tc 0 Tw (cleanly:) Tj
ET
BT
150 482.04 TD
/F5 9 Tf
-0.0069 Tc -0.0231 Tw (regsub -all {%\([[:xdigit:]]{2}\)} $url \\) Tj
24 -13.08 TD -0.0126 Tc 0.0126 Tw ({[format %c 0x\\1]} url) Tj
ET
BT
0.9955 0 0 0.9955 138 455.28 Tm
/F4 10 Tf
0.0216 Tc 0.0902 Tw (The resulting string is passed to ) Tj
ET
BT
290.52 455.28 TD
/F5 9 Tf
0 Tc 0 Tw (subst) Tj
ET
BT
0.9955 0 0 0.9955 317.52 455.28 Tm
/F4 10 Tf
0.0058 Tc 0.1663 Tw ( to get the ) Tj
ET
BT
367.32 455.28 TD
/F5 9 Tf
-0.02 Tc 0 Tw (format) Tj
ET
BT
0.9955 0 0 0.9955 399.72 455.28 Tm
/F4 10 Tf
0.0194 Tc 0.1527 Tw ( commands substi-) Tj
-287.0236 -12.0547 TD 0.0104 Tc 0 Tw (tuted:) Tj
ET
BT
150 429.96 TD
/F5 9 Tf
-0.0071 Tc 0.0071 Tw (set url [subst $url]) Tj
ET
BT
0.9955 0 0 0.9955 138 416.28 Tm
/F4 10 Tf
-0.0176 Tc 0.0291 Tw (For example, if the input is ) Tj
ET
BT
265.68 416.28 TD
/F5 9 Tf
0 Tc 0 Tw (%7ewelch) Tj
ET
BT
0.9955 0 0 0.9955 308.88 416.28 Tm
/F4 10 Tf
0.0234 Tc -0.0322 Tw (, the result of the ) Tj
ET
BT
391.08 416.28 TD
/F5 9 Tf
-0.02 Tc 0 Tw (regsub) Tj
ET
BT
0.9955 0 0 0.9955 423.48 416.28 Tm
/F4 10 Tf
-0.0257 Tc 0.1377 Tw ( is:) Tj
ET
BT
150 402.96 TD
/F5 9 Tf
-0.0063 Tc 0.0063 Tw ([format %c 0x7e]welch) Tj
ET
BT
0.9955 0 0 0.9955 138 389.28 Tm
/F4 10 Tf
0.0265 Tc -0.0352 Tw (And then ) Tj
ET
BT
183.72 389.28 TD
/F5 9 Tf
-0.024 Tc 0 Tw (subst) Tj
ET
BT
0.9955 0 0 0.9955 210.72 389.28 Tm
/F4 10 Tf
0.0176 Tc 0.0942 Tw ( generates:) Tj
ET
BT
150 375.96 TD
/F5 9 Tf
-0.02 Tc 0 Tw (~welch) Tj
ET
BT
0.9955 0 0 0.9955 138 362.28 Tm
/F4 10 Tf
0.0197 Tc -0.0284 Tw (Example 11\2265 encapsulates this trick in the ) Tj
ET
BT
344.16 362.28 TD
/F5 9 Tf
-0.012 Tc 0 Tw (Url_Decode) Tj
ET
BT
0.9955 0 0 0.9955 398.04 362.28 Tm
/F4 10 Tf
-0.0011 Tc -0.0076 Tw ( procedure.) Tj
ET
1 1 1 rg
114 329.04 372 7.92 re f
0 0 0 rg
136.8 332.76 0.24 0.48 re f
485.04 332.76 0.24 0.48 re f
137.04 332.76 348 0.48 re f
BT
138 339.72 TD
/F1 7.92 Tf
0.0054 Tc -0.0472 Tw (Example 11\226) Tj
3.9965 Tc 0 Tw (5) Tj
56.4 0 TD /F0 7.92 Tf
0.0513 Tc 0.027 Tw (The ) Tj
16.08 0 TD /F5 9 Tf
-0.012 Tc 0 Tw (Url_Decode) Tj
53.88 0 TD /F0 7.92 Tf
0.0422 Tc -0.084 Tw ( procedure.) Tj
-126.36 -22.68 TD /F5 9 Tf
0 Tc -0.08 Tw (proc Url_Decode {url} {) Tj
18 -10.08 TD -0.0052 Tc -0.0148 Tw (regsub -all {\\+} $url { } url) Tj
0 -9.96 TD -0.0106 Tc 0.0106 Tw (regsub -all {%\([:xdigit:]]{2}\)} $url \\) Tj
18 -9.96 TD -0.0126 Tc 0.0126 Tw ({[format %c 0x\\1]} url) Tj
-18 -10.08 TD -0.0071 Tc 0.0071 Tw (return [subst $url]) Tj
ET
1 1 1 rg
114 255.96 372 8.04 re f
0 0 0 rg
136.8 259.8 0.24 0.48 re f
485.04 259.8 0.24 0.48 re f
137.04 259.8 348 0.48 re f
BT
138 267 TD
0 Tc 0 Tw (}) Tj
ET
BT
0.9955 0 0 0.9955 138 230.4 Tm
/F2 10 Tf
0.021 Tc -0.0498 Tw (CGI Argument Parsing) Tj
0 -18.0821 TD /F4 10 Tf
0.0171 Tc 0.818 Tw (Example 11\2266 builds upon ) Tj
ET
BT
266.88 212.4 TD
/F5 9 Tf
0 Tc 0 Tw (Url_Decode) Tj
ET
BT
0.9955 0 0 0.9955 320.76 212.4 Tm
/F4 10 Tf
0.0152 Tc 0.835 Tw ( to decode the inputs to a CGI pro-) Tj
-207.7033 -12.0547 TD 0.0184 Tc 0.656 Tw (gram that processes data from an HTML form. Each form element is identified) Tj
0 -12.0547 TD 0.0175 Tc 0.03 Tw (by a name, and the value is URL encoded. All the names and encoded values are) Tj
T* 0.0169 Tc 0.0045 Tw (passed to the CGI program in the following format:) Tj
ET
BT
150 162.96 TD
/F5 9 Tf
-0.0095 Tc 0 Tw (name1=value1&name2=value2&name3=value3) Tj
ET
BT
0.9955 0 0 0.9955 138 149.4 Tm
/F4 10 Tf
0.0234 Tc -0.1528 Tw (Example 11\2266 shows ) Tj
ET
BT
237.24 149.4 TD
/F5 9 Tf
-0.015 Tc 0 Tw (Cgi_List) Tj
ET
BT
0.9955 0 0 0.9955 280.44 149.4 Tm
/F4 10 Tf
0.0205 Tc -0.0895 Tw ( and ) Tj
ET
BT
303.12 149.4 TD
/F5 9 Tf
-0.015 Tc 0 Tw (Cgi_Quer) Tj
-1.2 Tc (y) Tj
ET
BT
0.9955 0 0 0.9955 350.4 149.4 Tm
/F4 10 Tf
-0.0087 Tc -0.1205 Tw (. ) Tj
ET
BT
355.8 149.4 TD
/F5 9 Tf
0 Tc 0 Tw (Cgi_Query) Tj
ET
BT
0.9955 0 0 0.9955 404.4 149.4 Tm
/F4 10 Tf
0.0115 Tc -0.1006 Tw ( receives the form) Tj
-291.7249 -12.1753 TD 0.0183 Tc 3.8305 Tw (data from the standard input or the ) Tj
ET
BT
308.64 137.28 TD
/F5 9 Tf
-0.01 Tc 0 Tw (QUERY_STRING) Tj
ET
BT
0.9955 0 0 0.9955 373.44 137.28 Tm
/F4 10 Tf
0.0064 Tc 3.9027 Tw ( environment variable,) Tj
ET
endstream
endobj
157 0 obj
7764
endobj
155 0 obj
<<
/Type /Page
/Parent 135 0 R
/Resources <<
/Font 158 0 R
/ProcSet 2 0 R
>>
/Contents 156 0 R
>>
endobj
158 0 obj
<<
/F0 6 0 R
/F1 7 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
/F9 32 0 R
>>
endobj
161 0 obj
<<
/Length 162 0 R
>>
stream
BT
108.96 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0473 Tc -0.0891 Tw (Transforming Data to Program with ) Tj
126.72 0 TD /F5 7.92 Tf
0.048 Tc 0 Tw (regsub) Tj
230.04 0 TD /F0 7.92 Tf
0.0765 Tc (155) Tj
ET
108.48 701.88 0.48 0.96 re f
480.72 701.88 0.48 0.96 re f
108.96 701.88 371.76 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
553.8 746.76 0.24 0.48 re f
585 746.76 0.24 0.48 re f
554.04 746.76 30.96 0.48 re f
585 80.76 0.24 0.48 re f
554.76 80.76 0.24 0.48 re f
555 80.76 30 0.48 re f
547.8 75 0.48 0.24 re f
547.8 34.8 0.48 0.24 re f
547.8 35.04 0.48 39.96 re f
510 504 54 108 re f
510 611.76 54.24 0.48 re f
563.76 503.76 0.48 108.24 re f
509.76 503.76 54.24 0.48 re f
509.76 504 0.48 108.24 re f
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 605.52 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 602.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 598.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (.) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 595.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 592.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (A) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 583.2 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 575.28 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (v) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 568.56 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (a) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 560.64 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (n) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 553.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 545.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (e) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 538.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 530.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 526.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (T) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 521.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 514.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (l) Tj
ET
Q
BT
0.9955 0 0 0.9955 108.96 670.32 Tm
/F4 10 Tf
0.0199 Tc 0.538 Tw (depending on whether the form data is transmitted with a ) Tj
ET
BT
386.4 670.32 TD
/F5 9 Tf
0 Tc 0 Tw (POST) Tj
ET
BT
0.9955 0 0 0.9955 408 670.32 Tm
/F4 10 Tf
-0.0208 Tc 0.615 Tw ( or ) Tj
ET
BT
424.08 670.32 TD
/F5 9 Tf
0 Tc 0 Tw (GET) Tj
ET
BT
0.9955 0 0 0.9955 440.28 670.32 Tm
/F4 10 Tf
0.0079 Tc 0.5861 Tw ( request.) Tj
-332.8316 -12.0547 TD 0.0125 Tc 2.3897 Tw (These ) Tj
ET
BT
141.48 658.32 TD
/F5 9 Tf
-0.03 Tc 0 Tw (HTTP) Tj
ET
BT
0.9955 0 0 0.9955 162.96 658.32 Tm
/F4 10 Tf
0.0178 Tc 2.2772 Tw ( operations are described in detail in Chapter 17. ) Tj
ET
BT
412.44 658.32 TD
/F5 9 Tf
-0.015 Tc 0 Tw (Cgi_List) Tj
ET
BT
0.9955 0 0 0.9955 455.64 658.32 Tm
/F4 10 Tf
-0.0017 Tc 2.404 Tw ( uses) Tj
ET
BT
108.96 646.32 TD
/F5 9 Tf
0 Tc 0 Tw (split) Tj
ET
BT
0.9955 0 0 0.9955 135.96 646.32 Tm
/F4 10 Tf
0.0099 Tc 1.6369 Tw ( to get back a list of names and values, and then it decodes them with) Tj
ET
BT
108.96 634.32 TD
/F5 9 Tf
-0.024 Tc 0 Tw (Url_Decode) Tj
ET
BT
0.9955 0 0 0.9955 162.72 634.32 Tm
/F4 10 Tf
0.0069 Tc 0.1653 Tw (. It returns a Tcl-friendly name, value list that you can either iterate) Tj
-54.0053 -12.0547 TD 0.0184 Tc 0.013 Tw (through with a ) Tj
ET
BT
180.84 622.32 TD
/F5 9 Tf
-0.0171 Tc 0 Tw (foreach) Tj
ET
BT
0.9955 0 0 0.9955 218.52 622.32 Tm
/F4 10 Tf
0.0162 Tc -0.0098 Tw ( command, or assign to an array with ) Tj
ET
BT
393.72 622.32 TD
/F5 9 Tf
0 Tc 0 Tw (array) Tj
ET
BT
0.9955 0 0 0.9955 420.72 622.32 Tm
/F4 10 Tf
-0.0087 Tw ( ) Tj
ET
BT
423.48 622.32 TD
/F5 9 Tf
0 Tw (set) Tj
ET
BT
0.9955 0 0 0.9955 439.68 622.32 Tm
/F4 10 Tf
-0.0087 Tc (:) Tj
ET
1 1 1 rg
108.96 588.96 372 8.04 re f
0 0 0 rg
131.76 592.8 0.24 0.48 re f
480 592.8 0.24 0.48 re f
132 592.8 348 0.48 re f
BT
132.96 599.64 TD
/F1 7.92 Tf
0.0436 Tc 0.0347 Tw (Example ) Tj
-0.1235 Tc 0 Tw (11\226) Tj
4.1165 Tc (6) Tj
56.52 0 TD /F0 7.92 Tf
0.0113 Tc 0.067 Tw (The ) Tj
15.96 0 TD /F5 9 Tf
-0.0133 Tc 0 Tw (Cgi_Parse) Tj
48.48 0 TD /F0 7.92 Tf
0.0365 Tc 0.0418 Tw ( and ) Tj
17.88 0 TD /F5 9 Tf
-0.0133 Tc 0.0133 Tw (Cgi_Value ) Tj
53.88 0 TD /F0 7.92 Tf
0.0384 Tc 0 Tw (procedures.) Tj
-192.72 -22.68 TD /F5 9 Tf
-0.008 Tc 0.008 Tw (proc Cgi_List {} {) Tj
18 -9.96 TD -0.0063 Tc 0.0063 Tw (set query [Cgi_Query]) Tj
0 -9.96 TD -0.0089 Tc 0.0089 Tw (regsub -all {\\+} $query { } query) Tj
0 -10.08 TD 0 Tc -0.06 Tw (set result {}) Tj
0 -9.96 TD -0.0092 Tc 0.0092 Tw (foreach {x} [split $query &=] {) Tj
18 -9.96 TD -0.0044 Tc -0.0356 Tw (lappend result [Url_Decode $x]) Tj
-18 -10.08 TD 0 Tc 0 Tw (}) Tj
0 -9.96 TD -0.0092 Tc 0.0092 Tw (return $result) Tj
-18 -9.96 TD 0 Tc 0 Tw (}) Tj
0 -10.08 TD -0.0075 Tc 0.0075 Tw (proc Cgi_Query {} {) Tj
18 -9.96 TD 0 Tc 0 Tw (global env) Tj
0 -9.96 TD -0.0034 Tc -0.0266 Tw (if {![info exists env\(QUERY_STRING\)] ||) Tj
36 -10.08 TD -0.0065 Tc 0.0065 Tw ([string length $env\(QUERY_STRING\)] == 0} {) Tj
-18 -9.96 TD -0.0067 Tc 0.0067 Tw (if {[info exists env\(CONTENT_LENGTH\)] &&) Tj
36 -9.96 TD -0.0092 Tc 0.0092 Tw ([string length $env\(CONTENT_LENGTH\)] != 0} {) Tj
-18 -10.08 TD -0.0062 Tc 0.0062 Tw (set query [read stdin $env\(CONTENT_LENGTH\)]) Tj
-18 -9.96 TD 0 Tc 0 Tw (} else {) Tj
18 -9.96 TD -0.06 Tw (gets stdin query) Tj
-18 -10.08 TD 0 Tw (}) Tj
0 -9.96 TD -0.0092 Tc 0.0092 Tw (set env\(QUERY_STRING\) $query) Tj
T* -0.0052 Tc 0.0052 Tw (set env\(CONTENT_LENGTH\) 0) Tj
-18 -10.08 TD 0 Tc 0 Tw (}) Tj
0 -9.96 TD -0.005 Tc 0.005 Tw (return $env\(QUERY_STRING\)) Tj
ET
1 1 1 rg
108.96 336 372 8.04 re f
0 0 0 rg
131.76 339.72 0.24 0.48 re f
480 339.72 0.24 0.48 re f
132 339.72 348 0.48 re f
BT
132.96 347.04 TD
0 Tc 0 Tw (}) Tj
ET
BT
0.9955 0 0 0.9955 132.96 320.4 Tm
/F4 10 Tf
0.0117 Tc 0.7329 Tw (An HTML form can have several form elements with the same name, and) Tj
-24.1095 -12.0547 TD 0.0126 Tc 0.8787 Tw (this can result in more than one value for each name. If you blindly use ) Tj
ET
BT
454.08 308.4 TD
/F5 9 Tf
-0.024 Tc 0 Tw (array) Tj
-345.12 -12 TD 0 Tc (set) Tj
ET
BT
0.9955 0 0 0.9955 125.16 296.4 Tm
/F4 10 Tf
0.0121 Tc 0.4212 Tw ( to map the results of ) Tj
ET
BT
228.48 296.4 TD
/F5 9 Tf
-0.015 Tc 0 Tw (Cgi_List) Tj
ET
BT
0.9955 0 0 0.9955 271.56 296.4 Tm
/F4 10 Tf
0.0185 Tc 0.3746 Tw ( into an arra) Tj
-1.2738 Tc 0 Tw (y) Tj
0.0249 Tc 0.348 Tw (, you will lose the repeated val-) Tj
-163.3418 -12.0547 TD 0.0025 Tc 0.1094 Tw (ues. Example 11\2267 shows ) Tj
ET
BT
229.92 284.4 TD
/F5 9 Tf
-0.0133 Tc 0 Tw (Cgi_Parse) Tj
ET
BT
0.9955 0 0 0.9955 278.4 284.4 Tm
/F4 10 Tf
0.0205 Tc 0.0913 Tw ( and ) Tj
ET
BT
301.56 284.4 TD
/F5 9 Tf
-0.0133 Tc 0 Tw (Cgi_Value) Tj
ET
BT
0.9955 0 0 0.9955 350.04 284.4 Tm
/F4 10 Tf
0.0142 Tc 0.0775 Tw ( that store the query data in) Tj
-242.1799 -12.0547 TD 0.021 Tc 1.1154 Tw (a global ) Tj
ET
BT
150.12 272.4 TD
/F5 9 Tf
0 Tc 0 Tw (cgi) Tj
ET
BT
0.9955 0 0 0.9955 166.32 272.4 Tm
/F4 10 Tf
0 Tc 1.1964 Tw ( arra) Tj
-1.2738 Tc 0 Tw (y) Tj
-0.0087 Tc 1.2055 Tw (. ) Tj
ET
BT
201 272.4 TD
/F5 9 Tf
-0.0133 Tc 0 Tw (Cgi_Parse) Tj
ET
BT
0.9955 0 0 0.9955 249.48 272.4 Tm
/F4 10 Tf
0.0137 Tc 1.168 Tw ( adds list structure whenever it finds a repeated) Tj
-141.1611 -12.0547 TD 0.0121 Tc 0.5819 Tw (form value. The global ) Tj
ET
BT
217.44 260.4 TD
/F5 9 Tf
0 Tc 0 Tw (cgilist) Tj
ET
BT
0.9955 0 0 0.9955 255.24 260.4 Tm
/F4 10 Tf
0.0158 Tc 0.5903 Tw ( array keeps a record of how many times a form) Tj
-146.9474 -12.0547 TD 0.0171 Tc 0.8782 Tw (value is repeated. The ) Tj
ET
BT
217.44 248.4 TD
/F5 9 Tf
0 Tc 0 Tw (Cgi_Value) Tj
ET
BT
0.9955 0 0 0.9955 266.04 248.4 Tm
/F4 10 Tf
0.0192 Tc 0.8503 Tw ( procedure returns elements of the global ) Tj
ET
BT
464.88 248.4 TD
/F5 9 Tf
0 Tc 0 Tw (cgi) Tj
ET
BT
0.9955 0 0 0.9955 108.96 236.4 Tm
/F4 10 Tf
0 Tc (arra) Tj
-1.2738 Tc (y) Tj
0.0208 Tc -0.0296 Tw (, or the empty string if the requested value is not present.) Tj
ET
1 1 1 rg
108.96 203.04 372 7.92 re f
0 0 0 rg
131.76 206.76 0.24 0.48 re f
480 206.76 0.24 0.48 re f
132 206.76 348 0.48 re f
BT
132.96 213.72 TD
/F1 7.92 Tf
0.0436 Tc 0.0347 Tw (Example ) Tj
-0.1235 Tc 0 Tw (11\226) Tj
4.1165 Tc (7) Tj
56.52 0 TD /F5 9 Tf
-0.0133 Tc (Cgi_Parse) Tj
48.48 0 TD /F0 7.92 Tf
0.0365 Tc -0.0182 Tw ( and ) Tj
17.76 0 TD /F5 9 Tf
0 Tc 0 Tw (Cgi_Value) Tj
48.6 0 TD /F0 7.92 Tf
0.0296 Tc 0.0086 Tw ( store query data in the ) Tj
84 0 TD /F5 9 Tf
0 Tc 0 Tw (cgi) Tj
16.2 0 TD /F0 7.92 Tf
0.0496 Tc -0.0913 Tw ( arra) Tj
-0.6 Tc 0 Tw (y) Tj
-0.0418 Tc (.) Tj
-271.56 -22.68 TD /F5 9 Tf
-0.0075 Tc 0.0075 Tw (proc Cgi_Parse {} {) Tj
18 -10.08 TD 0 Tc -0.06 Tw (global cgi cgilist) Tj
0 -9.96 TD -0.0055 Tc 0.0055 Tw (catch {unset cgi cgilist}) Tj
T* -0.0063 Tc 0.0063 Tw (set query [Cgi_Query]) Tj
0 -10.08 TD -0.0089 Tc 0.0089 Tw (regsub -all {\\+} $query { } query) Tj
0 -9.96 TD -0.0071 Tc 0.0071 Tw (foreach {name value} [split $query &=] {) Tj
18 -9.96 TD -0.0052 Tc 0.0052 Tw (set name [CgiDecode $name]) Tj
ET
endstream
endobj
162 0 obj
9885
endobj
159 0 obj
<<
/Type /Page
/Parent 160 0 R
/Resources <<
/Font <<
/F0 6 0 R
/F1 7 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
>>
/ProcSet 2 0 R
>>
/Contents 161 0 R
>>
endobj
164 0 obj
<<
/Length 165 0 R
>>
stream
BT
114 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0365 Tc -0.0782 Tw (156 ) Tj
256.92 0 TD 0.03 Tc 0.0483 Tw (Regular Expressions) Tj
73.8 0 TD 0.0261 Tc 0.0282 Tw ( Chap. 11) Tj
ET
113.52 701.88 0.48 0.96 re f
486 701.88 0.48 0.96 re f
114 701.88 372 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
554.76 746.76 0.24 0.48 re f
584.04 746.76 0.24 0.48 re f
555 746.76 29.04 0.48 re f
585 80.76 0.24 0.48 re f
553.8 80.76 0.24 0.48 re f
554.04 80.76 30.96 0.48 re f
548.76 69.96 0.48 0.24 re f
548.76 33.72 0.48 0.24 re f
548.76 33.96 0.48 36 re f
BT
174 671.04 TD
/F5 9 Tf
-0.0077 Tc 0.0077 Tw (if {[info exists cgilist\($name\)] &&) Tj
36 -10.08 TD -0.0109 Tc 0.0109 Tw (\($cgilist\($name\) == 1\)} {) Tj
-18 -9.96 TD -0.0065 Tc -0.0107 Tw (# Add second value and create list structure) Tj
0 -9.96 TD -0.008 Tc 0.008 Tw (set cgi\($name\) [list $cgi\($name\) \\) Tj
18 -10.08 TD -0.0063 Tc 0.0063 Tw ([Url_Decode $value]]) Tj
-36 -9.96 TD -0.0075 Tc 0.0075 Tw (} elseif {[info exists cgi\($name\)]} {) Tj
18 -9.96 TD 0 Tc -0.06 Tw (# Add additional list elements) Tj
0 -10.08 TD -0.0071 Tc 0.0071 Tw (lappend cgi\($name\) [CgiDecode $value]) Tj
-18 -9.96 TD -0.02 Tc 0.02 Tw (} else {) Tj
18 -9.96 TD -0.0071 Tc -0.0129 Tw (# Add first value without list structure) Tj
0 -10.08 TD -0.008 Tc 0.008 Tw (set cgi\($name\) [CgiDecode $value]) Tj
0 -9.96 TD -0.0067 Tc 0.0067 Tw (set cgilist\($name\) 0) Tj
126 0 TD (;# May need to listify) Tj
-144 -9.96 TD 0 Tc 0 Tw (}) Tj
0 -10.08 TD -0.0067 Tc 0.0067 Tw (incr cgilist\($name\)) Tj
-18 -9.96 TD 0 Tc 0 Tw (}) Tj
0 -9.96 TD -0.0114 Tc 0.0114 Tw (return [array names cgi]) Tj
-18 -10.08 TD 0 Tc 0 Tw (} ) Tj
0 -9.96 TD -0.0063 Tc -0.0337 Tw (proc Cgi_Value {key} {) Tj
18 -9.96 TD -0.0133 Tc 0.0133 Tw (global cgi) Tj
0 -10.08 TD -0.0092 Tc 0.0092 Tw (if {[info exists cgi\($key\)]} {) Tj
18 -9.96 TD -0.0075 Tc 0.0075 Tw (return $cgi\($key\)) Tj
-18 -9.96 TD -0.02 Tc 0.02 Tw (} else {) Tj
18 -10.08 TD -0.015 Tc 0.015 Tw (return {}) Tj
-18 -9.96 TD 0 Tc 0 Tw (}) Tj
-18 -9.96 TD (}) Tj
0 -10.08 TD -0.08 Tw (proc Cgi_Length {key} {) Tj
18 -9.96 TD -0.0092 Tc 0.0092 Tw (global cgilist) Tj
0 -9.96 TD -0.0083 Tc 0.0083 Tw (if {[info exist cgilist\($key\)]} {) Tj
18 -10.08 TD -0.006 Tc 0.006 Tw (return $cgilist\($key\)) Tj
-18 -9.96 TD -0.02 Tc 0.02 Tw (} else {) Tj
18 -9.96 TD -0.0171 Tc 0.0171 Tw (return 0) Tj
-18 -10.08 TD 0 Tc 0 Tw (}) Tj
ET
1 1 1 rg
114 339.96 372 8.04 re f
0 0 0 rg
136.8 343.8 0.24 0.48 re f
485.04 343.8 0.24 0.48 re f
137.04 343.8 348 0.48 re f
BT
138 351 TD
(}) Tj
ET
BT
0.9955 0 0 0.9955 138 314.28 Tm
/F2 10 Tf
0.0155 Tc 0.016 Tw (Decoding HTML Entities) Tj
0 -18.0821 TD /F4 10 Tf
0.0263 Tc -0.0351 Tw (The next example is a decoder for HTML ) Tj
192.5143 0 TD /F7 10 Tf
-0.0144 Tc 0 Tw (entities) Tj
33.03 0 TD /F4 10 Tf
0.0119 Tc 0.0397 Tw (. In HTML, special charac-) Tj
-249.6539 -12.0547 TD 0.0065 Tc 0.9009 Tw (ters are encoded as entities. If you want a literal ) Tj
ET
BT
349.2 284.28 TD
/F5 9 Tf
0 Tc 0 Tw (<) Tj
ET
BT
0.9955 0 0 0.9955 354.48 284.28 Tm
/F4 10 Tf
0.0395 Tc 0.8558 Tw ( or ) Tj
ET
BT
371.28 284.28 TD
/F5 9 Tf
0 Tc 0 Tw (>) Tj
ET
BT
0.9955 0 0 0.9955 376.68 284.28 Tm
/F4 10 Tf
0.0116 Tc 0.9441 Tw ( in your document, you) Tj
-263.8784 -12.0547 TD 0.0158 Tc -0.1692 Tw (encode them as the entities ) Tj
ET
BT
242.16 272.28 TD
/F5 9 Tf
0 Tc 0 Tw (<) Tj
ET
BT
0.9955 0 0 0.9955 263.76 272.28 Tm
/F4 10 Tf
0.0205 Tc -0.2101 Tw ( and ) Tj
ET
BT
286.32 272.28 TD
/F5 9 Tf
0 Tc 0 Tw (>) Tj
ET
BT
0.9955 0 0 0.9955 307.92 272.28 Tm
/F4 10 Tf
0.0155 Tc -0.1448 Tw (, respectivel) Tj
-1.2738 Tc 0 Tw (y) Tj
0.0097 Tc -0.1631 Tw (, to avoid conflict with the) Tj
ET
BT
114 260.28 TD
/F5 9 Tf
0 Tc 0 Tw (<) Tj
5.4 0 TD /F9 9 Tf
(tag) Tj
16.2 0 TD /F5 9 Tf
(>) Tj
ET
BT
0.9955 0 0 0.9955 141 260.28 Tm
/F4 10 Tf
0.016 Tc 0.4852 Tw ( syntax used in HTML. HTML syntax is briefly described in Chapter 3 on) Tj
-27.1232 -12.0547 TD 0.012 Tc 0.4976 Tw (page 32. Characters with codes above 127 such as copyright ) Tj
ET
BT
397.08 248.28 TD
/F12 9.96 Tf
0.0516 Tc 0 Tw (\323) Tj
ET
BT
0.9955 0 0 0.9955 405 248.28 Tm
/F4 10 Tf
0.013 Tc 0.4604 Tw ( and egrave \350 are) Tj
-292.3276 -12.0547 TD 0.0088 Tc 0.8263 Tw (also encoded. There are named entities, such as ) Tj
ET
BT
343.08 236.28 TD
/F5 9 Tf
0 Tc 0 Tw (<) Tj
ET
BT
0.9955 0 0 0.9955 364.68 236.28 Tm
/F4 10 Tf
0.0213 Tc 0.8138 Tw ( for < and ) Tj
ET
BT
415.32 236.28 TD
/F5 9 Tf
-0.015 Tc 0 Tw (è) Tj
ET
BT
0.9955 0 0 0.9955 458.4 236.28 Tm
/F4 10 Tf
-0.0133 Tc 0.8485 Tw ( for \350.) Tj
-345.9713 -12.0547 TD -1.0158 Tc 0 Tw (Y) Tj
0.0196 Tc 0.2278 Tw (ou can also use decimal-valued entities such as ) Tj
ET
BT
342 224.28 TD
/F5 9 Tf
0 Tc 0 Tw (©) Tj
ET
BT
0.9955 0 0 0.9955 374.28 224.28 Tm
/F4 10 Tf
0.0409 Tc 0.1913 Tw ( for ) Tj
ET
BT
393.12 224.28 TD
/F12 9.96 Tf
0.0516 Tc 0 Tw (\323) Tj
ET
BT
0.9955 0 0 0.9955 401.04 224.28 Tm
/F4 10 Tf
0.005 Tc 0.2274 Tw (. Finall) Tj
-1.2738 Tc 0 Tw (y) Tj
0.015 Tc 0.2777 Tw (, the trail-) Tj
-288.3496 -12.0547 TD 0.0165 Tc -0.0012 Tw (ing semicolon is optional, so ) Tj
ET
BT
245.64 212.28 TD
/F5 9 Tf
-0.04 Tc 0 Tw (<) Tj
ET
BT
0.9955 0 0 0.9955 261.84 212.28 Tm
/F4 10 Tf
-0.0208 Tc 0.0725 Tw ( or ) Tj
ET
BT
276.84 212.28 TD
/F5 9 Tf
0 Tc 0 Tw (<) Tj
ET
BT
0.9955 0 0 0.9955 298.32 212.28 Tm
/F4 10 Tf
0.0189 Tc -0.0104 Tw ( can both be used to encode ) Tj
ET
BT
426.6 212.28 TD
/F5 9 Tf
0 Tc 0 Tw (<) Tj
ET
BT
0.9955 0 0 0.9955 432 212.28 Tm
/F4 10 Tf
-0.0087 Tc (.) Tj
-295.3413 -12.0547 TD 0.0157 Tc 0.2367 Tw (The entity decoder is similar to ) Tj
ET
BT
286.2 200.28 TD
/F5 9 Tf
-0.024 Tc 0 Tw (Url_Decode) Tj
ET
BT
0.9955 0 0 0.9955 339.96 200.28 Tm
/F4 10 Tf
0.0038 Tc 0.2286 Tw (. In this case, howeve) Tj
-0.9461 Tc 0 Tw (r) Tj
0.0263 Tc 0.206 Tw (, we need) Tj
-226.9909 -12.0547 TD 0.0091 Tc 0.3198 Tw (to be more careful with ) Tj
ET
BT
225 188.28 TD
/F5 9 Tf
-0.024 Tc 0 Tw (subst) Tj
ET
BT
0.9955 0 0 0.9955 251.88 188.28 Tm
/F4 10 Tf
0.0226 Tc 0.2499 Tw (. The text passed to the decoder could contain spe-) Tj
-138.5091 -12.0547 TD 0.0123 Tc 0.0151 Tw (cial characters like a square bracket or dollar sign. With ) Tj
ET
BT
376.8 176.28 TD
/F5 9 Tf
-0.012 Tc 0 Tw (Url_Decode) Tj
ET
BT
0.9955 0 0 0.9955 430.8 176.28 Tm
/F4 10 Tf
0.0158 Tc 0.0558 Tw ( we can rely) Tj
-318.2454 -12.0547 TD 0.0039 Tc -0.2537 Tw (on those special characters being encoded as, for example, ) Tj
ET
BT
381.24 164.28 TD
/F5 9 Tf
0 Tc 0 Tw (%24) Tj
ET
BT
0.9955 0 0 0.9955 397.44 164.28 Tm
/F4 10 Tf
0.0202 Tc -0.3102 Tw (. Entity encoding is) Tj
-284.7332 -12.0547 TD 0.0167 Tc 1.5818 Tw (different \(do not ask me why URLs and HTML have different encoding stan-) Tj
0 -12.0547 TD 0.0171 Tc 1.0043 Tw (dards\), and dollar signs and square brackets are not necessarily encoded. This) Tj
ET
endstream
endobj
165 0 obj
7366
endobj
163 0 obj
<<
/Type /Page
/Parent 160 0 R
/Resources <<
/Font 168 0 R
/ProcSet 2 0 R
>>
/Contents 164 0 R
>>
endobj
168 0 obj
<<
/F0 6 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
/F7 25 0 R
/F9 32 0 R
/F12 166 0 R
>>
endobj
170 0 obj
<<
/Length 171 0 R
>>
stream
BT
108.96 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0473 Tc -0.0891 Tw (Transforming Data to Program with ) Tj
126.72 0 TD /F5 7.92 Tf
0.048 Tc 0 Tw (regsub) Tj
230.04 0 TD /F0 7.92 Tf
0.0765 Tc (157) Tj
ET
108.48 701.88 0.48 0.96 re f
480.72 701.88 0.48 0.96 re f
108.96 701.88 371.76 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
553.8 746.76 0.24 0.48 re f
585 746.76 0.24 0.48 re f
554.04 746.76 30.96 0.48 re f
585 80.76 0.24 0.48 re f
554.76 80.76 0.24 0.48 re f
555 80.76 30 0.48 re f
547.8 75 0.48 0.24 re f
547.8 34.8 0.48 0.24 re f
547.8 35.04 0.48 39.96 re f
510 504 54 108 re f
510 611.76 54.24 0.48 re f
563.76 503.76 0.48 108.24 re f
509.76 503.76 54.24 0.48 re f
509.76 504 0.48 108.24 re f
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 605.52 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 602.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 598.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (.) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 595.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 592.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (A) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 583.2 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 575.28 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (v) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 568.56 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (a) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 560.64 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (n) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 553.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 545.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (e) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 538.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 530.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 526.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (T) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 521.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 514.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (l) Tj
ET
Q
BT
0.9955 0 0 0.9955 108.96 670.32 Tm
/F4 10 Tf
0.0078 Tc 0.6532 Tw (requires an additional pass to quote these characters. This ) Tj
ET
BT
387.72 670.32 TD
/F5 9 Tf
0 Tc 0 Tw (regsub) Tj
ET
BT
0.9955 0 0 0.9955 420.12 670.32 Tm
/F4 10 Tf
0.0219 Tc 0.5721 Tw ( puts a back-) Tj
-312.5797 -12.0547 TD 0.0051 Tc -0.0138 Tw (slash in front of all the brackets, dollar signs, and backslashes.) Tj
ET
BT
144.96 645 TD
/F5 9 Tf
-0.0075 Tc 0.0075 Tw (regsub -all {[][$\\\\]} $text {\\\\&} new) Tj
ET
BT
0.9955 0 0 0.9955 132.96 631.32 Tm
/F4 10 Tf
-0.0014 Tc 1.0776 Tw (The decimal encoding \(e.g., ) Tj
ET
BT
264.48 631.32 TD
/F5 9 Tf
0 Tc 0 Tw (©) Tj
ET
BT
0.9955 0 0 0.9955 296.88 631.32 Tm
/F4 10 Tf
0.0079 Tc 1.0684 Tw (\) is also more awkward than the hexa-) Tj
-188.7774 -12.0547 TD 0.0077 Tc 1.1649 Tw (decimal encoding used in URLs. ) Tj
-0.005 Tc 1.2018 Tw (We cannot force a decimal interpretation of a) Tj
0 -12.0547 TD 0.0139 Tc 0.7308 Tw (number in Tcl. In particula) Tj
-1.0667 Tc 0 Tw (r) Tj
0.0082 Tc 0.7064 Tw (, if the entity has a leading zero \(e.g., ) Tj
ET
BT
420.72 607.32 TD
/F5 9 Tf
0 Tc 0 Tw (
) Tj
ET
BT
0.9955 0 0 0.9955 453.12 607.32 Tm
/F4 10 Tf
0.004 Tc 0.7106 Tw (\) then) Tj
-345.7302 -12.0547 TD -0.0088 Tc 1.0851 Tw (Tcl interprets the value \(e.g., ) Tj
ET
BT
250.2 595.32 TD
/F5 9 Tf
0 Tc 0 Tw (010) Tj
ET
BT
0.9955 0 0 0.9955 266.4 595.32 Tm
/F4 10 Tf
0.0125 Tc 1.0034 Tw (\) as octal. The ) Tj
ET
BT
337.68 595.32 TD
/F5 9 Tf
0 Tc 0 Tw (scan) Tj
ET
BT
0.9955 0 0 0.9955 359.16 595.32 Tm
/F4 10 Tf
0.0181 Tc 1.0178 Tw ( command is used to do a) Tj
-251.3415 -12.0547 TD 0.0121 Tc 0.0327 Tw (decimal interpretation. It scans into a temporary variable, and ) Tj
ET
BT
401.28 583.32 TD
/F5 9 Tf
0 Tc 0 Tw (set) Tj
ET
BT
0.9955 0 0 0.9955 417.48 583.32 Tm
/F4 10 Tf
0.0223 Tc -0.0311 Tw ( is used to get) Tj
-309.9276 -12.0547 TD 0.0175 Tc -0.0262 Tw (that value:) Tj
ET
BT
144.96 558 TD
/F5 9 Tf
-0.006 Tc -0.018 Tw (regsub -all {\([0-9][0-9]?[0-9]?\);?} $new \\) Tj
24 -12.96 TD -0.0069 Tc 0.0069 Tw ({[format %c [scan \\1 %d tmp; set tmp]]} new) Tj
ET
BT
0.9955 0 0 0.9955 132.96 531.36 Tm
/F4 10 Tf
0.0122 Tc 0.9073 Tw (With advanced regular expressions, this could be written as follows using) Tj
-24.1095 -12.0547 TD 0.0187 Tc -0.0102 Tw (bound quantifiers to specify one to three digits:) Tj
ET
BT
144.96 506.04 TD
/F5 9 Tf
-0.008 Tc 0.008 Tw (regsub -all {\(\\d{1,3}\);?} $new \\) Tj
24 -13.08 TD -0.0069 Tc 0.0069 Tw ({[format %c [scan \\1 %d tmp;set tmp]]} new) Tj
ET
BT
0.9955 0 0 0.9955 132.96 479.28 Tm
/F4 10 Tf
0.0112 Tc 0.4221 Tw (The named entities are converted with an array that maps from the entity) Tj
-24.1095 -12.0547 TD 0.0145 Tc 1.3027 Tw (names to the special characte) Tj
-0.9461 Tc 0 Tw (r) Tj
0.0173 Tc 1.2999 Tw (. The only detail is that unknown entity names) Tj
0 -12.0547 TD -0.0586 Tc 0.894 Tw (\(e.g., ) Tj
ET
BT
134.16 455.28 TD
/F5 9 Tf
0 Tc 0 Tw (&foobar;) Tj
ET
BT
0.9955 0 0 0.9955 177.36 455.28 Tm
/F4 10 Tf
0.0097 Tc 0.8656 Tw (\) are not converted. This mapping is done inside ) Tj
ET
BT
409.32 455.28 TD
/F5 9 Tf
0 Tc 0 Tw (HtmlMapEntit) Tj
-1.32 Tc (y) Tj
ET
BT
0.9955 0 0 0.9955 478.2 455.28 Tm
/F4 10 Tf
-0.0087 Tc (,) Tj
-370.9246 -12.0547 TD 0.0062 Tc 0.0153 Tw (which guards against invalid entities.) Tj
ET
BT
144.96 429.96 TD
/F5 9 Tf
-0.0073 Tc 0.0073 Tw (regsub -all {&\([a-zA-Z]+\)\(;?\)} $new \\) Tj
24 -12.96 TD -0.0046 Tc -0.0254 Tw ({[HtmlMapEntity \\1 \\\\\\2 ]} new) Tj
ET
BT
0.9955 0 0 0.9955 132.96 403.32 Tm
/F4 10 Tf
0.0223 Tc -0.0311 Tw (If the input text contained:) Tj
ET
BT
144.96 390 TD
/F5 9 Tf
0 Tc 0 Tw ([x < y]) Tj
ET
BT
0.9955 0 0 0.9955 108.96 376.32 Tm
/F4 10 Tf
0.0226 Tc -0.0314 Tw (then the ) Tj
ET
BT
150.6 376.32 TD
/F5 9 Tf
0 Tc 0 Tw (regsub) Tj
ET
BT
0.9955 0 0 0.9955 183 376.32 Tm
/F4 10 Tf
0.0158 Tc 0.0056 Tw ( would transform this into:) Tj
ET
BT
144.96 363 TD
/F5 9 Tf
0 Tc 0 Tw (\\[x ) Tj
21.6 0 TD -0.0086 Tc ([HtmlMapEntity) Tj
75.48 0 TD 0 Tc -0.03 Tw ( lt \\; ] y\\]) Tj
ET
BT
0.9955 0 0 0.9955 132.96 349.32 Tm
/F4 10 Tf
0.0073 Tc 0 Tw (Finall) Tj
-1.2738 Tc (y) Tj
-0.0087 Tc 0 Tw (, ) Tj
ET
BT
170.4 349.32 TD
/F5 9 Tf
0 Tc 0 Tw (subst) Tj
ET
BT
0.9955 0 0 0.9955 197.28 349.32 Tm
/F4 10 Tf
0.0202 Tc -0.0289 Tw ( will result in:) Tj
ET
BT
144.96 336 TD
/F5 9 Tf
0 Tc 0 Tw ([x < y]) Tj
ET
1 1 1 rg
108.96 303 372 8.04 re f
0 0 0 rg
131.76 306.72 0.24 0.48 re f
480 306.72 0.24 0.48 re f
132 306.72 348 0.48 re f
BT
132.96 313.68 TD
/F1 7.92 Tf
0.0436 Tc 0.0347 Tw (Example ) Tj
-0.1235 Tc 0 Tw (11\226) Tj
4.1165 Tc (8) Tj
56.52 0 TD /F5 9 Tf
-0.0075 Tc (Html_DecodeEntit) Tj
-0.6 Tc (y) Tj
91.08 0 TD /F0 7.92 Tf
-0.0418 Tc (.) Tj
-147.6 -22.68 TD /F5 9 Tf
-0.0086 Tc 0.0086 Tw (proc Html_DecodeEntity {text} {) Tj
18 -9.96 TD -0.0075 Tc 0.0075 Tw (if {![regexp & $text]} {return $text}) Tj
0 -10.08 TD (regsub -all {[][$\\\\]} $text {\\\\&} new) Tj
0 -9.96 TD -0.0059 Tc -0.0181 Tw (regsub -all {\([0-9][0-9]?[0-9]?\);?} $new {\\) Tj
18 -9.96 TD -0.0035 Tc -0.0136 Tw ([format %c [scan \\1 %d tmp;set tmp]]} new) Tj
-18 -10.08 TD -0.0073 Tc 0.0073 Tw (regsub -all {&\([a-zA-Z]+\)\(;?\)} $new \\) Tj
18 -9.96 TD -0.0046 Tc -0.0254 Tw ({[HtmlMapEntity \\1 \\\\\\2 ]} new) Tj
-18 -9.96 TD -0.0071 Tc 0.0071 Tw (return [subst $new]) Tj
-18 -10.08 TD 0 Tc 0 Tw (}) Tj
0 -9.96 TD -0.0075 Tc 0.0075 Tw (proc HtmlMapEntity {text {semi {}}} {) Tj
18 -9.96 TD -0.0063 Tc 0.0063 Tw (global htmlEntityMap) Tj
0 -10.08 TD -0.0067 Tc 0.0067 Tw (if {[info exist htmlEntityMap\($text\)]} {) Tj
18 -9.96 TD -0.0089 Tc 0.0089 Tw (return $htmlEntityMap\($text\)) Tj
-18 -9.96 TD 0 Tc 0 Tw (} else {) Tj
18 -10.08 TD -0.0075 Tc 0.0075 Tw (return $text$semi) Tj
-18 -9.96 TD 0 Tc 0 Tw (}) Tj
-18 -9.96 TD (} ) Tj
ET
endstream
endobj
171 0 obj
8645
endobj
169 0 obj
<<
/Type /Page
/Parent 160 0 R
/Resources <<
/Font <<
/F0 6 0 R
/F1 7 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
>>
/ProcSet 2 0 R
>>
/Contents 170 0 R
>>
endobj
173 0 obj
<<
/Length 174 0 R
>>
stream
BT
114 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0365 Tc -0.0782 Tw (158 ) Tj
256.92 0 TD 0.03 Tc 0.0483 Tw (Regular Expressions) Tj
73.8 0 TD 0.0261 Tc 0.0282 Tw ( Chap. 11) Tj
ET
113.52 701.88 0.48 0.96 re f
486 701.88 0.48 0.96 re f
114 701.88 372 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
554.76 746.76 0.24 0.48 re f
584.04 746.76 0.24 0.48 re f
555 746.76 29.04 0.48 re f
585 80.76 0.24 0.48 re f
553.8 80.76 0.24 0.48 re f
554.04 80.76 30.96 0.48 re f
548.76 69.96 0.48 0.24 re f
548.76 33.72 0.48 0.24 re f
548.76 33.96 0.48 36 re f
BT
138 660.96 TD
/F5 9 Tf
-0.0104 Tc 0.0104 Tw (# Some of the htmlEntityMap) Tj
0 -9.96 TD -0.0109 Tc 0.0109 Tw (array set htmlEntityMap {) Tj
18 -9.96 TD 0 Tc 0 Tw (lt) Tj
18 0 TD (<) Tj
18 0 TD (gt) Tj
18 0 TD (>) Tj
18 0 TD (amp) Tj
18 0 TD (&) Tj
-90 -10.08 TD -0.024 Tc (aring) Tj
36 0 TD 0 Tc (\\xe5) Tj
36 0 TD -0.02 Tc (atilde) Tj
36 0 TD 0 Tc (\\xe3) Tj
-108 -9.96 TD (copy) Tj
36 0 TD (\\xa9) Tj
36 0 TD (ecirc) Tj
36 0 TD (\\xea) Tj
36 0 TD -0.02 Tc (egrave) Tj
36 0 TD 0 Tc (\\xe8) Tj
ET
1 1 1 rg
114 600 372 8.04 re f
0 0 0 rg
136.8 603.72 0.24 0.48 re f
485.04 603.72 0.24 0.48 re f
137.04 603.72 348 0.48 re f
BT
138 611.04 TD
(}) Tj
ET
BT
0.9955 0 0 0.9955 138 574.32 Tm
/F2 10 Tf
0.0155 Tc -0.0041 Tw (A Simple HTML Parser) Tj
0 -18.0821 TD /F4 10 Tf
0.018 Tc 0.1089 Tw (The following example is the brainchild of Stephen Uhle) Tj
-1.0667 Tc 0 Tw (r) Tj
0.0312 Tc 0.0806 Tw (. It uses ) Tj
ET
BT
441.84 556.32 TD
/F5 9 Tf
0 Tc 0 Tw (regsub) Tj
ET
BT
0.9955 0 0 0.9955 474.24 556.32 Tm
/F4 10 Tf
0.0132 Tc 0.0986 Tw ( to) Tj
-361.8835 -12.0547 TD 0.0143 Tc 0.4333 Tw (transform HTML into a Tcl script. When it is evaluated the script calls a proce-) Tj
0 -12.0547 TD 0.0187 Tc 0.6031 Tw (dure to handle each tag in an HTML document. This provides a general frame-) Tj
T* 0.014 Tc 0.7772 Tw (work for processing HTML. Different callback procedures can be applied to the) Tj
T* 0.0105 Tc 0.2219 Tw (tags to achieve different effects. ) Tj
-0.039 Tc 0.3118 Tw (For example, the ) Tj
ET
BT
345 508.32 TD
/F5 9 Tf
-0.0075 Tc 0 Tw (html_library-0.3) Tj
ET
BT
0.9955 0 0 0.9955 431.28 508.32 Tm
/F4 10 Tf
0.01 Tc 0.2827 Tw ( package on) Tj
-318.7276 -12.0547 TD 0.0231 Tc -0.0319 Tw (the CD-ROM uses ) Tj
ET
BT
200.4 496.32 TD
/F5 9 Tf
-0.012 Tc 0 Tw (Html_Parse) Tj
ET
BT
0.9955 0 0 0.9955 254.4 496.32 Tm
/F4 10 Tf
0.0182 Tc -0.0118 Tw ( to display HTML in a Tk text widget.) Tj
ET
1 1 1 rg
114 462.96 372 8.04 re f
0 0 0 rg
136.8 466.8 0.24 0.48 re f
485.04 466.8 0.24 0.48 re f
137.04 466.8 348 0.48 re f
BT
138 473.64 TD
/F1 7.92 Tf
0.0054 Tc -0.0472 Tw (Example 11\226) Tj
3.9965 Tc 0 Tw (9) Tj
56.4 0 TD /F5 9 Tf
0 Tc (Html_Parse) Tj
54 0 TD /F0 7.92 Tf
-0.0418 Tc (.) Tj
-110.4 -22.68 TD /F5 9 Tf
0 Tc -0.06 Tw (proc Html_Parse {html cmd {start {}}} {) Tj
18 -19.92 TD -0.009 Tc 0.009 Tw (# Map braces and backslashes into HTML entities) Tj
0 -10.08 TD -0.0086 Tc 0.0086 Tw (regsub -all \\{ $html {\\&ob;} html) Tj
0 -9.96 TD (regsub -all \\} $html {\\&cb;} html) Tj
T* -0.0077 Tc 0.0077 Tw (regsub -all {\\\\} $html {\\&bsl;} html) Tj
0 -20.04 TD -0.0095 Tc 0.0095 Tw (# This pattern matches the parts of an HTML tag) Tj
0 -9.96 TD -0.01 Tc 0.01 Tw (set s" \\t\\r\\n") Tj
90 0 TD (;# white space) Tj
-90 -10.08 TD (set exp <\(/?\)\(\\[^$s>]+\)\\[$s]*\(\\[^>]*\)>) Tj
0 -19.92 TD -0.009 Tc 0.009 Tw (# This generates a call to cmd with HTML tag parts) Tj
0 -10.08 TD -0.0055 Tc -0.0117 Tw (# \\1 is the leading /, if any) Tj
0 -9.96 TD -0.0063 Tc -0.0137 Tw (# \\2 is the HTML tag name) Tj
T* -0.0037 Tc -0.0229 Tw (# \\3 is the parameters to the tag, if any) Tj
0 -10.08 TD -0.0056 Tc -0.0053 Tw (# The curly braces at either end group of all the text) Tj
0 -9.96 TD -0.0078 Tc -0.1231 Tw (# after the HTML tag, which becomes the last arg to $cmd.) Tj
T* -0.0109 Tc 0.0109 Tw (set sub "\\}\\n$cmd {\\\\2} {\\\\1} {\\\\3} \\{") Tj
0 -10.08 TD -0.0089 Tc 0.0089 Tw (regsub -all $exp $html $sub html) Tj
0 -19.92 TD -0.0086 Tc 0.0086 Tw (# This balances the curly braces,) Tj
0 -10.08 TD -0.0067 Tc -0.0067 Tw (# and calls $cmd with $start as a pseudo-tag ) Tj
0 -9.96 TD -0.0073 Tc -0.0077 Tw (# at the beginning and end of the script.) Tj
T* -0.0041 Tc -0.0199 Tw (eval "$cmd {$start} {} {} {$html}") Tj
0 -10.08 TD 0 Tc -0.048 Tw (eval "$cmd {$start} / {} {}") Tj
ET
1 1 1 rg
114 189.96 372 8.04 re f
0 0 0 rg
136.8 193.8 0.24 0.48 re f
485.04 193.8 0.24 0.48 re f
137.04 193.8 348 0.48 re f
BT
138 201 TD
0 Tw (}) Tj
ET
BT
0.9955 0 0 0.9955 138 174.36 Tm
/F4 10 Tf
0.0114 Tc 0.5223 Tw (The main ) Tj
ET
BT
186 174.36 TD
/F5 9 Tf
-0.02 Tc 0 Tw (regsub) Tj
ET
BT
0.9955 0 0 0.9955 218.28 174.36 Tm
/F4 10 Tf
0.0222 Tc 0.4512 Tw ( pattern can be written more simply with advanced regu-) Tj
-104.7558 -12.0547 TD 0.0171 Tc -0.0258 Tw (lar expressions:) Tj
ET
BT
150 149.04 TD
/F5 9 Tf
-0.0086 Tc 0.0086 Tw (set exp {<\(/?\)\(\\S+?\)\\s*\(.*?\)>}) Tj
ET
BT
0.9955 0 0 0.9955 138 135.36 Tm
/F4 10 Tf
0.0179 Tc -0.0133 Tw (An example will help visualize the transformation. Given this HTML:) Tj
ET
endstream
endobj
174 0 obj
5499
endobj
172 0 obj
<<
/Type /Page
/Parent 160 0 R
/Resources <<
/Font <<
/F0 6 0 R
/F1 7 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
>>
/ProcSet 2 0 R
>>
/Contents 173 0 R
>>
endobj
176 0 obj
<<
/Length 177 0 R
>>
stream
BT
108.96 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0473 Tc -0.0891 Tw (Transforming Data to Program with ) Tj
126.72 0 TD /F5 7.92 Tf
0.048 Tc 0 Tw (regsub) Tj
230.04 0 TD /F0 7.92 Tf
0.0765 Tc (159) Tj
ET
108.48 701.88 0.48 0.96 re f
480.72 701.88 0.48 0.96 re f
108.96 701.88 371.76 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
553.8 746.76 0.24 0.48 re f
585 746.76 0.24 0.48 re f
554.04 746.76 30.96 0.48 re f
585 80.76 0.24 0.48 re f
554.76 80.76 0.24 0.48 re f
555 80.76 30 0.48 re f
547.8 75 0.48 0.24 re f
547.8 34.8 0.48 0.24 re f
547.8 35.04 0.48 39.96 re f
510 504 54 108 re f
510 611.76 54.24 0.48 re f
563.76 503.76 0.48 108.24 re f
509.76 503.76 54.24 0.48 re f
509.76 504 0.48 108.24 re f
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 605.52 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 602.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 598.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (.) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 595.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 592.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (A) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 583.2 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 575.28 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (v) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 568.56 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (a) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 560.64 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (n) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 553.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 545.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (e) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 538.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 530.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 526.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (T) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 521.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 514.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (l) Tj
ET
Q
BT
132.96 671.04 TD
/F5 9 Tf
-0.0096 Tc 0.0096 Tw (My Home Page) Tj
0 -10.08 TD -0.0083 Tc 0.0083 Tw () Tj
0 -9.96 TD -0.008 Tc 0.008 Tw (My Home
) Tj
T* -0.005 Tc -0.025 Tw (This is my home page.) Tj
ET
BT
0.9955 0 0 0.9955 108.96 622.32 Tm
/F4 10 Tf
0.0278 Tc -0.0366 Tw (and a call to ) Tj
ET
BT
168.24 622.32 TD
/F5 9 Tf
-0.012 Tc 0 Tw (Html_Parse) Tj
ET
BT
0.9955 0 0 0.9955 222.12 622.32 Tm
/F4 10 Tf
0.0146 Tc 0.0068 Tw ( that looks like this:) Tj
ET
BT
132.96 609 TD
/F5 9 Tf
-0.0034 Tc -0.0266 Tw (Html_Parse $html {Render .text} hmstart) Tj
ET
BT
0.9955 0 0 0.9955 108.96 596.4 Tm
/F4 10 Tf
0.0205 Tc -0.0293 Tw (then the generated program is this:) Tj
ET
BT
132.96 576.96 TD
/F5 9 Tf
-0.0092 Tc 0.0092 Tw (Render .text {hmstart} {} {} {}) Tj
0 -9.96 TD -0.0035 Tc -0.0136 Tw (Render .text {Title} {} {} {My Home Page}) Tj
T* -0.01 Tc 0.01 Tw (Render .text {Title} {/} {} {) Tj
0 -10.08 TD 0 Tc 0 Tw (}) Tj
0 -9.96 TD -0.008 Tc 0.008 Tw (Render .text {Body} {} {bgcolor=white text=black} {) Tj
T* 0 Tc 0 Tw (}) Tj
0 -10.08 TD -0.0089 Tc 0.0089 Tw (Render .text {H1} {} {} {My Home}) Tj
0 -9.96 TD -0.0057 Tc 0.0057 Tw (Render .text {H1} {/} {} {) Tj
T* 0 Tc -0.04 Tw (This is my }) Tj
0 -10.08 TD -0.01 Tc 0.01 Tw (Render .text {b} {} {} {home}) Tj
0 -9.96 TD -0.0096 Tc 0.0096 Tw (Render .text {b} {/} {} { page.) Tj
T* 0 Tc 0 Tw (}) Tj
0 -10.08 TD -0.0096 Tc 0.0096 Tw (Render .text {hmstart} / {} {}) Tj
ET
BT
0.9955 0 0 0.9955 132.96 438.36 Tm
/F4 10 Tf
0.0182 Tc 1.7813 Tw (One overall point to make about this example is the difference between) Tj
-24.1095 -12.0547 TD 0.0108 Tc 0.8243 Tw (using ) Tj
ET
BT
137.88 426.36 TD
/F5 9 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 159.48 426.36 Tm
/F4 10 Tf
0.0607 Tc 0.6537 Tw ( and ) Tj
ET
BT
183.96 426.36 TD
/F5 9 Tf
0 Tc 0 Tw (subst) Tj
ET
BT
0.9955 0 0 0.9955 210.96 426.36 Tm
/F4 10 Tf
0.0173 Tc 0.7776 Tw ( with the generated script. The decoders shown in Exam-) Tj
-102.4654 -12.0547 TD 0.0136 Tc 1.6171 Tw (ples 11\2265 and 11\2268 use ) Tj
ET
BT
226.92 414.36 TD
/F5 9 Tf
0 Tc 0 Tw (subst) Tj
ET
BT
0.9955 0 0 0.9955 253.92 414.36 Tm
/F4 10 Tf
0.0115 Tc 1.6071 Tw ( to selectively replace encoded characters while) Tj
-145.6214 -12.0547 TD 0.011 Tc 1.2719 Tw (ignoring the rest of the text. In ) Tj
ET
BT
263.16 402.36 TD
/F5 9 Tf
0 Tc 0 Tw (Html_Parse) Tj
ET
BT
0.9955 0 0 0.9955 317.16 402.36 Tm
/F4 10 Tf
0.024 Tc 1.2071 Tw ( we must process all the text. The) Tj
-209.1499 -12.0547 TD 0.0098 Tc 1.1869 Tw (main trick is to replace the matching text \(e.g., the HTML tag\) with some Tcl) Tj
0 -12.0547 TD 0.0165 Tc 0.8749 Tw (code that ends in an open curly brace and starts with a close curly brace. This) Tj
T* 0.0198 Tc -0.0285 Tw (effectively groups all the unmatched text.) Tj
24.1095 -12.0547 TD 0.0202 Tc 1.0559 Tw (When ) Tj
ET
BT
163.92 354.36 TD
/F5 9 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 185.4 354.36 Tm
/F4 10 Tf
0.0156 Tc 1.0706 Tw ( is used this way you must do something with any braces and) Tj
-76.7887 -12.0547 TD 0.0155 Tc 2.3264 Tw (backslashes in the unmatched text. Otherwise, the resulting script does not) Tj
0 -12.0547 TD 0.0152 Tc 0.2172 Tw (parse correctl) Tj
-1.2738 Tc 0 Tw (y) Tj
0.0136 Tc 0.164 Tw (. In this case, these special characters are encoded as HTML enti-) Tj
T* -0.0342 Tc 2.075 Tw (ties. ) Tj
-0.0093 Tc 2.0952 Tw (We can afford to do this because the ) Tj
ET
BT
317.88 318.36 TD
/F5 9 Tf
-0.04 Tc 0 Tw (cmd) Tj
ET
BT
0.9955 0 0 0.9955 334.08 318.36 Tm
/F4 10 Tf
0.0165 Tc 2.0442 Tw ( that is called must deal with) Tj
-226.1471 -12.0547 TD 0.0189 Tc 0.2135 Tw (encoded entities alread) Tj
-1.1533 Tc 0 Tw (y) Tj
0.0158 Tc 0.2286 Tw (. It is not possible to quote these special characters with) Tj
0 -12.0547 TD 0.0114 Tc 0.0703 Tw (backslashes because all this text is inside curly braces, so no backslash substitu-) Tj
T* 0.0169 Tc -0.2839 Tw (tion is performed. If you try that the backslashes will be seen by the ) Tj
ET
BT
421.8 282.36 TD
/F5 9 Tf
0 Tc 0 Tw (cmd) Tj
ET
BT
0.9955 0 0 0.9955 438 282.36 Tm
/F4 10 Tf
0.004 Tc -0.2538 Tw ( callback.) Tj
-306.4317 -12.0547 TD 0.0073 Tc 0 Tw (Finall) Tj
-1.2738 Tc (y) Tj
0.013 Tc 0 Tw (, I must admit that I am always surprised that this works:) Tj
ET
BT
144.96 257.04 TD
/F5 9 Tf
-0.0041 Tc -0.0199 Tw (eval "$cmd {$start} {} {} {$html}") Tj
ET
BT
0.9955 0 0 0.9955 132.96 243.36 Tm
/F4 10 Tf
0.0034 Tc -0.1326 Tw (I always forget that ) Tj
ET
BT
225.84 243.36 TD
/F5 9 Tf
-0.02 Tc 0 Tw ($start) Tj
ET
BT
0.9955 0 0 0.9955 258.24 243.36 Tm
/F4 10 Tf
0.0205 Tc -0.1498 Tw ( and ) Tj
ET
BT
280.92 243.36 TD
/F5 9 Tf
0 Tc 0 Tw ($html) Tj
ET
BT
0.9955 0 0 0.9955 307.8 243.36 Tm
/F4 10 Tf
0.0093 Tc -0.1385 Tw ( are substituted in spite of the braces.) Tj
-199.7472 -12.0547 TD 0.0214 Tc -0.0991 Tw (This is because double quotes are being used to group the argument, so the quot-) Tj
0 -12.0547 TD 0.0086 Tc -0.0023 Tw (ing effect of braces is turned off. Try this:) Tj
ET
BT
168.96 206.04 TD
/F5 9 Tf
-0.0109 Tc 0.0109 Tw (set x hmstart) Tj
0 -13.08 TD 0 Tc -0.03 Tw (set y "foo {$x} bar") Tj
0 -12.96 TD /F9 9 Tf
-0.0071 Tc 0.0071 Tw (=> foo {hmstart} bar) Tj
ET
endstream
endobj
177 0 obj
8067
endobj
175 0 obj
<<
/Type /Page
/Parent 160 0 R
/Resources <<
/Font <<
/F0 6 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
/F9 32 0 R
>>
/ProcSet 2 0 R
>>
/Contents 176 0 R
>>
endobj
179 0 obj
<<
/Length 180 0 R
>>
stream
BT
114 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0365 Tc -0.0782 Tw (160 ) Tj
256.92 0 TD 0.03 Tc 0.0483 Tw (Regular Expressions) Tj
73.8 0 TD 0.0261 Tc 0.0282 Tw ( Chap. 11) Tj
ET
113.52 701.88 0.48 0.96 re f
486 701.88 0.48 0.96 re f
114 701.88 372 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
554.76 746.76 0.24 0.48 re f
584.04 746.76 0.24 0.48 re f
555 746.76 29.04 0.48 re f
585 80.76 0.24 0.48 re f
553.8 80.76 0.24 0.48 re f
554.04 80.76 30.96 0.48 re f
548.76 69.96 0.48 0.24 re f
548.76 33.72 0.48 0.24 re f
548.76 33.96 0.48 36 re f
BT
0.9955 0 0 0.9955 138 670.32 Tm
/F2 10 Tf
0.0214 Tc -0.0502 Tw (Stripping HTML Comments) Tj
0 -18.0821 TD /F4 10 Tf
0.0176 Tc -0.0264 Tw (The ) Tj
ET
BT
158.52 652.32 TD
/F5 9 Tf
-0.012 Tc 0 Tw (Html_Parse) Tj
ET
BT
0.9955 0 0 0.9955 212.52 652.32 Tm
/F4 10 Tf
0.0169 Tc -0.0105 Tw ( procedure does not correctly handle HTML comments. The) Tj
-98.9695 -12.0547 TD 0.0086 Tc -0.0274 Tw (problem is that the syntax for HTML commands allows tags inside comments, so) Tj
0 -12.0547 TD 0.0099 Tc 0.1421 Tw (there can be ) Tj
ET
BT
173.76 628.32 TD
/F5 9 Tf
0 Tc 0 Tw (>) Tj
ET
BT
0.9955 0 0 0.9955 179.16 628.32 Tm
/F4 10 Tf
0.0189 Tc 0.117 Tw ( characters inside the comment. HTML comments are also used to) Tj
-65.4573 -12.0547 TD -0.0034 Tc 1.3208 Tw (hide Javascript inside pages, which can also contain ) Tj
ET
BT
367.08 616.32 TD
/F5 9 Tf
0 Tc 0 Tw (>) Tj
ET
BT
0.9955 0 0 0.9955 372.48 616.32 Tm
/F4 10 Tf
-0.023 Tc 1.3405 Tw (. We can fix this with a) Tj
-259.6593 -12.0547 TD 0.0113 Tc -0.02 Tw (pass that eliminates the comments. ) Tj
24.1095 -12.0547 TD 0.0113 Tc 0.0403 Tw (The comment syntax is this:) Tj
ET
BT
150 579 TD
/F5 9 Tf
0 Tc -0.12 Tw () Tj
ET
BT
0.9955 0 0 0.9955 138 565.32 Tm
/F4 10 Tf
0.0175 Tc -0.0262 Tw (Using nongreedy quantifiers, we can strip comments with a single ) Tj
ET
BT
446.16 565.32 TD
/F5 9 Tf
-0.0171 Tc 0 Tw (regsub:) Tj
-296.16 -13.32 TD -0.0077 Tc 0.0077 Tw (regsub -all $html {} html) Tj
ET
BT
0.9955 0 0 0.9955 138 538.32 Tm
/F4 10 Tf
0.006 Tc 0.0949 Tw (Using only greedy quantifiers, it is awkward to match the closing ) Tj
ET
BT
442.68 538.32 TD
/F5 9 Tf
0 Tc 0 Tw (-->) Tj
ET
BT
0.9955 0 0 0.9955 458.88 538.32 Tm
/F4 10 Tf
0.0159 Tc 0.0959 Tw ( with-) Tj
-346.4535 -12.0547 TD 0.0215 Tc 0.5002 Tw (out getting stuck on embedded ) Tj
ET
BT
261 526.32 TD
/F5 9 Tf
0 Tc 0 Tw (>) Tj
ET
BT
0.9955 0 0 0.9955 266.4 526.32 Tm
/F4 10 Tf
0.0089 Tc 0.5163 Tw ( characters, or without matching too much and) Tj
-153.0953 -12.0547 TD 0.0128 Tc -0.0043 Tw (going all the way to the end of the last comment. Time for another trick:) Tj
ET
BT
150 501 TD
/F5 9 Tf
-0.0046 Tc -0.0194 Tw (regsub -all --> $html \\x81 html) Tj
ET
BT
0.9955 0 0 0.9955 138 487.32 Tm
/F4 10 Tf
0.0171 Tc -0.0962 Tw (This replaces all the end comment sequences with a single character that is) Tj
-24.1095 -12.0547 TD 0.0234 Tc -0.0322 Tw (not allowed in HTML. Now you can delete the comments like this:) Tj
ET
BT
150 462 TD
/F5 9 Tf
-0.0088 Tc 0.0088 Tw (regsub -all ") Tj
0 -9.96 TD -0.0096 Tc 0.0096 Tw (Reboot for the last time.) Tj
T* -0.024 Tc 0 Tw () Tj
ET
1 1 1 rg
114 170.04 372 7.92 re f
0 0 0 rg
136.8 173.76 0.24 0.48 re f
485.04 173.76 0.24 0.48 re f
137.04 173.76 348 0.48 re f
BT
138 180.96 TD
-0.01 Tc ([SiteFooter]) Tj
ET
BT
0.9955 0 0 0.9955 138 154.32 Tm
/F4 10 Tf
0.0176 Tc 0.5763 Tw (The ) Tj
ET
BT
159.24 154.32 TD
/F5 9 Tf
0 Tc 0 Tw (SitePage) Tj
ET
BT
0.9955 0 0 0.9955 202.32 154.32 Tm
/F4 10 Tf
0.0245 Tc 0.5935 Tw ( procedure takes the page title as an argument. It generates) Tj
-88.7229 -12.0547 TD 0.0122 Tc 1.9078 Tw (HTML to implement a standard navigational structure. Example 18\2267 has a) Tj
0 -12.0547 TD 0.0164 Tc 0.015 Tw (simple implementation of ) Tj
ET
BT
234.72 130.32 TD
/F5 9 Tf
-0.015 Tc 0 Tw (SitePage) Tj
ET
BT
0.9955 0 0 0.9955 277.8 130.32 Tm
/F4 10 Tf
-0.0087 Tc (:) Tj
ET
endstream
endobj
538 0 obj
6621
endobj
536 0 obj
<<
/Type /Page
/Parent 532 0 R
/Resources <<
/Font 539 0 R
/ProcSet 2 0 R
>>
/Contents 537 0 R
>>
endobj
539 0 obj
<<
/F0 6 0 R
/F1 7 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
/F9 32 0 R
>>
endobj
541 0 obj
<<
/Length 542 0 R
>>
stream
BT
108.96 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0405 Tc -0.0023 Tw (HTML + Tcl Templates) Tj
356.76 0 TD 0.0765 Tc 0 Tw (253) Tj
ET
108.48 701.88 0.48 0.96 re f
480.72 701.88 0.48 0.96 re f
108.96 701.88 371.76 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
553.8 746.76 0.24 0.48 re f
585 746.76 0.24 0.48 re f
554.04 746.76 30.96 0.48 re f
585 80.76 0.24 0.48 re f
554.76 80.76 0.24 0.48 re f
555 80.76 30 0.48 re f
547.8 75 0.48 0.24 re f
547.8 34.8 0.48 0.24 re f
547.8 35.04 0.48 39.96 re f
510 504 54 108 re f
510 611.76 54.24 0.48 re f
563.76 503.76 0.48 108.24 re f
509.76 503.76 54.24 0.48 re f
509.76 504 0.48 108.24 re f
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 605.52 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 602.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 598.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (.) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 595.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 592.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (A) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 583.2 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 575.28 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (v) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 568.56 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (a) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 560.64 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (n) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 553.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 545.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (e) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 538.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 530.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 526.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (T) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 521.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 514.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (l) Tj
ET
Q
1 1 1 rg
108.96 660.96 372 8.04 re f
0 0 0 rg
131.76 664.8 0.24 0.48 re f
480 664.8 0.24 0.48 re f
132 664.8 348 0.48 re f
BT
132.96 671.64 TD
/F1 7.92 Tf
0.0414 Tc 0.0368 Tw (Example 18\226) Tj
3.9965 Tc 0 Tw (7) Tj
56.88 0 TD /F5 9 Tf
0 Tc (SitePage) Tj
43.2 0 TD /F0 7.92 Tf
0.0427 Tc -0.0845 Tw ( template procedure.) Tj
-100.08 -22.68 TD /F5 9 Tf
-0.006 Tc 0.006 Tw (proc SitePage {title} {) Tj
18 -9.96 TD -0.012 Tc 0.012 Tw (global site) Tj
0 -9.96 TD -0.0071 Tc 0.0071 Tw (set html "$title\\n") Tj
0 -10.08 TD -0.0084 Tc 0.0084 Tw (append html "\\n") Tj
0 -9.96 TD -0.0083 Tc 0.0083 Tw (append html "$title
\\n") Tj
T* 0 Tc 0 Tw (set sep "") Tj
0 -10.08 TD -0.008 Tc 0.008 Tw (foreach {label url} $site\(pages\) {) Tj
18 -9.96 TD -0.0086 Tc 0.0086 Tw (append html $sep) Tj
0 -9.96 TD -0.0034 Tc -0.0137 Tw (if {[string compare $label $title] == 0} {) Tj
18 -10.08 TD -0.0067 Tc 0.0067 Tw (append html "$label") Tj
-18 -9.96 TD 0 Tc 0 Tw (} else {) Tj
18 -9.96 TD -0.0067 Tc 0.0067 Tw (append html "$label") Tj
-18 -10.08 TD 0 Tc 0 Tw (}) Tj
0 -9.96 TD -0.0133 Tc 0.0133 Tw (set sep " | ") Tj
-18 -9.96 TD 0 Tc 0 Tw (}) Tj
0 -10.08 TD -0.0109 Tc 0.0109 Tw (return $html) Tj
ET
1 1 1 rg
108.96 477.96 372 8.04 re f
0 0 0 rg
131.76 481.8 0.24 0.48 re f
480 481.8 0.24 0.48 re f
132 481.8 348 0.48 re f
BT
132.96 489 TD
0 Tc 0 Tw (}) Tj
ET
BT
0.9955 0 0 0.9955 132.96 462.36 Tm
/F4 10 Tf
0.0176 Tc 0.938 Tw (The ) Tj
ET
BT
154.44 462.36 TD
/F5 9 Tf
0 Tc 0 Tw (foreach) Tj
ET
BT
0.9955 0 0 0.9955 192.24 462.36 Tm
/F4 10 Tf
0.0218 Tc 0.8836 Tw ( loop that computes the simple menu of links turns out to be) Tj
-83.66 -12.0547 TD 0.0114 Tc 0.1888 Tw (useful in many places. Example 18\2268 splits out the loop and uses it in the ) Tj
ET
BT
454.08 450.36 TD
/F5 9 Tf
-0.024 Tc 0 Tw (Site-) Tj
-345.12 -12 TD 0 Tc (Page) Tj
ET
BT
0.9955 0 0 0.9955 130.56 438.36 Tm
/F4 10 Tf
0.0205 Tc -0.0293 Tw ( and ) Tj
ET
BT
153.48 438.36 TD
/F5 9 Tf
-0.012 Tc 0 Tw (SiteFooter) Tj
ET
BT
0.9955 0 0 0.9955 207.36 438.36 Tm
/F4 10 Tf
0.0127 Tc -0.0335 Tw ( procedures. This version of the templates creates a left col-) Tj
-98.8489 -12.0547 TD 0.0147 Tc 0.0094 Tw (umn for the navigation and a right column for the page content:) Tj
ET
1 1 1 rg
108.96 393 372 8.04 re f
0 0 0 rg
131.76 396.72 0.24 0.48 re f
480 396.72 0.24 0.48 re f
132 396.72 348 0.48 re f
BT
132.96 403.68 TD
/F1 7.92 Tf
0.0414 Tc 0.0368 Tw (Example 18\226) Tj
3.9965 Tc 0 Tw (8) Tj
56.88 0 TD /F5 9 Tf
0 Tc (SiteMenu) Tj
43.2 0 TD /F0 7.92 Tf
0.0365 Tc -0.0182 Tw ( and ) Tj
17.76 0 TD /F5 9 Tf
-0.012 Tc 0 Tw (SiteFooter) Tj
53.88 0 TD /F0 7.92 Tf
0.0342 Tc 0.0441 Tw ( template procedures.) Tj
-171.72 -22.68 TD /F5 9 Tf
-0.006 Tc 0.006 Tw (proc SitePage {title} {) Tj
18 -9.96 TD -0.012 Tc 0.012 Tw (global site) Tj
0 -9.96 TD -0.0071 Tc 0.0071 Tw (set html "$title\\n\\) Tj
18 -10.08 TD -0.006 Tc 0.006 Tw (\\n\\) Tj
0 -9.96 TD -0.0096 Tc 0.0096 Tw (\\n\\) Tj
T* -0.0052 Tc 0.0052 Tw (\\n\\) Tj
0 -10.08 TD -0.0109 Tc 0 Tw (\\n\\) Tj
0 -9.96 TD -0.006 Tc 0.006 Tw (\\n\\) Tj
T* -0.0083 Tc 0.0083 Tw (\\n\\) Tj
0 -10.08 TD -0.0075 Tc 0.0075 Tw (\\n\\) Tj
0 -9.96 TD -0.0083 Tc 0.0083 Tw ([SiteMenu $site\(pages\)]\\n\\) Tj
0 -10.08 TD 0 Tc 0 Tw (\\n\\) Tj
0 -9.96 TD -0.01 Tc ( | \\n\\) Tj
T* 0 Tc -0.04 Tw (\\n\\) Tj
0 -10.08 TD -0.0067 Tc 0 Tw ($title\\n\\) Tj
0 -9.96 TD 0 Tc (\\n") Tj
-18 -9.96 TD -0.0109 Tc 0.0109 Tw (return $html) Tj
-18 -10.08 TD 0 Tc 0 Tw (}) Tj
0 -9.96 TD -0.0071 Tc 0.0071 Tw (proc SiteFooter {} {) Tj
18 -9.96 TD -0.012 Tc 0.012 Tw (global site) Tj
0 -10.08 TD -0.0067 Tc 0.0067 Tw (set html " \\n\\) Tj
18 -9.96 TD -0.0078 Tc 0.0078 Tw ([SiteMenu | $site\(pages\)]\\n\\) Tj
0 -9.96 TD -0.0057 Tc 0 Tw ( |
\\n") Tj
-18 -10.08 TD -0.0109 Tc 0.0109 Tw (return $html) Tj
-18 -9.96 TD 0 Tc 0 Tw (}) Tj
0 -9.96 TD -0.0055 Tc 0.0055 Tw (proc SiteMenu {sep list} {) Tj
ET
endstream
endobj
542 0 obj
7015
endobj
540 0 obj
<<
/Type /Page
/Parent 532 0 R
/Resources <<
/Font <<
/F0 6 0 R
/F1 7 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
>>
/ProcSet 2 0 R
>>
/Contents 541 0 R
>>
endobj
544 0 obj
<<
/Length 545 0 R
>>
stream
BT
114 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0365 Tc -0.0782 Tw (254 ) Tj
256.44 0 TD 0.0368 Tc -0.0186 Tw (TclHttpd Web Server) Tj
74.28 0 TD 0.0261 Tc 0.0282 Tw ( Chap. 18) Tj
ET
113.52 701.88 0.48 0.96 re f
486 701.88 0.48 0.96 re f
114 701.88 372 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
554.76 746.76 0.24 0.48 re f
584.04 746.76 0.24 0.48 re f
555 746.76 29.04 0.48 re f
585 80.76 0.24 0.48 re f
553.8 80.76 0.24 0.48 re f
554.04 80.76 30.96 0.48 re f
548.76 69.96 0.48 0.24 re f
548.76 33.72 0.48 0.24 re f
548.76 33.96 0.48 36 re f
BT
156 671.04 TD
/F5 9 Tf
-0.012 Tc 0.012 Tw (global page) Tj
0 -10.08 TD -0.02 Tc 0.02 Tw (set s "") Tj
0 -9.96 TD -0.0133 Tc 0.0133 Tw (set html "") Tj
T* -0.0104 Tc 0.0104 Tw (foreach {label url} $list {) Tj
18 -10.08 TD -0.0097 Tc 0.0097 Tw (if {[string compare $page\(url\) $url] == 0} {) Tj
18 -9.96 TD -0.0067 Tc 0.0067 Tw (append html $s$label) Tj
-18 -9.96 TD -0.02 Tc 0.02 Tw (} else {) Tj
18 -10.08 TD -0.0095 Tc 0.0095 Tw (append html "$s$label") Tj
-18 -9.96 TD 0 Tc 0 Tw (}) Tj
0 -9.96 TD -0.06 Tw (set s $sep) Tj
-18 -10.08 TD 0 Tw (}) Tj
0 -9.96 TD -0.0109 Tc 0.0109 Tw (return $html) Tj
ET
1 1 1 rg
114 540 372 8.04 re f
0 0 0 rg
136.8 543.72 0.24 0.48 re f
485.04 543.72 0.24 0.48 re f
137.04 543.72 348 0.48 re f
BT
138 551.04 TD
0 Tc 0 Tw (}) Tj
ET
BT
0.9955 0 0 0.9955 138 524.4 Tm
/F4 10 Tf
0.0114 Tc -0.0016 Tw (Of course, a real site will have more elaborate graphics and probably a two-) Tj
-24.1095 -12.0547 TD 0.0136 Tc -0.0344 Tw (level, three-level, or more complex tree structure that describes its structure.) Tj
-1.0158 Tc 0 Tw (Y) Tj
0.0479 Tc (ou) Tj
0 -12.0547 TD 0.015 Tc 1.2139 Tw (can also define a family of templates so that each page doesn\222t have to fit the) Tj
T* 0.0146 Tc 0.7344 Tw (same mold. Once you start using templates, it is fairly easy to change both the) Tj
T* 0.0156 Tc 0.3976 Tw (template implementation and to move pages around among different sections of) Tj
T* 0.0114 Tc -0.0202 Tw (your ) Tj
-0.0674 Tc 0.0591 Tw (Web site.) Tj
24.1095 -12.0547 TD 0.0196 Tc -0.2574 Tw (There are many other applications for "macros" that make repetitive HTML) Tj
-24.1095 -12.0547 TD 0.0137 Tc 1.183 Tw (coding chores eas) Tj
-1.2738 Tc 0 Tw (y) Tj
-0.0192 Tc 1.2161 Tw (. Take, for example, the link to ) Tj
ET
BT
352.44 440.4 TD
/F5 9 Tf
-0.0086 Tc 0 Tw (/ordering.html) Tj
ET
BT
0.9955 0 0 0.9955 427.92 440.4 Tm
/F4 10 Tf
0.0196 Tc 1.1772 Tw ( in Example) Tj
-315.3522 -12.0547 TD 0.0193 Tc 0.7193 Tw (18\2266. The proper label for this is already defined in ) Tj
ET
BT
361.08 428.4 TD
/F5 9 Tf
0 Tc 0 Tw ($site\(pages\)) Tj
ET
BT
0.9955 0 0 0.9955 425.88 428.4 Tm
/F4 10 Tf
0.0134 Tc 0.7414 Tw (, so we could) Tj
-313.3029 -12.0547 TD 0.0203 Tc -0.0291 Tw (introduce a ) Tj
ET
BT
168.96 416.4 TD
/F5 9 Tf
-0.015 Tc 0 Tw (SiteLink) Tj
ET
BT
0.9955 0 0 0.9955 212.16 416.4 Tm
/F4 10 Tf
0.0157 Tc 0.0057 Tw ( procedure that uses this:) Tj
ET
1 1 1 rg
114 383.04 372 7.92 re f
0 0 0 rg
136.8 386.76 0.24 0.48 re f
485.04 386.76 0.24 0.48 re f
137.04 386.76 348 0.48 re f
BT
138 393.72 TD
/F1 7.92 Tf
0.0534 Tc -0.0952 Tw (Example 18\226) Tj
3.9965 Tc 0 Tw (9) Tj
56.88 0 TD /F0 7.92 Tf
0.0513 Tc -0.093 Tw (The ) Tj
15.96 0 TD /F5 9 Tf
0 Tc 0 Tw (SiteLink) Tj
43.2 0 TD /F0 7.92 Tf
0.0422 Tc -0.084 Tw ( procedure.) Tj
-116.04 -22.68 TD /F5 9 Tf
0 Tc -0.08 Tw (proc SiteLink {label} {) Tj
18 -10.08 TD -0.012 Tc 0.012 Tw (global site) Tj
0 -9.96 TD -0.0104 Tc 0.0104 Tw (array set map $site\(pages\)) Tj
T* -0.0089 Tc 0.0089 Tw (if {[info exist map\($label\)]} {) Tj
18 -10.08 TD -0.009 Tc 0.009 Tw (return "$label") Tj
-18 -9.96 TD -0.02 Tc 0.02 Tw (} else {) Tj
18 -9.96 TD -0.01 Tc 0.01 Tw (return $label) Tj
-18 -10.08 TD 0 Tc 0 Tw (}) Tj
ET
1 1 1 rg
114 280.08 372 7.92 re f
0 0 0 rg
136.8 283.8 0.24 0.48 re f
485.04 283.8 0.24 0.48 re f
137.04 283.8 348 0.48 re f
BT
138 291 TD
(}) Tj
ET
BT
0.9955 0 0 0.9955 138 264.36 Tm
/F4 10 Tf
0.0192 Tc -0.2087 Tw (If your pages embed calls to ) Tj
ET
BT
268.08 264.36 TD
/F5 9 Tf
-0.015 Tc 0 Tw (SiteLink) Tj
ET
BT
0.9955 0 0 0.9955 311.16 264.36 Tm
/F4 10 Tf
0.0171 Tc -0.1981 Tw (, then you can change the URL associ-) Tj
-198.0595 -12.0547 TD 0.0139 Tc 0.327 Tw (ated with the page name by changing the value of ) Tj
ET
BT
349.92 252.36 TD
/F5 9 Tf
0 Tc 0 Tw (site\(pages\)) Tj
ET
BT
0.9955 0 0 0.9955 409.2 252.36 Tm
/F4 10 Tf
0.0096 Tc 0.3433 Tw (. If this is stored) Tj
-296.5468 -12.0547 TD 0.0199 Tc -0.0287 Tw (in the top-level ") Tj
ET
BT
190.08 240.36 TD
/F5 9 Tf
-0.024 Tc 0 Tw (.tml") Tj
ET
BT
0.9955 0 0 0.9955 217.08 240.36 Tm
/F4 10 Tf
0.0041 Tc 0.0173 Tw ( file, the templates will automatically track the changes.) Tj
ET
BT
0.997 0 0 0.997 114 202.32 Tm
/F2 13 Tf
0.3012 Tc -0.0903 Tw (Form Handlers) Tj
ET
BT
0.9955 0 0 0.9955 114 181.32 Tm
/F4 10 Tf
0.0196 Tc 0.3534 Tw (HTML forms and form-handling programs go togethe) Tj
-1.0667 Tc 0 Tw (r) Tj
0.0185 Tc 0.3585 Tw (. The form is presented to) Tj
0 -12.0547 TD 0.0093 Tc 1.1272 Tw (the user on the client machine. The form handler runs on the server after the) Tj
T* 0.019 Tc 0.8253 Tw (user fills out the form and presses the submit button. The form presents input) Tj
T* -0.0015 Tc 2.1493 Tw (widgets like radiobuttons, checkbuttons, selection lists, and text entry fields.) Tj
T* 0.0129 Tc 0.0266 Tw (Each of these widgets is assigned a name, and each widget gets a value based on) Tj
ET
endstream
endobj
545 0 obj
5930
endobj
543 0 obj
<<
/Type /Page
/Parent 532 0 R
/Resources <<
/Font <<
/F0 6 0 R
/F1 7 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
>>
/ProcSet 2 0 R
>>
/Contents 544 0 R
>>
endobj
547 0 obj
<<
/Length 548 0 R
>>
stream
BT
108.96 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0496 Tc -0.0913 Tw (Form Handlers) Tj
356.76 0 TD 0.0765 Tc 0 Tw (255) Tj
ET
108.48 701.88 0.48 0.96 re f
480.72 701.88 0.48 0.96 re f
108.96 701.88 371.76 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
553.8 746.76 0.24 0.48 re f
585 746.76 0.24 0.48 re f
554.04 746.76 30.96 0.48 re f
585 80.76 0.24 0.48 re f
554.76 80.76 0.24 0.48 re f
555 80.76 30 0.48 re f
547.8 75 0.48 0.24 re f
547.8 34.8 0.48 0.24 re f
547.8 35.04 0.48 39.96 re f
510 504 54 108 re f
510 611.76 54.24 0.48 re f
563.76 503.76 0.48 108.24 re f
509.76 503.76 54.24 0.48 re f
509.76 504 0.48 108.24 re f
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 605.52 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 602.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 598.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (.) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 595.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 592.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (A) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 583.2 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 575.28 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (v) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 568.56 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (a) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 560.64 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (n) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 553.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 545.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (e) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 538.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 530.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 526.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (T) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 521.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 514.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (l) Tj
ET
Q
BT
0.9955 0 0 0.9955 108.96 670.32 Tm
/F4 10 Tf
0.0175 Tc -0.0102 Tw (the user\222s input. The form handler is a program that looks at the names and val-) Tj
0 -12.0547 TD 0.0202 Tc -0.0197 Tw (ues from the form and computes the next page for the user to read.) Tj
24.1095 -12.0547 TD 0.0147 Tc 1.2303 Tw (CGI is a standard way to hook external programs to ) Tj
-0.0198 Tc 1.2569 Tw (Web servers for the) Tj
-24.1095 -12.0547 TD 0.0168 Tc 0.9389 Tw (purpose of processing form data. CGI has a special encoding for values so that) Tj
0 -12.0547 TD 0.0239 Tc 1.1126 Tw (they can be transported safel) Tj
-1.2738 Tc 0 Tw (y) Tj
0.0141 Tc 1.1675 Tw (. The encoded data is either read from standard) Tj
T* 0.0106 Tc 0.4072 Tw (input or taken from the command line. The CGI program decodes the data, pro-) Tj
T* 0.0165 Tc 2.5434 Tw (cesses it, and writes a new HTML page on its standard output. Chapter 3) Tj
T* 0.0193 Tc -0.0281 Tw (describes writing CGI scripts in Tcl.) Tj
24.1095 -12.0547 TD 0.014 Tc 0.4112 Tw (TclHttpd provides alternatives to CGI that are more efficient because they) Tj
-24.1095 -12.0547 TD 0.0125 Tc -0.2141 Tw (are built right into the serve) Tj
-0.9461 Tc 0 Tw (r) Tj
0.0155 Tc -0.2201 Tw (. This eliminates the overhead that comes from run-) Tj
0 -12.0547 TD 0.0133 Tc 1.1031 Tw (ning an external program to compute the page. Another advantage is that the) Tj
T* 0.005 Tc 1.0914 Tw (Web server can maintain state between client requests in Tcl variables. If you) Tj
T* 0.0171 Tc -0.0345 Tw (use CGI, you must use some sort of database or file storage to maintain informa-) Tj
T* 0.0077 Tc -0.0164 Tw (tion between requests.) Tj
24.1095 -30.1369 TD /F2 10 Tf
0.0096 Tc 0.0822 Tw (Application Direct Handlers) Tj
0 -18.0821 TD /F4 10 Tf
0.0192 Tc 0.0323 Tw (The server comes with several built-in form handlers that you can use with) Tj
-24.1095 -12.0547 TD 0.0187 Tc -0.2685 Tw (little effort. The ) Tj
ET
BT
184.32 454.32 TD
/F5 9 Tf
-0.0086 Tc 0 Tw (/mail/forminfo) Tj
ET
BT
0.9955 0 0 0.9955 259.8 454.32 Tm
/F4 10 Tf
0.0166 Tc -0.2665 Tw ( URL will package up the query data and mail it) Tj
-151.5282 -12.0547 TD 0.0076 Tc -0.0163 Tw (to you. ) Tj
-0.0045 Tc -0.0684 Tw (You use form fields to set various mail headers, and the rest of the data is) Tj
0 -12.0547 TD 0.015 Tc 1.6968 Tw (packaged up into a Tcl-readable mail message. Example 18\22610 shows a form) Tj
T* 0.0142 Tc 1.5441 Tw (that uses this handle) Tj
-0.9461 Tc 0 Tw (r) Tj
0.0155 Tc 1.5429 Tw (. Other built-in handlers are described starting at page) Tj
T* 0.015 Tc 0 Tw (263.) Tj
ET
1 1 1 rg
108.96 372.96 372 8.04 re f
0 0 0 rg
131.76 376.8 0.24 0.48 re f
480 376.8 0.24 0.48 re f
132 376.8 348 0.48 re f
BT
132.96 383.64 TD
/F1 7.92 Tf
0.041 Tc 0.0372 Tw (Example 18\2261) Tj
3.9965 Tc 0 Tw (0) Tj
61.32 0 TD /F0 7.92 Tf
0.0335 Tc -0.0153 Tw (Mail form results with ) Tj
77.4 0 TD /F5 9 Tf
0 Tc 0 Tw (/mail/forminfo) Tj
75.48 0 TD /F0 7.92 Tf
-0.0418 Tc (.) Tj
-214.2 -22.68 TD /F5 9 Tf
-0.0063 Tc 0.0063 Tw () Tj
ET
BT
0.9955 0 0 0.9955 132.96 214.32 Tm
/F4 10 Tf
0.0257 Tc -0.0345 Tw (The mail message sent by ) Tj
ET
BT
255 214.32 TD
/F5 9 Tf
-0.0086 Tc 0 Tw (/mail/forminfo) Tj
ET
BT
0.9955 0 0 0.9955 330.48 214.32 Tm
/F4 10 Tf
0.023 Tc -0.0318 Tw ( is shown in Example 18\22611. ) Tj
ET
1 1 1 rg
108.96 180.96 372 8.04 re f
0 0 0 rg
131.76 184.8 0.24 0.48 re f
480 184.8 0.24 0.48 re f
132 184.8 348 0.48 re f
BT
132.96 191.64 TD
/F1 7.92 Tf
0.0414 Tc 0.0368 Tw (Example 18\226) Tj
-0.4435 Tc 0 Tw (1) Tj
4.1165 Tc (1) Tj
60.96 0 TD /F0 7.92 Tf
0.0411 Tc -0.0529 Tw (Mail message sent by ) Tj
79.56 0 TD /F5 9 Tf
0 Tc 0 Tw (/mail/forminfo) Tj
75.48 0 TD /F0 7.92 Tf
-0.0418 Tc (.) Tj
-216 -22.68 TD /F5 9 Tf
-0.006 Tc 0.006 Tw (To: mailreader@my.com) Tj
0 -9.96 TD -0.0055 Tc 0.0055 Tw (Subject: Name and Address) Tj
0 -20.04 TD 0 Tc 0 Tw (data {) Tj
18 -9.96 TD (name) Tj
36 0 TD -0.01 Tc 0.01 Tw ({Joe Visitor}) Tj
ET
endstream
endobj
548 0 obj
7744
endobj
546 0 obj
<<
/Type /Page
/Parent 532 0 R
/Resources <<
/Font <<
/F0 6 0 R
/F1 7 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
>>
/ProcSet 2 0 R
>>
/Contents 547 0 R
>>
endobj
550 0 obj
<<
/Length 551 0 R
>>
stream
BT
114 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0365 Tc -0.0782 Tw (256 ) Tj
256.44 0 TD 0.0368 Tc -0.0186 Tw (TclHttpd Web Server) Tj
74.28 0 TD 0.0261 Tc 0.0282 Tw ( Chap. 18) Tj
ET
113.52 701.88 0.48 0.96 re f
486 701.88 0.48 0.96 re f
114 701.88 372 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
554.76 746.76 0.24 0.48 re f
584.04 746.76 0.24 0.48 re f
555 746.76 29.04 0.48 re f
585 80.76 0.24 0.48 re f
553.8 80.76 0.24 0.48 re f
554.04 80.76 30.96 0.48 re f
548.76 69.96 0.48 0.24 re f
548.76 33.72 0.48 0.24 re f
548.76 33.96 0.48 36 re f
BT
156 671.04 TD
/F5 9 Tf
-0.024 Tc 0 Tw (addr1) Tj
36 0 TD 0 Tc -0.12 Tw ({Acme Company}) Tj
-36 -10.08 TD -0.024 Tc 0 Tw (addr2) Tj
36 0 TD -0.008 Tc 0.008 Tw ({100 Main Street}) Tj
-36 -9.96 TD 0 Tc 0 Tw (city) Tj
36 0 TD -0.0086 Tc 0.0086 Tw ({Mountain View}) Tj
-36 -9.96 TD -0.024 Tc 0 Tw (state) Tj
36 0 TD -0.012 Tc (California) Tj
-36 -10.08 TD 0 Tc (zip) Tj
36 0 TD (12345) Tj
-36 -9.96 TD -0.0171 Tc (country) Tj
54 0 TD 0 Tc (USA) Tj
ET
1 1 1 rg
114 600 372 8.04 re f
0 0 0 rg
136.8 603.72 0.24 0.48 re f
485.04 603.72 0.24 0.48 re f
137.04 603.72 348 0.48 re f
BT
138 611.04 TD
(}) Tj
ET
BT
0.9955 0 0 0.9955 138 584.4 Tm
/F4 10 Tf
0.012 Tc -0.0486 Tw (It is easy to write a script that strips the headers, defines a ) Tj
ET
BT
413.16 584.4 TD
/F5 9 Tf
0 Tc 0 Tw (data) Tj
ET
BT
0.9955 0 0 0.9955 434.76 584.4 Tm
/F4 10 Tf
-0.0011 Tc -0.0076 Tw ( procedure,) Tj
-322.2234 -12.0547 TD 0.0078 Tc -0.2576 Tw (and uses ) Tj
ET
BT
156.72 572.4 TD
/F5 9 Tf
0 Tc 0 Tw (eval) Tj
ET
BT
0.9955 0 0 0.9955 178.32 572.4 Tm
/F4 10 Tf
0.0161 Tc -0.2901 Tw ( to process the message bod) Tj
-1.2738 Tc 0 Tw (y) Tj
0.0147 Tc -0.2817 Tw (. Whenever you send data via e-mail, if) Tj
-64.6134 -12.0547 TD 0.0102 Tc 1.1865 Tw (you format it with Tcl list structure, you can process it quite easil) Tj
-1.2738 Tc 0 Tw (y) Tj
0.0357 Tc 1.1007 Tw (. The basic) Tj
0 -12.0547 TD 0.0107 Tc 0.0353 Tw (structure of such a mail reader procedure is shown in Example 18\22612:) Tj
ET
1 1 1 rg
114 515.04 372 7.92 re f
0 0 0 rg
136.8 518.76 0.24 0.48 re f
485.04 518.76 0.24 0.48 re f
137.04 518.76 348 0.48 re f
BT
138 525.72 TD
/F1 7.92 Tf
0.0519 Tc -0.0937 Tw (Example 18\2261) Tj
3.9965 Tc 0 Tw (2) Tj
61.32 0 TD /F0 7.92 Tf
0.0429 Tc -0.0547 Tw (Processing mail sent by ) Tj
86.64 0 TD /F5 9 Tf
-0.0086 Tc 0 Tw (/mail/forminfo) Tj
75.48 0 TD /F0 7.92 Tf
-0.0418 Tc (.) Tj
-223.44 -22.68 TD /F5 9 Tf
-0.0095 Tc 0.0095 Tw (# Assume the mail message is on standard input) Tj
0 -20.04 TD -0.008 Tc 0.008 Tw (set X [read stdin]) Tj
T* -0.0107 Tc 0.0107 Tw (# Strip off the mail headers, when end with a blank line) Tj
0 -9.96 TD -0.0095 Tc 0.0095 Tw (if {[regsub {.*?\\n\\ndata} $X {data} X] != 1} {) Tj
18 -9.96 TD -0.0044 Tc -0.0356 Tw (error "Malformed mail message") Tj
-18 -10.08 TD 0 Tc 0 Tw (}) Tj
0 -9.96 TD -0.04 Tw (proc data {fields} {) Tj
18 -9.96 TD -0.0092 Tc 0.0092 Tw (foreach {name value} $fields {) Tj
18 -10.08 TD -0.01 Tc 0.01 Tw (# Do something) Tj
-18 -9.96 TD 0 Tc 0 Tw (}) Tj
-18 -9.96 TD (}) Tj
0 -10.08 TD -0.0104 Tc 0.0104 Tw (# Process the message. For added security, you may want) Tj
0 -9.96 TD -0.004 Tc -0.0131 Tw (# do this part in a safe interpreter.) Tj
ET
1 1 1 rg
114 342 372 8.04 re f
0 0 0 rg
136.8 345.72 0.24 0.48 re f
485.04 345.72 0.24 0.48 re f
137.04 345.72 348 0.48 re f
BT
138 353.04 TD
0 Tc -0.12 Tw (eval $X) Tj
ET
BT
0.9955 0 0 0.9955 138 316.32 Tm
/F2 10 Tf
-0.0113 Tc 0.1032 Tw (Template Form Handlers) Tj
0 -18.0821 TD /F4 10 Tf
0.0149 Tc 1.447 Tw (The drawback of using application-direct URL form handlers is that you) Tj
-24.1095 -12.0547 TD 0.0189 Tc 1.8408 Tw (must modify their Tcl implementation to change the resulting page. Another) Tj
0 -12.0547 TD 0.0093 Tc 1.5398 Tw (approach is to use templates for the result page that embed a command that) Tj
T* 0.0145 Tc 1.0376 Tw (handles the form data. The ) Tj
ET
BT
247.32 262.32 TD
/F5 9 Tf
0 Tc 0 Tw (Mail_FormInfo) Tj
ET
BT
0.9955 0 0 0.9955 317.4 262.32 Tm
/F4 10 Tf
0.0169 Tc 0.9629 Tw ( procedure, for example, mails form) Tj
-204.328 -12.0547 TD 0.006 Tc 0.792 Tw (data. It takes no arguments. Instead, it looks in the query data for ) Tj
ET
BT
432.72 250.32 TD
/F5 9 Tf
-0.02 Tc 0 Tw (sendto) Tj
ET
BT
0.9955 0 0 0.9955 465.12 250.32 Tm
/F4 10 Tf
0.0205 Tc 0.8146 Tw ( and) Tj
ET
BT
114 238.32 TD
/F5 9 Tf
-0.0171 Tc 0 Tw (subject) Tj
ET
BT
0.9955 0 0 0.9955 151.8 238.32 Tm
/F4 10 Tf
0.0139 Tc -0.1432 Tw ( values, and if they are present, it sends the rest of the data in an e-mail.) Tj
-37.9725 -12.0547 TD 0.0156 Tc -0.0123 Tw (It returns an HTML comment that flags that mail was sent.) Tj
24.1095 -12.0547 TD 0.0214 Tc 0.9342 Tw (When you use templates to process form data, you need to turn off result) Tj
-24.1095 -12.0547 TD 0.018 Tc 0.0753 Tw (caching because the server must process the template each time the form is sub-) Tj
0 -12.0547 TD 0.0052 Tc 1.6738 Tw (mitted. ) Tj
-0.0253 Tc 1.6643 Tw (To turn off caching, embed the ) Tj
ET
BT
303.96 190.32 TD
/F5 9 Tf
-0.0109 Tc 0 Tw (Doc_Dynamic) Tj
ET
BT
0.9955 0 0 0.9955 363.24 190.32 Tm
/F4 10 Tf
0.0228 Tc 1.5657 Tw ( command into your form) Tj
-250.3771 -12.0547 TD 0.0168 Tc 1.5898 Tw (handler pages, or set the ) Tj
ET
BT
238.92 178.32 TD
/F5 9 Tf
0 Tc 0 Tw (page\(dynamic\)) Tj
ET
BT
0.9955 0 0 0.9955 309.12 178.32 Tm
/F4 10 Tf
0.0161 Tc 1.6327 Tw ( variable to 1. Alternativel) Tj
-1.1533 Tc 0 Tw (y) Tj
0.0078 Tc 1.6711 Tw (, you can) Tj
-196.0102 -12.0547 TD 0.0064 Tc 0.0572 Tw (simply post directly to the ) Tj
ET
BT
237.12 166.32 TD
/F9 9 Tf
-0.03 Tc 0 Tw (file) Tj
21.48 0 TD /F5 9 Tf
0 Tc (.tml) Tj
ET
BT
0.9955 0 0 0.9955 280.2 166.32 Tm
/F4 10 Tf
0.0262 Tc -0.035 Tw ( page instead of to the ) Tj
ET
BT
384.84 166.32 TD
/F9 9 Tf
0 Tc 0 Tw (file) Tj
21.6 0 TD /F5 9 Tf
-0.024 Tc (.html) Tj
ET
BT
0.9955 0 0 0.9955 433.32 166.32 Tm
/F4 10 Tf
0.002 Tc -0.0107 Tw ( page.) Tj
ET
endstream
endobj
551 0 obj
6397
endobj
549 0 obj
<<
/Type /Page
/Parent 532 0 R
/Resources <<
/Font 552 0 R
/ProcSet 2 0 R
>>
/Contents 550 0 R
>>
endobj
552 0 obj
<<
/F0 6 0 R
/F1 7 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
/F9 32 0 R
>>
endobj
555 0 obj
<<
/Length 556 0 R
>>
stream
BT
108.96 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0496 Tc -0.0913 Tw (Form Handlers) Tj
356.76 0 TD 0.0765 Tc 0 Tw (257) Tj
ET
108.48 701.88 0.48 0.96 re f
480.72 701.88 0.48 0.96 re f
108.96 701.88 371.76 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
553.8 746.76 0.24 0.48 re f
585 746.76 0.24 0.48 re f
554.04 746.76 30.96 0.48 re f
585 80.76 0.24 0.48 re f
554.76 80.76 0.24 0.48 re f
555 80.76 30 0.48 re f
547.8 75 0.48 0.24 re f
547.8 34.8 0.48 0.24 re f
547.8 35.04 0.48 39.96 re f
510 504 54 108 re f
510 611.76 54.24 0.48 re f
563.76 503.76 0.48 108.24 re f
509.76 503.76 54.24 0.48 re f
509.76 504 0.48 108.24 re f
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 605.52 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 602.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 598.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (.) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 595.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 592.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (A) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 583.2 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 575.28 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (v) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 568.56 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (a) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 560.64 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (n) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 553.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 545.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (e) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 538.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 530.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 526.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (T) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 521.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 514.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (l) Tj
ET
Q
BT
0.9955 0 0 0.9955 132.96 670.32 Tm
/F2 10 Tf
0.0304 Tc -0.0592 Tw (Self Posting Forms) Tj
0 -18.0821 TD /F4 10 Tf
0.0168 Tc 1.1521 Tw (This section illustrates a self-posting form. This is a form on a page that) Tj
-24.1095 -12.0547 TD 0.0137 Tc -0.2334 Tw (posts the form data to back to the same page. The page embeds a Tcl command to) Tj
0 -12.0547 TD 0.0154 Tc 0.2732 Tw (check its own form data. Once the data is correct, the page triggers a redirect to) Tj
T* 0.0253 Tc 0.4481 Tw (the next page in the flo) Tj
-1.274 Tc 0 Tw (w) Tj
0.0161 Tc 0.4792 Tw (. This is a powerful technique that I use to create com-) Tj
T* 0.0042 Tc 1.2442 Tw (plex page flows using templates. Of course, you need to save the form data at) Tj
T* -0.0149 Tc 1.4529 Tw (each step. ) Tj
-0.0079 Tc 1.4366 Tw (You can put the data in Tcl variables, use the data to control your) Tj
T* 0.0132 Tc 0.5699 Tw (application, or store it into a database. TclHttpd comes with a ) Tj
ET
BT
403.44 580.32 TD
/F5 9 Tf
-0.0171 Tc 0 Tw (Session) Tj
ET
BT
0.9955 0 0 0.9955 441.24 580.32 Tm
/F4 10 Tf
-0.0057 Tc 0.5998 Tw ( module,) Tj
-333.796 -12.0547 TD 0.0092 Tc 1.2327 Tw (which is one way to manage this information. ) Tj
0.0024 Tc 1.2185 Tw (For details you should scan the) Tj
ET
BT
108.96 556.32 TD
/F5 9 Tf
-0.0109 Tc 0 Tw (session.tcl) Tj
ET
BT
0.9955 0 0 0.9955 168.36 556.32 Tm
/F4 10 Tf
0.0121 Tc 0.0274 Tw ( file in the distribution. ) Tj
-35.5615 -12.0547 TD 0.021 Tc 0.6031 Tw (Example 18\22613 shows the ) Tj
ET
BT
258.36 544.32 TD
/F5 9 Tf
-0.0109 Tc 0 Tw (Form_Simple) Tj
ET
BT
0.9955 0 0 0.9955 317.64 544.32 Tm
/F4 10 Tf
0.018 Tc 0.6001 Tw ( procedure that generates a simple) Tj
-209.6321 -12.0547 TD 0.0157 Tc 0.5598 Tw (self-checking form. Its arguments are a unique ID for the form, a description of) Tj
0 -12.0547 TD 0.0141 Tc 0.0776 Tw (the form fields, and the URL of the next page in the flo) Tj
-1.1534 Tc 0 Tw (w) Tj
0.0168 Tc 0.0648 Tw (. The field description is) Tj
T* 0.0103 Tc 0.8248 Tw (a list with three elements for each field: a required flag, a form element name,) Tj
T* 0.0176 Tc 0.8309 Tw (and a label to display with the form element. ) Tj
-0.0183 Tc 0.8737 Tw (You can see this structure in the) Tj
T* 0.0179 Tc 0.6565 Tw (template shown in Example 18\22614 on page 258. The procedure does two things) Tj
T* 0.0118 Tc 0.108 Tw (at once. It computes the HTML form, and it also checks if the required fields are) Tj
T* 0.0138 Tc 1.6306 Tw (present. It uses some procedures from the ) Tj
ET
BT
316.32 460.32 TD
/F5 9 Tf
0 Tc 0 Tw (form) Tj
ET
BT
0.9955 0 0 0.9955 337.8 460.32 Tm
/F4 10 Tf
0.012 Tc 1.6429 Tw ( module to generate form ele-) Tj
-229.884 -12.0547 TD 0.0195 Tc 1.2051 Tw (ments that retain values from the previous page. If all the required fields are) Tj
0 -12.0547 TD 0.0161 Tc 0.2533 Tw (present, it discards the HTML, saves the data, and triggers a redirect by calling) Tj
ET
BT
108.96 424.32 TD
/F5 9 Tf
-0.01 Tc 0 Tw (Doc_Redirect) Tj
ET
BT
0.9955 0 0 0.9955 173.76 424.32 Tm
/F4 10 Tf
0.1119 Tc -0.1211 Tw (. ) Tj
ET
1 1 1 rg
108.96 390.96 372 8.04 re f
0 0 0 rg
131.76 394.8 0.24 0.48 re f
480 394.8 0.24 0.48 re f
132 394.8 348 0.48 re f
BT
132.96 401.64 TD
/F1 7.92 Tf
0.041 Tc 0.0372 Tw (Example 18\2261) Tj
3.9965 Tc 0 Tw (3) Tj
61.32 0 TD /F0 7.92 Tf
0.0402 Tc -0.042 Tw (A self-checking form procedure.) Tj
-61.32 -22.68 TD /F5 9 Tf
-0.0071 Tc 0.0071 Tw (proc Form_Simple {id fields nextpage} {) Tj
18 -9.96 TD -0.012 Tc 0.012 Tw (global page) Tj
0 -9.96 TD -0.0048 Tc -0.0352 Tw (if {![form::empty formid]} {) Tj
18 -10.08 TD -0.0041 Tc -0.0199 Tw (# Incoming form values, check them) Tj
0 -9.96 TD -0.0133 Tc 0.0133 Tw (set check 1) Tj
-18 -9.96 TD 0 Tc 0 Tw (} else {) Tj
18 -10.08 TD -0.01 Tc 0.01 Tw (# First time through the page) Tj
0 -9.96 TD -0.0133 Tc 0.0133 Tw (set check 0) Tj
-18 -9.96 TD 0 Tc 0 Tw (}) Tj
0 -10.08 TD -0.0072 Tc 0.0072 Tw (set html "\\n") Tj
0 -9.96 TD -0.0069 Tc 0.0069 Tw (append html "\\n") Tj
0 -9.96 TD -0.0109 Tc 0.0109 Tw (return $html) Tj
ET
1 1 1 rg
114 510 372 8.04 re f
0 0 0 rg
136.8 513.72 0.24 0.48 re f
485.04 513.72 0.24 0.48 re f
137.04 513.72 348 0.48 re f
BT
138 521.04 TD
0 Tc 0 Tw (}) Tj
ET
BT
0.9955 0 0 0.9955 138 494.4 Tm
/F4 10 Tf
0.0173 Tc 1.963 Tw (Example 18\22614 shows a page template that calls ) Tj
ET
BT
381.36 494.4 TD
/F5 9 Tf
-0.0109 Tc 0 Tw (Form_Simple) Tj
ET
BT
0.9955 0 0 0.9955 440.64 494.4 Tm
/F4 10 Tf
0.0311 Tc 1.8888 Tw ( with the) Tj
-328.1302 -12.0547 TD 0.0187 Tc -0.0275 Tw (required field description. ) Tj
ET
1 1 1 rg
114 449.04 372 7.92 re f
0 0 0 rg
136.8 452.76 0.24 0.48 re f
485.04 452.76 0.24 0.48 re f
137.04 452.76 348 0.48 re f
BT
138 459.72 TD
/F1 7.92 Tf
0.0519 Tc -0.0937 Tw (Example 18\2261) Tj
3.9965 Tc 0 Tw (4) Tj
61.32 0 TD /F0 7.92 Tf
0.0287 Tc 0.0256 Tw (A page with a self-checking form.) Tj
-61.32 -22.68 TD /F5 9 Tf
-0.01 Tc 0 Tw () Tj
18 -10.08 TD -0.0073 Tc 0.0073 Tw (Name and Address Form) Tj
-18 -9.96 TD -0.0171 Tc 0 Tw () Tj
0 -9.96 TD -0.0083 Tc 0.0083 Tw () Tj
18 -10.08 TD -0.0104 Tc 0.0104 Tw (Name and Address
) Tj
0 -9.96 TD -0.008 Tc 0.008 Tw (Please enter your name and address.) Tj
T* -0.01 Tc 0.01 Tw ([myform::simple nameaddr {) Tj
18 -10.08 TD -0.024 Tc 0.024 Tw (1 name) Tj
54 0 TD -0.02 Tc 0 Tw ("Name") Tj
-54 -9.96 TD 0.02 Tw (1 addr1) Tj
54 0 TD -0.0133 Tc 0 Tw ("Address") Tj
-54 -9.96 TD -0.02 Tc 0.02 Tw (0 addr2) Tj
37.8 0 TD 0 Tc 0 Tw (") Tj
16.2 0 TD -0.0133 Tc ("Address") Tj
-54 -10.08 TD -0.024 Tc 0.024 Tw (1 city) Tj
54 0 TD -0.02 Tc 0 Tw ("City") Tj
-54 -9.96 TD 0.02 Tw (0 state) Tj
54 0 TD -0.0171 Tc 0 Tw ("State") Tj
-54 -9.96 TD 0 Tc (1 zip) Tj
54 0 TD -0.0133 Tc 0.0133 Tw ("Zip Code") Tj
-54 -10.08 TD -0.015 Tc 0.015 Tw (0 country) Tj
54 0 TD -0.0133 Tc 0 Tw ("Country") Tj
-72 -9.96 TD -0.0092 Tc 0.0092 Tw (} nameok.html]) Tj
ET
1 1 1 rg
114 276 372 8.04 re f
0 0 0 rg
136.8 279.72 0.24 0.48 re f
485.04 279.72 0.24 0.48 re f
137.04 279.72 348 0.48 re f
BT
138 287.04 TD
-0.0086 Tc 0 Tw () Tj
ET
BT
0.9955 0 0 0.9955 138 250.32 Tm
/F2 10 Tf
0.0093 Tc -0.0381 Tw (The ) Tj
ET
BT
157.44 250.32 TD
/F8 12 Tf
0 Tc 0 Tw (form) Tj
ET
BT
0.9955 0 0 0.9955 186.12 250.32 Tm
/F2 10 Tf
0.0092 Tc 0.0826 Tw ( package) Tj
-48.3395 -18.0821 TD /F4 10 Tf
0.0119 Tc 0.0095 Tw (TclHttpd comes with a ) Tj
ET
BT
245.28 232.32 TD
/F5 9 Tf
0 Tc 0 Tw (form) Tj
ET
BT
0.9955 0 0 0.9955 266.88 232.32 Tm
/F4 10 Tf
0.0047 Tc -0.0134 Tw ( package \() Tj
ET
BT
313.32 232.32 TD
/F5 9 Tf
0 Tc 0 Tw (form.tcl) Tj
ET
BT
0.9955 0 0 0.9955 356.4 232.32 Tm
/F4 10 Tf
0.0173 Tc -0.0019 Tw (\) that is designed to support) Tj
-243.5059 -12.0547 TD 0.0033 Tc 0.7916 Tw (self-posting forms. The ) Tj
ET
BT
224.52 220.32 TD
/F5 9 Tf
-0.0109 Tc 0 Tw (Form_Simple) Tj
ET
BT
0.9955 0 0 0.9955 283.8 220.32 Tm
/F4 10 Tf
0.0179 Tc 0.777 Tw ( procedure uses ) Tj
ET
BT
360.72 220.32 TD
/F5 9 Tf
-0.0109 Tc 0 Tw (form::empty) Tj
ET
BT
0.9955 0 0 0.9955 420 220.32 Tm
/F4 10 Tf
0.027 Tc 0.7177 Tw ( to test if par-) Tj
-307.3961 -12.0547 TD 0.0197 Tc 1.2306 Tw (ticular form values are present in the query data. ) Tj
-0.003 Tc 1.224 Tw (For example, it tests to see) Tj
0 -12.0547 TD 0.0048 Tc 0.4687 Tw (whether the ) Tj
ET
BT
173.64 196.32 TD
/F5 9 Tf
0 Tc 0 Tw (formid) Tj
ET
BT
0.9955 0 0 0.9955 206.04 196.32 Tm
/F4 10 Tf
0.0203 Tc 0.3764 Tw ( field is present so that the procedure knows whether or not) Tj
-92.4599 -12.0547 TD 0.0032 Tc 0.8186 Tw (to check for the rest of the fields. The ) Tj
ET
BT
295.2 184.32 TD
/F5 9 Tf
-0.0109 Tc 0 Tw (form::value) Tj
ET
BT
0.9955 0 0 0.9955 354.48 184.32 Tm
/F4 10 Tf
0.0182 Tc 0.7928 Tw ( procedure is useful for con-) Tj
-241.5771 -12.0547 TD 0.0137 Tc -0.0073 Tw (structing form elements on self-posting form pages. It returns:) Tj
ET
BT
150 159 TD
/F5 9 Tf
-0.02 Tc 0 Tw (name=") Tj
32.4 0 TD /F9 9 Tf
0 Tc (name) Tj
21.48 0 TD /F5 9 Tf
(" value=") Tj
48.6 0 TD /F9 9 Tf
-0.024 Tc (value) Tj
26.88 0 TD /F5 9 Tf
0 Tc (") Tj
ET
BT
0.9955 0 0 0.9955 138 145.32 Tm
/F4 10 Tf
0.0176 Tc 0.0941 Tw (The ) Tj
ET
BT
158.64 145.32 TD
/F9 9 Tf
-0.024 Tc 0 Tw (value) Tj
ET
BT
0.9955 0 0 0.9955 185.52 145.32 Tm
/F4 10 Tf
0.0083 Tc 0.1035 Tw ( is the value of form element ) Tj
ET
BT
320.4 145.32 TD
/F9 9 Tf
0 Tc 0 Tw (name) Tj
ET
BT
0.9955 0 0 0.9955 342 145.32 Tm
/F4 10 Tf
0.0169 Tc 0.0708 Tw ( based on incoming query data,) Tj
-229.0402 -12.0547 TD 0.0202 Tc 0.1277 Tw (or just the empty string if the query value for ) Tj
ET
BT
327.6 133.32 TD
/F9 9 Tf
0 Tc 0 Tw (name) Tj
ET
BT
0.9955 0 0 0.9955 349.2 133.32 Tm
/F4 10 Tf
0.0108 Tc 0.1814 Tw ( is undefined. As a result, the) Tj
ET
endstream
endobj
559 0 obj
6522
endobj
557 0 obj
<<
/Type /Page
/Parent 554 0 R
/Resources <<
/Font 560 0 R
/ProcSet 2 0 R
>>
/Contents 558 0 R
>>
endobj
560 0 obj
<<
/F0 6 0 R
/F1 7 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
/F8 29 0 R
/F9 32 0 R
>>
endobj
562 0 obj
<<
/Length 563 0 R
>>
stream
BT
108.96 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0389 Tc 0.0394 Tw (Programming Reference) Tj
356.76 0 TD 0.0765 Tc 0 Tw (259) Tj
ET
108.48 701.88 0.48 0.96 re f
480.72 701.88 0.48 0.96 re f
108.96 701.88 371.76 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
553.8 746.76 0.24 0.48 re f
585 746.76 0.24 0.48 re f
554.04 746.76 30.96 0.48 re f
585 80.76 0.24 0.48 re f
554.76 80.76 0.24 0.48 re f
555 80.76 30 0.48 re f
547.8 75 0.48 0.24 re f
547.8 34.8 0.48 0.24 re f
547.8 35.04 0.48 39.96 re f
510 504 54 108 re f
510 611.76 54.24 0.48 re f
563.76 503.76 0.48 108.24 re f
509.76 503.76 54.24 0.48 re f
509.76 504 0.48 108.24 re f
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 605.52 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 602.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 598.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (.) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 595.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 592.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (A) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 583.2 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 575.28 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (v) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 568.56 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (a) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 560.64 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (n) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 553.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 545.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (e) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 538.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 530.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 526.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (T) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 521.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 514.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (l) Tj
ET
Q
BT
0.9955 0 0 0.9955 108.96 670.32 Tm
/F4 10 Tf
0.0148 Tc 0.0408 Tw (form can post to itself and retain values from the previous version of the page. It) Tj
0 -12.0547 TD 0.0204 Tc -0.0291 Tw (is used like this:) Tj
ET
BT
144.96 645 TD
/F5 9 Tf
-0.0089 Tc 0.0089 Tw () Tj
ET
BT
0.9955 0 0 0.9955 132.96 631.32 Tm
/F4 10 Tf
0.0176 Tc 1.9024 Tw (The ) Tj
ET
BT
155.52 631.32 TD
/F5 9 Tf
-0.0075 Tc 0 Tw (form::checkvalue) Tj
ET
BT
0.9955 0 0 0.9955 241.8 631.32 Tm
/F4 10 Tf
0.0205 Tc 1.9598 Tw ( and ) Tj
ET
BT
268.56 631.32 TD
/F5 9 Tf
-0.0075 Tc 0 Tw (form::radiovalue) Tj
ET
BT
0.9955 0 0 0.9955 354.84 631.32 Tm
/F4 10 Tf
0.0201 Tc 1.8999 Tw ( procedures are similar to) Tj
ET
BT
108.96 619.32 TD
/F5 9 Tf
-0.0109 Tc 0 Tw (form::value) Tj
ET
BT
0.9955 0 0 0.9955 168.36 619.32 Tm
/F4 10 Tf
0.0111 Tc 7.9965 Tw ( but designed for checkbuttons and radio buttons. The) Tj
ET
BT
108.96 607.32 TD
/F5 9 Tf
-0.01 Tc 0 Tw (form::select) Tj
ET
BT
0.9955 0 0 0.9955 173.76 607.32 Tm
/F4 10 Tf
0.0177 Tc 0.3473 Tw ( procedure formats a selection list and highlights the selected val-) Tj
-65.0956 -12.0547 TD -0.0217 Tc -0.2279 Tw (ues. The ) Tj
ET
BT
150 595.32 TD
/F5 9 Tf
0 Tc 0 Tw (form::data) Tj
ET
BT
0.9955 0 0 0.9955 204 595.32 Tm
/F4 10 Tf
0.0179 Tc -0.2798 Tw ( procedure simply returns the value of a given form element.) Tj
-95.4736 -12.0547 TD 0.0199 Tc 0.0015 Tw (These are summarized in ) Tj
-0.0153 Tc 0.0067 Tw (Table 18\2266 on page ) Tj
212.4047 0 TD 0.015 Tc 0 Tw (261.) Tj
ET
BT
0.997 0 0 0.997 108.96 549.36 Tm
/F2 13 Tf
0.2757 Tc -0.0648 Tw (Programming Reference) Tj
ET
BT
0.9955 0 0 0.9955 108.96 528.36 Tm
/F4 10 Tf
0.0155 Tc 2.6607 Tw (This section summarizes many of the more useful functions defined by the) Tj
0 -12.0547 TD 0.0281 Tc 0 Tw (serve) Tj
-1.0667 Tc (r) Tj
0.0082 Tc 2.4945 Tw (. These tables are not complete, howeve) Tj
-0.9461 Tc 0 Tw (r) Tj
-0.0317 Tc 2.5306 Tw (. You are encouraged to read) Tj
T* 0.0174 Tc -0.0061 Tw (through the code to learn more about the features offered by the serve) Tj
-0.9461 Tc 0 Tw (r) Tj
-0.0087 Tc (.) Tj
24.1095 -12.0547 TD -0 Tc 0.5339 Tw (Table 18\2261 summarizes the ) Tj
ET
BT
265.08 492.36 TD
/F5 9 Tf
0 Tc 0 Tw (Httpd) Tj
ET
BT
0.9955 0 0 0.9955 291.96 492.36 Tm
/F4 10 Tf
0.0143 Tc 0.5797 Tw ( functions used when returning pages to) Tj
-183.8349 -12.0547 TD 0.0098 Tc -0.0186 Tw (the client.) Tj
24.1095 -187.9335 TD 0.0079 Tc -0.2577 Tw (Table 18\2262 summarizes a few useful procedures provided by the ) Tj
ET
BT
428.4 293.28 TD
/F5 9 Tf
0 Tc 0 Tw (Url) Tj
ET
BT
0.9955 0 0 0.9955 444.6 293.28 Tm
/F4 10 Tf
0.0148 Tc -0.2647 Tw ( module) Tj
-337.1713 -12.0547 TD 0.0438 Tc 0 Tw (\() Tj
ET
BT
112.32 281.28 TD
/F5 9 Tf
-0.0171 Tc (url.tcl) Tj
ET
BT
0.9955 0 0 0.9955 150.12 281.28 Tm
/F4 10 Tf
0.0176 Tc 0.2147 Tw (\). The ) Tj
ET
BT
179.88 281.28 TD
/F5 9 Tf
-0.008 Tc 0 Tw (Url_DecodeQuery) Tj
ET
BT
0.9955 0 0 0.9955 260.76 281.28 Tm
/F4 10 Tf
0.0146 Tc 0.1641 Tw ( is used to decode query data into a Tcl-friendly) Tj
-152.4926 -12.0547 TD 0.0207 Tc 2.3815 Tw (list. The ) Tj
ET
BT
154.68 269.28 TD
/F5 9 Tf
-0.012 Tc 0 Tw (Url_Encode) Tj
ET
BT
0.9955 0 0 0.9955 208.68 269.28 Tm
/F4 10 Tf
0.0183 Tc 2.399 Tw ( procedure is useful when encoding values directly into) Tj
-100.175 -12.0547 TD 0.012 Tc 0.0034 Tw (URLs. URL encoding is discussed in more detail on page 247.) Tj
ET
BT
114.96 457.68 TD
/F1 7.92 Tf
-0.0372 Tc 0.0554 Tw (Table 18\226) Tj
4.1165 Tc -4.1582 Tw (1 ) Tj
48.72 0 TD /F5 9 Tf
0 Tc 0 Tw (Httpd) Tj
27 0 TD /F0 7.92 Tf
0.0361 Tc -0.0178 Tw ( support procedures.) Tj
-71.64 -16.68 TD /F5 9 Tf
0 Tc 0 Tw (Httpd_Error ) Tj
64.68 0 TD /F9 9 Tf
-0.03 Tc (sock) Tj
21.6 0 TD /F5 9 Tf
0 Tc ( ) Tj
5.4 0 TD /F9 9 Tf
(code) Tj
52.32 0 TD /F10 9 Tf
-0.0063 Tc -0.0037 Tw (Returns a simple error page to the client. The ) Tj
164.76 0 TD /F9 9 Tf
0 Tc 0 Tw (code) Tj
21.48 0 TD /F10 9 Tf
-0.013 Tc 0.043 Tw ( is a ) Tj
-186.24 -9.96 TD -0.0117 Tc 0.0217 Tw (numeric error code like 404 or 500.) Tj
-144 -17.04 TD /F5 9 Tf
-0.0075 Tc 0.0075 Tw (Httpd_ReturnData ) Tj
91.68 0 TD /F9 9 Tf
0 Tc 0 Tw (sock) Tj
21.48 0 TD /F5 9 Tf
( ) Tj
-101.16 -9.96 TD /F9 9 Tf
(type) Tj
21.48 0 TD /F5 9 Tf
( ) Tj
5.4 0 TD /F9 9 Tf
(data) Tj
105.12 9.96 TD /F10 9 Tf
-0 Tc -0.0596 Tw (Returns a page with Content-) Tj
-0.1538 Tc 0.1838 Tw (Type ) Tj
125.4 0 TD /F9 9 Tf
0 Tc 0 Tw (type) Tj
21.6 0 TD /F10 9 Tf
-0.0012 Tc -0.0488 Tw ( and content ) Tj
-147 -9.96 TD /F9 9 Tf
-0.03 Tc 0 Tw (data) Tj
21.48 0 TD /F10 9 Tf
0.03 Tc (.) Tj
-165.48 -17.04 TD /F5 9 Tf
-0.0075 Tc 0.0075 Tw (Httpd_ReturnFile ) Tj
91.68 0 TD /F9 9 Tf
0 Tc 0 Tw (sock) Tj
21.48 0 TD /F5 9 Tf
( ) Tj
-101.16 -9.96 TD /F9 9 Tf
(type) Tj
21.48 0 TD /F5 9 Tf
( ) Tj
5.4 0 TD /F9 9 Tf
(file) Tj
105.12 9.96 TD /F10 9 Tf
-0.0094 Tc -0.0206 Tw (Returns a ) Tj
36.36 0 TD /F9 9 Tf
0 Tc 0 Tw (file) Tj
21.6 0 TD /F10 9 Tf
-0.0085 Tc 0.0385 Tw ( with Content-) Tj
-0.1838 Tc 0.2138 Tw (Type ) Tj
72 0 TD /F9 9 Tf
0 Tc 0 Tw (type) Tj
21.6 0 TD /F10 9 Tf
0.03 Tc (.) Tj
-295.56 -27 TD /F5 9 Tf
0 Tc (Httpd_Redirect ) Tj
80.88 0 TD /F9 9 Tf
-0.02 Tc (newurl) Tj
32.28 0 TD /F5 9 Tf
0 Tc ( ) Tj
-101.16 -9.96 TD /F9 9 Tf
(sock) Tj
132 9.96 TD /F10 9 Tf
-0.0038 Tc -0.0062 Tw (Generates a 302 error return with a Location of ) Tj
171.96 0 TD /F9 9 Tf
-0.02 Tc 0 Tw (newurl) Tj
32.28 0 TD /F10 9 Tf
0.03 Tc (.) Tj
-348.24 -27 TD /F5 9 Tf
0 Tc (Httpd_SelfUrl ) Tj
75.48 0 TD /F9 9 Tf
-0.04 Tc (url) Tj
68.52 0 TD /F10 9 Tf
-0.0223 Tc 0.0523 Tw (Expands ) Tj
33.12 0 TD /F9 9 Tf
0 Tc 0 Tw (url) Tj
16.2 0 TD /F10 9 Tf
-0.0103 Tc 0.0163 Tw ( to include the proper ) Tj
79.2 0 TD /F5 9 Tf
0 Tc 0 Tw (http://) Tj
-128.52 -9.96 TD /F9 9 Tf
-0.0109 Tc (server:port) Tj
59.28 0 TD /F10 9 Tf
-0.0025 Tc -0.0075 Tw ( prefix to reference the current serve) Tj
-0.597 Tc 0 Tw (r) Tj
0.03 Tc (.) Tj
-207.36 -88.32 TD /F1 7.92 Tf
-0.0372 Tc 0.0554 Tw (Table 18\226) Tj
4.1165 Tc -4.1582 Tw (2 ) Tj
48.72 0 TD /F5 9 Tf
0 Tc 0 Tw (Url) Tj
16.2 0 TD /F0 7.92 Tf
0.0361 Tc -0.0178 Tw ( support procedures.) Tj
-60.84 -16.68 TD /F5 9 Tf
0 Tc -0.12 Tw (Url_DecodeQuery ) Tj
86.28 0 TD /F9 9 Tf
0 Tw (query) Tj
57.72 0 TD /F10 9 Tf
-0.0229 Tc 0.0529 Tw (Decodes a ) Tj
39.36 0 TD /F5 9 Tf
-0.008 Tc 0 Tw (www-url-encoded) Tj
80.88 0 TD /F10 9 Tf
-0.0061 Tc 0.0121 Tw ( query string and return ) Tj
-120.24 -10.08 TD -0.0107 Tc 0 Tw (a name, value list.) Tj
-144 -16.92 TD /F5 9 Tf
0 Tc 0 Tw (Url_Encode ) Tj
59.28 0 TD /F9 9 Tf
-0.024 Tc (value) Tj
84.72 0 TD /F10 9 Tf
-0.0056 Tc -0.0844 Tw (Returns ) Tj
30.12 0 TD /F9 9 Tf
0 Tc 0 Tw (value) Tj
27 0 TD /F10 9 Tf
-0.0056 Tc 0.0116 Tw ( encoded according to the www-url-) Tj
-57.12 -10.08 TD -0.0131 Tc 0.0431 Tw (encoded standard.) Tj
-144 -16.92 TD /F5 9 Tf
-0.0075 Tc 0.0075 Tw (Url_PrefxInstall ) Tj
91.68 0 TD /F9 9 Tf
0 Tc 0 Tw (prefix) Tj
32.28 0 TD /F5 9 Tf
( ) Tj
-111.96 -10.08 TD /F9 9 Tf
(callback) Tj
132 10.08 TD /F10 9 Tf
-0.0153 Tc 0.0453 Tw (Registers ) Tj
35.64 0 TD /F9 9 Tf
0 Tc 0 Tw (callback) Tj
43.2 0 TD /F10 9 Tf
-0.0008 Tc -0.0292 Tw ( as the handler for all URLs that ) Tj
-78.84 -10.08 TD -0.0133 Tc 0.0433 Tw (begin with ) Tj
40.44 0 TD /F9 9 Tf
-0.02 Tc 0 Tw (prefix) Tj
32.28 0 TD /F10 9 Tf
-0.012 Tc 0.042 Tw (. The callback is invoked with two ) Tj
-72.72 -9.96 TD -0.0198 Tc 0.0498 Tw (additional arguments: ) Tj
80.16 0 TD /F9 9 Tf
0 Tc 0 Tw (sock) Tj
21.6 0 TD /F10 9 Tf
-0.0098 Tc 0.0227 Tw (, the handle to the client, and ) Tj
-101.76 -9.96 TD /F9 9 Tf
-0.02 Tc 0 Tw (suffix) Tj
32.28 0 TD /F10 9 Tf
-0.0089 Tc 0.0217 Tw (, the part of the URL after ) Tj
95.88 0 TD /F9 9 Tf
-0.02 Tc 0 Tw (prefix) Tj
32.4 0 TD /F10 9 Tf
0.03 Tc (.) Tj
ET
114.96 450.72 360 0.48 re f
114.96 315.72 360 0.48 re f
114.96 227.76 360 0.48 re f
114.96 126.72 360 0.48 re f
endstream
endobj
563 0 obj
10858
endobj
561 0 obj
<<
/Type /Page
/Parent 554 0 R
/Resources <<
/Font 564 0 R
/ProcSet 2 0 R
>>
/Contents 562 0 R
>>
endobj
564 0 obj
<<
/F0 6 0 R
/F1 7 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
/F9 32 0 R
/F10 119 0 R
>>
endobj
566 0 obj
<<
/Length 567 0 R
>>
stream
BT
114 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0365 Tc -0.0782 Tw (260 ) Tj
256.44 0 TD 0.0368 Tc -0.0186 Tw (TclHttpd Web Server) Tj
74.28 0 TD 0.0261 Tc 0.0282 Tw ( Chap. 18) Tj
ET
113.52 701.88 0.48 0.96 re f
486 701.88 0.48 0.96 re f
114 701.88 372 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
554.76 746.76 0.24 0.48 re f
584.04 746.76 0.24 0.48 re f
555 746.76 29.04 0.48 re f
585 80.76 0.24 0.48 re f
553.8 80.76 0.24 0.48 re f
554.04 80.76 30.96 0.48 re f
548.76 69.96 0.48 0.24 re f
548.76 33.72 0.48 0.24 re f
548.76 33.96 0.48 36 re f
BT
0.9955 0 0 0.9955 138 670.32 Tm
/F4 10 Tf
0.0176 Tc 3.3489 Tw (The ) Tj
ET
BT
161.88 670.32 TD
/F5 9 Tf
0 Tc 0 Tw (Doc) Tj
ET
BT
0.9955 0 0 0.9955 178.08 670.32 Tm
/F4 10 Tf
0.0202 Tc 3.3119 Tw ( module provides procedures for configuration and generating) Tj
-64.3724 -12.0547 TD 0.0071 Tc 0.0083 Tw (responses, which are summarized in ) Tj
-0.0034 Tc 0.0248 Tw (Tables 18\2263 and 18\2264, respectivel) Tj
-1.2738 Tc 0 Tw (y) Tj
-0.0087 Tc 0.1206 Tw (. ) Tj
24.1095 -483.1543 TD 0.0176 Tc 0.3352 Tw (The ) Tj
ET
BT
158.88 177.36 TD
/F5 9 Tf
-0.04 Tc 0 Tw (Doc) Tj
ET
BT
0.9955 0 0 0.9955 174.96 177.36 Tm
/F4 10 Tf
0.0197 Tc 0.285 Tw ( module also provides procedures for cookies and redirects that are) Tj
-61.2381 -12.0547 TD 0.0102 Tc 0.0112 Tw (useful in document templates. These are described in ) Tj
-0.0474 Tc 0.1595 Tw (Table 18\2265.) Tj
ET
BT
120 631.68 TD
/F1 7.92 Tf
-0.0372 Tc 0.0554 Tw (Table 18\226) Tj
3.9965 Tc -3.9182 Tw (3 ) Tj
48.72 0 TD /F5 9 Tf
0 Tc 0 Tw (Doc) Tj
16.2 0 TD /F0 7.92 Tf
0.0384 Tc -0.0802 Tw ( procedures for configuration.) Tj
-60.96 -16.68 TD /F5 9 Tf
0 Tc 0 Tw (Doc_Root ?) Tj
54 0 TD /F9 9 Tf
-0.0133 Tc (directory) Tj
48.48 0 TD /F5 9 Tf
0 Tc (?) Tj
41.52 0 TD /F10 9 Tf
-0.0131 Tc 0.0431 Tw (Sets or queries the ) Tj
68.4 0 TD /F9 9 Tf
0 Tc 0 Tw (directory) Tj
48.6 0 TD /F10 9 Tf
0 Tc -0.0426 Tw ( that corresponds to the ) Tj
-117 -9.96 TD -0.0039 Tc 0.0039 Tw (root of the URL hierarch) Tj
-0.66 Tc 0 Tw (y) Tj
0.03 Tc (.) Tj
-144 -17.04 TD /F5 9 Tf
-0.0109 Tc 0.0109 Tw (Doc_AddRoot ) Tj
64.8 0 TD /F9 9 Tf
0 Tc 0 Tw (virtual ) Tj
-52.8 -9.96 TD (directory) Tj
48.6 0 TD /F5 9 Tf
( ) Tj
83.4 9.96 TD /F10 9 Tf
-0.0044 Tc 0.0044 Tw (Maps the file system ) Tj
76.92 0 TD /F9 9 Tf
-0.0133 Tc 0 Tw (directory) Tj
48.6 0 TD /F10 9 Tf
-0.0067 Tc 0.0127 Tw ( into the URL subtree ) Tj
-125.52 -9.96 TD -0.0018 Tc -0.0282 Tw (starting at ) Tj
38.04 0 TD /F9 9 Tf
0 Tc 0 Tw (virtual) Tj
37.68 0 TD /F10 9 Tf
0.03 Tc (.) Tj
-219.72 -17.04 TD /F5 9 Tf
-0.0092 Tc 0.0092 Tw (Doc_ErrorPage ) Tj
75.48 0 TD /F9 9 Tf
0 Tc 0 Tw (file) Tj
68.52 0 TD /F10 9 Tf
0.009 Tc -0.099 Tw (Specifies a ) Tj
41.52 0 TD /F9 9 Tf
0 Tc 0 Tw (file) Tj
21.48 0 TD /F10 9 Tf
-0.0067 Tc 0.0101 Tw ( relative to the document root used as a ) Tj
-63 -9.96 TD -0.0066 Tc 0.0099 Tw (simple template for error messages. This is processed by ) Tj
0 -10.08 TD /F5 9 Tf
-0.0086 Tc 0 Tw (DocSubstSystem) Tj
75.48 0 TD /F10 9 Tf
-0.0065 Tc 0.0365 Tw ( file in ) Tj
25.8 0 TD /F5 9 Tf
-0.0171 Tc 0 Tw (doc.tcl) Tj
37.68 0 TD /F10 9 Tf
0.03 Tc (.) Tj
-282.96 -16.92 TD /F5 9 Tf
-0.0067 Tc 0.0067 Tw (Doc_CheckTemplates ) Tj
102.48 0 TD /F9 9 Tf
0 Tc 0 Tw (how) Tj
41.52 0 TD /F10 9 Tf
0.003 Tc -0.093 Tw (If ) Tj
8.16 0 TD /F9 9 Tf
0 Tc 0 Tw (how) Tj
16.2 0 TD /F10 9 Tf
0.0086 Tc -0.0986 Tw ( is 1, then ) Tj
36.96 0 TD /F5 9 Tf
0 Tc 0 Tw (.html) Tj
27 0 TD /F10 9 Tf
0 Tc -0.0902 Tw ( files are compared against corre-) Tj
-88.32 -10.08 TD -0 Tc 0.0304 Tw (sponding ) Tj
35.28 0 TD /F5 9 Tf
-0.03 Tc 0 Tw (.tml) Tj
21.48 0 TD /F10 9 Tf
-0.0087 Tc 0.0387 Tw ( files and regenerated if necessar) Tj
-0.66 Tc 0 Tw (y) Tj
0.03 Tc (.) Tj
-200.76 -16.92 TD /F5 9 Tf
-0.0092 Tc 0.0092 Tw (Doc_IndexFile ) Tj
75.48 0 TD /F9 9 Tf
0 Tc 0 Tw (pattern) Tj
68.52 0 TD /F10 9 Tf
-0.0125 Tc 0.0425 Tw (Registers a file name ) Tj
77.88 0 TD /F9 9 Tf
0 Tc 0 Tw (pattern) Tj
37.8 0 TD /F10 9 Tf
-0.0046 Tc -0.0054 Tw ( that will be searched for ) Tj
-115.68 -10.08 TD -0.0008 Tc -0.0172 Tw (the default index file in directories.) Tj
-144 -16.92 TD /F5 9 Tf
-0.0075 Tc 0.0075 Tw (Doc_NotFoundPage ) Tj
91.68 0 TD /F9 9 Tf
0 Tc 0 Tw (file) Tj
52.32 0 TD /F10 9 Tf
0.009 Tc -0.099 Tw (Specifies a ) Tj
41.52 0 TD /F9 9 Tf
0 Tc 0 Tw (file) Tj
21.48 0 TD /F10 9 Tf
-0.0067 Tc 0.0101 Tw ( relative to the document root used as a ) Tj
-63 -10.08 TD -0.0039 Tc -0.0195 Tw (simple template for page not found messages. This is pro-) Tj
0 -9.96 TD 0.0038 Tc -0.0338 Tw (cessed by ) Tj
36.96 0 TD /F5 9 Tf
-0.0086 Tc 0 Tw (DocSubstSystem) Tj
75.48 0 TD /F10 9 Tf
0.0135 Tc -0.0635 Tw ( file in ) Tj
25.8 0 TD /F5 9 Tf
0 Tc 0 Tw (doc.tcl) Tj
37.68 0 TD /F10 9 Tf
0.03 Tc (.) Tj
-319.92 -17.04 TD /F5 9 Tf
-0.0086 Tc 0.0086 Tw (Doc_PublicHtml ) Tj
80.88 0 TD /F9 9 Tf
0 Tc 0 Tw (dirname) Tj
63.12 0 TD /F10 9 Tf
-0.0077 Tc 0.0227 Tw (Defines the directory used for each users home director) Tj
-0.315 Tc 0.345 Tw (y. ) Tj
0 -9.96 TD 0.001 Tc -0.031 Tw (When a URL like ) Tj
65.88 0 TD /F5 9 Tf
0 Tc 0 Tw (~) Tj
5.4 0 TD /F9 9 Tf
(user) Tj
21.6 0 TD /F10 9 Tf
0.0066 Tc -0.0366 Tw ( is specified, the ) Tj
60.72 0 TD /F9 9 Tf
-0.0171 Tc 0 Tw (dirname) Tj
37.68 0 TD /F10 9 Tf
0 Tc 0.03 Tw ( ) Tj
-191.28 -9.96 TD 0.0008 Tc -0.0428 Tw (under their home directory is accessed.) Tj
-144 -17.04 TD /F5 9 Tf
-0.0063 Tc 0.0063 Tw (Doc_TemplateLibrary ) Tj
12 -9.96 TD /F9 9 Tf
0 Tc 0 Tw (directory) Tj
132 9.96 TD /F10 9 Tf
-0.0098 Tc 0.0398 Tw (Adds ) Tj
21.24 0 TD /F9 9 Tf
-0.0133 Tc 0 Tw (directory) Tj
48.6 0 TD /F10 9 Tf
0 Tc -0.01 Tw ( to the ) Tj
24.72 0 TD /F5 9 Tf
0 Tw (auto_path) Tj
48.48 0 TD /F10 9 Tf
-0.0117 Tc 0.0117 Tw ( so the source ) Tj
-143.04 -9.96 TD -0.02 Tc 0.0157 Tw (files in it are available to the server.) Tj
-144 -17.04 TD /F5 9 Tf
-0.0067 Tc 0.0067 Tw (Doc_TemplateInterp ) Tj
102.48 0 TD /F9 9 Tf
0 Tc 0 Tw (interp) Tj
41.52 0 TD /F10 9 Tf
-0.006 Tc 0.006 Tw (Specifies an alternate interpreter in which to process doc-) Tj
0 -9.96 TD -0.0081 Tc 0.0381 Tw (ument templates \(i.e., ) Tj
79.92 0 TD /F5 9 Tf
0 Tc 0 Tw (.tml ) Tj
27 0 TD /F10 9 Tf
-0.015 Tc (files.\)) Tj
-250.92 -17.04 TD /F5 9 Tf
-0.0086 Tc 0.0086 Tw (Doc_Webmaster ?) Tj
80.88 0 TD /F9 9 Tf
0 Tc 0 Tw (email) Tj
27 0 TD /F5 9 Tf
(?) Tj
36.12 0 TD /F10 9 Tf
-0.0131 Tc 0.0431 Tw (Sets or queries the ) Tj
68.4 0 TD /F9 9 Tf
0 Tc 0 Tw (email) Tj
27 0 TD /F10 9 Tf
-0.022 Tc 0.052 Tw ( for the ) Tj
-0.1236 Tc 0 Tw (Webmaster.) Tj
-243.36 -30.36 TD /F1 7.92 Tf
-0.0372 Tc 0.0554 Tw (Table 18\226) Tj
3.9965 Tc -3.9182 Tw (4 ) Tj
48.72 0 TD /F5 9 Tf
0 Tc 0 Tw (Doc) Tj
16.2 0 TD /F0 7.92 Tf
0.0407 Tc -0.0525 Tw ( procedures for generating responses.) Tj
-60.96 -16.68 TD /F5 9 Tf
0 Tc 0 Tw (Doc_Error ) Tj
54 0 TD /F9 9 Tf
-0.0092 Tc 0.0092 Tw (sock errorInfo) Tj
90 0 TD /F10 9 Tf
0.0048 Tc -0.1668 Tw (Generates a 500 response on ) Tj
104.52 0 TD /F9 9 Tf
-0.03 Tc 0 Tw (sock) Tj
21.48 0 TD /F10 9 Tf
-0.0048 Tc -0.1092 Tw ( based on the template ) Tj
-126 -9.96 TD -0.0092 Tc 0.0392 Tw (registered with ) Tj
55.92 0 TD /F5 9 Tf
-0.0092 Tc 0 Tw (Doc_ErrorPage) Tj
70.08 0 TD /F10 9 Tf
0.03 Tc (. ) Tj
4.56 0 TD /F9 9 Tf
-0.0133 Tc (errorInfo) Tj
48.48 0 TD /F10 9 Tf
-0.013 Tc 0.043 Tw ( is a ) Tj
-179.04 -9.96 TD -0.0123 Tc 0.0423 Tw (copy of the ) Tj
-0.0487 Tc 0.0547 Tw (Tcl error trace after the error.) Tj
-144 -17.04 TD /F5 9 Tf
-0.01 Tc 0.01 Tw (Doc_NotFound ) Tj
70.08 0 TD /F9 9 Tf
0 Tc 0 Tw (sock) Tj
73.92 0 TD /F10 9 Tf
-0.0056 Tc -0.0124 Tw (Generates a 404 response on ) Tj
105 0 TD /F9 9 Tf
-0.03 Tc 0 Tw (sock) Tj
21.6 0 TD /F10 9 Tf
0.0035 Tc -0.0455 Tw ( by using the template ) Tj
-126.6 -9.96 TD -0.0092 Tc 0.0392 Tw (registered with ) Tj
55.92 0 TD /F5 9 Tf
-0.0075 Tc 0 Tw (Doc_NotFoundPage) Tj
86.28 0 TD /F10 9 Tf
0.03 Tc (.) Tj
-286.2 -17.04 TD /F5 9 Tf
0 Tc (Doc_Subst ) Tj
54 0 TD /F9 9 Tf
-0.03 Tc (sock) Tj
21.48 0 TD /F5 9 Tf
0 Tc ( ) Tj
5.4 0 TD /F9 9 Tf
(file) Tj
21.6 0 TD /F5 9 Tf
( ) Tj
-90.48 -9.96 TD (?) Tj
5.4 0 TD /F9 9 Tf
(interp) Tj
32.4 0 TD /F5 9 Tf
(?) Tj
94.2 9.96 TD /F10 9 Tf
0.01 Tc -0.1 Tw (Performs a ) Tj
41.52 0 TD /F5 9 Tf
0 Tc 0 Tw (subst) Tj
26.88 0 TD /F10 9 Tf
-0.0047 Tc 0.0047 Tw ( on the file and return the resulting ) Tj
-68.4 -9.96 TD 0.008 Tc -0.038 Tw (page on ) Tj
30.48 0 TD /F9 9 Tf
0 Tc 0 Tw (sock) Tj
21.6 0 TD /F10 9 Tf
-0.09 Tc 0.12 Tw (. ) Tj
4.44 0 TD /F9 9 Tf
0 Tc 0 Tw (interp) Tj
32.4 0 TD /F10 9 Tf
0.0033 Tc -0.0633 Tw ( specifies an alternate ) Tj
-0.0723 Tc 0.1023 Tw (Tcl inter-) Tj
-88.92 -10.08 TD -0.0797 Tc 0 Tw (preter.) Tj
ET
120 624.72 360 0.48 re f
120 334.8 360 0.48 re f
120 304.8 360 0.48 re f
120 203.76 360 0.48 re f
endstream
endobj
567 0 obj
9408
endobj
565 0 obj
<<
/Type /Page
/Parent 554 0 R
/Resources <<
/Font 568 0 R
/ProcSet 2 0 R
>>
/Contents 566 0 R
>>
endobj
568 0 obj
<<
/F0 6 0 R
/F1 7 0 R
/F4 14 0 R
/F5 16 0 R
/F9 32 0 R
/F10 119 0 R
>>
endobj
570 0 obj
<<
/Length 571 0 R
>>
stream
BT
108.96 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0389 Tc 0.0394 Tw (Programming Reference) Tj
356.76 0 TD 0.0765 Tc 0 Tw (261) Tj
ET
108.48 701.88 0.48 0.96 re f
480.72 701.88 0.48 0.96 re f
108.96 701.88 371.76 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
553.8 746.76 0.24 0.48 re f
585 746.76 0.24 0.48 re f
554.04 746.76 30.96 0.48 re f
585 80.76 0.24 0.48 re f
554.76 80.76 0.24 0.48 re f
555 80.76 30 0.48 re f
547.8 75 0.48 0.24 re f
547.8 34.8 0.48 0.24 re f
547.8 35.04 0.48 39.96 re f
510 504 54 108 re f
510 611.76 54.24 0.48 re f
563.76 503.76 0.48 108.24 re f
509.76 503.76 54.24 0.48 re f
509.76 504 0.48 108.24 re f
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 605.52 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 602.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 598.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (.) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 595.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 592.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (A) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 583.2 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 575.28 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (v) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 568.56 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (a) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 560.64 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (n) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 553.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 545.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (e) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 538.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 530.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 526.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (T) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 521.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 514.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (l) Tj
ET
Q
BT
0.9955 0 0 0.9955 132.96 495.36 Tm
/F4 10 Tf
-0.0047 Tc 0.5987 Tw (Table 18\2266 describes the ) Tj
ET
BT
251.64 495.36 TD
/F5 9 Tf
-0.03 Tc 0 Tw (form) Tj
ET
BT
0.9955 0 0 0.9955 273.24 495.36 Tm
/F4 10 Tf
0.0117 Tc 0.5823 Tw ( module that is useful for self-posting forms,) Tj
-165.0295 -12.0547 TD 0.0144 Tc 0.0009 Tw (which are discussed on page 257.) Tj
24.1095 -233.1388 TD -0 Tc 0.052 Tw (Table 18\2267 shows the initial elements of the ) Tj
ET
BT
339.24 251.28 TD
/F5 9 Tf
0 Tc 0 Tw (page) Tj
ET
BT
0.9955 0 0 0.9955 360.84 251.28 Tm
/F4 10 Tf
0.0048 Tc 0.0589 Tw ( array that is defined dur-) Tj
-253.0292 -12.0547 TD 0.0167 Tc -0.0255 Tw (ing the processing of a template.) Tj
ET
BT
114.96 671.64 TD
/F1 7.92 Tf
-0.0372 Tc 0.0554 Tw (Table 18\226) Tj
4.1165 Tc -4.1582 Tw (5 ) Tj
48.72 0 TD /F5 9 Tf
0 Tc 0 Tw (Doc) Tj
16.2 0 TD /F0 7.92 Tf
0.0363 Tc -0.0061 Tw ( procedures that support template processing.) Tj
-60.84 -16.68 TD /F5 9 Tf
0 Tc 0 Tw (Doc_Coookie ) Tj
64.68 0 TD /F9 9 Tf
-0.03 Tc (name) Tj
79.32 0 TD /F10 9 Tf
0 Tc -0.0506 Tw (Returns the cookie ) Tj
69.6 0 TD /F9 9 Tf
0 Tc 0 Tw (name) Tj
21.6 0 TD /F10 9 Tf
-0.01 Tc 0.0229 Tw ( passed to the server for this ) Tj
-91.2 -9.96 TD -0.0017 Tc -0.0217 Tw (request, or the empty string if it is not present.) Tj
-144 -17.04 TD /F5 9 Tf
0 Tc 0 Tw (Doc_Dynamic) Tj
144 0 TD /F10 9 Tf
-0.0223 Tc -0.1113 Tw (Turns off caching of the HTML result. Meant to be called ) Tj
0 -9.96 TD -0.0046 Tc -0.0254 Tw (from inside a page template.) Tj
-144 -17.04 TD /F5 9 Tf
-0.0075 Tc 0.0075 Tw (Doc_IsLinkToSelf ) Tj
91.68 0 TD /F9 9 Tf
0 Tc 0 Tw (url) Tj
52.32 0 TD /F10 9 Tf
-0.0028 Tc -0.0272 Tw (Returns 1 if the ) Tj
57.84 0 TD /F9 9 Tf
0 Tc 0 Tw (url) Tj
16.2 0 TD /F10 9 Tf
-0.0039 Tc -0 Tw ( is a link to the current page.) Tj
-218.04 -16.92 TD /F5 9 Tf
0 Tc 0 Tw (Doc_Redirect ) Tj
70.08 0 TD /F9 9 Tf
-0.02 Tc (newurl) Tj
73.92 0 TD /F10 9 Tf
-0.0055 Tc -0.0045 Tw (Raises a special error that aborts template processing and ) Tj
0 -10.08 TD -0.0127 Tc 0.0427 Tw (triggers a page redirect to ) Tj
94.08 0 TD /F9 9 Tf
-0.02 Tc 0 Tw (newurl) Tj
32.28 0 TD /F10 9 Tf
0.03 Tc (.) Tj
-270.36 -16.92 TD /F5 9 Tf
-0.0067 Tc 0.0067 Tw (Doc_SetCookie -name ) Tj
107.76 0 TD /F9 9 Tf
0 Tc 0 Tw (name) Tj
21.6 0 TD /F5 9 Tf
( ) Tj
-117.36 -10.08 TD -1.32 Tw (-value ) Tj
36.36 0 TD /F9 9 Tf
-0.024 Tc 0 Tw (value) Tj
27 0 TD /F5 9 Tf
0 Tc -1.38 Tw ( -path ) Tj
35.04 0 TD /F9 9 Tf
0 Tw (path) Tj
21.48 0 TD /F5 9 Tf
( ) Tj
-119.88 -9.96 TD -1.8 Tw (-domain ) Tj
41.28 0 TD /F9 9 Tf
0 Tw (domain) Tj
32.4 0 TD /F5 9 Tf
-1.86 Tw ( -expires ) Tj
-73.68 -9.96 TD /F9 9 Tf
0 Tw (date) Tj
132 30 TD /F10 9 Tf
-0.0117 Tc -0.0183 Tw (Sets cookie ) Tj
43.44 0 TD /F9 9 Tf
0 Tc 0 Tw (name) Tj
21.48 0 TD /F10 9 Tf
-0.0065 Tc 0.0065 Tw ( with the given ) Tj
55.92 0 TD /F9 9 Tf
0 Tc 0 Tw (value) Tj
27 0 TD /F10 9 Tf
-0.012 Tc 0.012 Tw ( that will be ) Tj
-147.84 -10.08 TD -0.0045 Tc -0.0015 Tw (returned to the client as part of the response. The ) Tj
177.96 0 TD /F9 9 Tf
-0.03 Tc 0 Tw (path) Tj
21.48 0 TD /F10 9 Tf
0 Tc 0.03 Tw ( ) Tj
-199.44 -9.96 TD -0.012 Tc -0.078 Tw (and ) Tj
15.24 0 TD /F9 9 Tf
0 Tc 0 Tw (domain) Tj
32.28 0 TD /F10 9 Tf
-0.0052 Tc 0.0052 Tw ( restrict the scope of the cooke. The ) Tj
130.56 0 TD /F9 9 Tf
0 Tc 0 Tw (date) Tj
21.6 0 TD /F10 9 Tf
0.03 Tw ( ) Tj
-199.68 -9.96 TD -0.0064 Tc -0.0036 Tw (sets an expiration date.) Tj
-148.08 -70.32 TD /F1 7.92 Tf
-0.0372 Tc 0.0554 Tw (Table 18\226) Tj
4.1165 Tc -4.1582 Tw (6 ) Tj
48.72 0 TD /F0 7.92 Tf
0.0513 Tc 0.027 Tw (The ) Tj
16.08 0 TD /F5 9 Tf
-0.03 Tc 0 Tw (form) Tj
21.6 0 TD /F0 7.92 Tf
0.0326 Tc 0.0457 Tw ( package.) Tj
-82.32 -16.68 TD /F5 9 Tf
0 Tc 0 Tw (form::data ) Tj
59.28 0 TD /F9 9 Tf
(name) Tj
60.72 0 TD /F10 9 Tf
0.0008 Tc -0.0223 Tw (Returns the value of the form value ) Tj
129.48 0 TD /F9 9 Tf
0 Tc 0 Tw (name) Tj
21.6 0 TD /F10 9 Tf
0 Tc -0.0302 Tw (, or the empty string.) Tj
-271.08 -17.04 TD /F5 9 Tf
0 Tc 0 Tw (form::empty ) Tj
64.68 0 TD /F9 9 Tf
-0.03 Tc (name) Tj
55.32 0 TD /F10 9 Tf
0.0079 Tc -0.0579 Tw (Returns 1 if the form value ) Tj
99.36 0 TD /F9 9 Tf
0 Tc 0 Tw (name) Tj
21.48 0 TD /F10 9 Tf
-0.0067 Tc 0.0127 Tw ( is missing or zero length.) Tj
-240.84 -17.04 TD /F5 9 Tf
0 Tc 0 Tw (form::value ) Tj
64.68 0 TD /F9 9 Tf
-0.03 Tc (name) Tj
55.32 0 TD /F10 9 Tf
0.0116 Tc -0.1016 Tw (Returns ) Tj
30.12 0 TD /F5 9 Tf
0 Tc 0 Tw (name=") Tj
32.4 0 TD /F9 9 Tf
(name) Tj
21.6 0 TD /F5 9 Tf
-0.12 Tw (" value=") Tj
48.48 0 TD /F9 9 Tf
0 Tw (value) Tj
27 0 TD /F5 9 Tf
(") Tj
5.4 0 TD /F10 9 Tf
-0.0195 Tc 0.0495 Tw (, where ) Tj
28.68 0 TD /F9 9 Tf
0 Tc 0 Tw (value) Tj
27 0 TD /F10 9 Tf
0.03 Tw ( ) Tj
-220.68 -9.96 TD -0.0054 Tc 0.0154 Tw (comes from the query data, if an) Tj
-0.66 Tc 0 Tw (y) Tj
0.03 Tc (.) Tj
-120 -17.04 TD /F5 9 Tf
-0.0075 Tc 0.0075 Tw (form::checkvalue ) Tj
12 -9.96 TD /F9 9 Tf
0 Tc 0 Tw (name) Tj
21.48 0 TD /F5 9 Tf
( ) Tj
5.4 0 TD /F9 9 Tf
(value) Tj
81.12 9.96 TD /F10 9 Tf
0.0116 Tc -0.1016 Tw (Returns ) Tj
30.12 0 TD /F5 9 Tf
0 Tc 0 Tw (name=") Tj
32.4 0 TD /F9 9 Tf
(name) Tj
21.6 0 TD /F5 9 Tf
-0.12 Tw (" value=") Tj
48.48 0 TD /F9 9 Tf
0 Tw (value) Tj
27 0 TD /F5 9 Tf
-0.015 Tc 0.015 Tw (" CHECKED) Tj
48.48 0 TD /F10 9 Tf
-0.023 Tc 0.053 Tw (, if ) Tj
-208.08 -9.96 TD /F9 9 Tf
0 Tc 0 Tw (value) Tj
26.88 0 TD /F10 9 Tf
-0.0129 Tc 0.0429 Tw ( is present in the query data for ) Tj
113.88 0 TD /F9 9 Tf
-0.03 Tc 0 Tw (name) Tj
21.6 0 TD /F10 9 Tf
-0.0058 Tc 0.0358 Tw (. Otherwise, it just ) Tj
-162.36 -9.96 TD -0.0047 Tc 0.0347 Tw (returns ) Tj
27.12 0 TD /F5 9 Tf
0 Tc 0 Tw (name=") Tj
32.4 0 TD /F9 9 Tf
(name) Tj
21.6 0 TD /F5 9 Tf
-0.12 Tw (" value=") Tj
48.48 0 TD /F9 9 Tf
0 Tw (value) Tj
27 0 TD /F5 9 Tf
(") Tj
5.4 0 TD /F10 9 Tf
0.03 Tc (.) Tj
-282 -17.04 TD /F5 9 Tf
-0.0075 Tc 0.0075 Tw (form::radiovalue ) Tj
12 -9.96 TD /F9 9 Tf
0 Tc 0 Tw (name) Tj
21.48 0 TD /F5 9 Tf
( ) Tj
5.4 0 TD /F9 9 Tf
(value) Tj
81.12 9.96 TD /F10 9 Tf
0.0116 Tc -0.2216 Tw (Returns ) Tj
30 0 TD /F5 9 Tf
-0.02 Tc 0 Tw (name=") Tj
32.28 0 TD /F9 9 Tf
0 Tc (name) Tj
21.6 0 TD /F5 9 Tf
-0.48 Tw (" value=") Tj
48.12 0 TD /F9 9 Tf
0 Tw (value) Tj
27 0 TD /F5 9 Tf
-0.03 Tc -0.33 Tw (" CHECKED) Tj
48 0 TD /F10 9 Tf
0.0155 Tc -0.2255 Tw (, if the ) Tj
-207 -9.96 TD 0.0083 Tc -0.0583 Tw (query data for ) Tj
52.56 0 TD /F9 9 Tf
0 Tc 0 Tw (name) Tj
21.6 0 TD /F10 9 Tf
0.0157 Tc -0.0757 Tw ( is equal to ) Tj
41.52 0 TD /F9 9 Tf
0 Tc 0 Tw (value. ) Tj
37.68 0 TD /F10 9 Tf
-0 Tc -0.0094 Tw (Otherwise, it just ) Tj
-153.36 -10.08 TD -0.0047 Tc 0.0347 Tw (returns ) Tj
27.12 0 TD /F5 9 Tf
0 Tc 0 Tw (name=") Tj
32.4 0 TD /F9 9 Tf
(name) Tj
21.6 0 TD /F5 9 Tf
-0.12 Tw (" value=") Tj
48.48 0 TD /F9 9 Tf
0 Tw (value) Tj
27 0 TD /F5 9 Tf
(") Tj
5.4 0 TD /F10 9 Tf
0.03 Tc (.) Tj
-282 -16.92 TD /F5 9 Tf
0 Tc (form::select ) Tj
70.08 0 TD /F9 9 Tf
-0.03 Tc (name) Tj
21.6 0 TD /F5 9 Tf
0 Tc ( ) Tj
-79.68 -10.08 TD /F9 9 Tf
(valuelist) Tj
48.48 0 TD /F5 9 Tf
( ) Tj
5.4 0 TD /F9 9 Tf
(args) Tj
54.12 10.08 TD /F10 9 Tf
-0.0018 Tc -0.1482 Tw (Generates a ) Tj
44.16 0 TD /F5 9 Tf
0 Tc 0 Tw (select) Tj
32.28 0 TD /F10 9 Tf
-0.0066 Tc -0.1314 Tw ( form element with name ) Tj
91.92 0 TD /F9 9 Tf
0 Tc 0 Tw (name) Tj
21.6 0 TD /F10 9 Tf
0.0188 Tc -0.2288 Tw (. The ) Tj
20.4 0 TD /F9 9 Tf
0 Tc 0 Tw (val-) Tj
-210.36 -10.08 TD (uelist) Tj
32.28 0 TD /F10 9 Tf
-0.0162 Tc -0.3138 Tw ( determines the ) Tj
56.04 0 TD /F5 9 Tf
0 Tc 0 Tw (option) Tj
32.4 0 TD /F10 9 Tf
0.0014 Tc -0.4034 Tw ( tags and values, and ) Tj
75 0 TD /F9 9 Tf
-0.03 Tc 0 Tw (args) Tj
21.48 0 TD /F10 9 Tf
-0.023 Tc -0.307 Tw ( are ) Tj
-217.2 -9.96 TD -0.0039 Tc 0.0099 Tw (optional parameters to the main ) Tj
116.04 0 TD /F5 9 Tf
-0.02 Tc 0 Tw (select) Tj
32.4 0 TD /F10 9 Tf
-0.012 Tc 0.042 Tw ( tag.) Tj
-272.52 -72.36 TD /F1 7.92 Tf
-0.0372 Tc 0.0554 Tw (Table 18\226) Tj
4.1165 Tc -4.1582 Tw (7 ) Tj
48.72 0 TD /F0 7.92 Tf
0.0289 Tc 0.0494 Tw (Elements of the ) Tj
57.84 0 TD /F5 9 Tf
0 Tc 0 Tw (page) Tj
21.6 0 TD /F0 7.92 Tf
0.0496 Tc -0.0913 Tw ( arra) Tj
-0.6 Tc 0 Tw (y) Tj
2.2382 Tc (.) Tj
-124.08 -15.6 TD /F5 9 Tf
0 Tc (query) Tj
72 0 TD /F10 9 Tf
-0 Tc -0.0149 Tw (The decoded query data in a name, value list.) Tj
-72 -16.08 TD /F5 9 Tf
0 Tc 0 Tw (dynamic) Tj
72 0 TD /F10 9 Tf
-0.0046 Tc -0.2311 Tw (If 1, the results of processing the template are not cached in the corresponding ) Tj
0 -9.96 TD /F5 9 Tf
0 Tc 0 Tw (.html) Tj
26.88 0 TD /F10 9 Tf
-0.0174 Tc 0.0474 Tw ( file.) Tj
-98.88 -15.96 TD /F5 9 Tf
0 Tc 0 Tw (filename) Tj
72 0 TD /F10 9 Tf
-0.0055 Tc 0.0055 Tw (The file system pathname of the requested file \(e.g.,) Tj
186.96 0 TD /F5 9 Tf
0 Tc 0 Tw ( /usr/local/) Tj
-186.96 -10.08 TD -0.0046 Tc (htdocs/tclhttpd/index.html) Tj
140.16 0 TD /F10 9 Tf
0.0165 Tc (\).) Tj
ET
114.96 664.8 360 0.48 re f
114.96 519.72 360 0.48 re f
114.96 449.76 360 0.48 re f
114.96 277.8 360 0.48 re f
114.96 205.8 360 0.48 re f
114.96 137.76 360 0.48 re f
endstream
endobj
571 0 obj
12075
endobj
569 0 obj
<<
/Type /Page
/Parent 554 0 R
/Resources <<
/Font 572 0 R
/ProcSet 2 0 R
>>
/Contents 570 0 R
>>
endobj
572 0 obj
<<
/F0 6 0 R
/F1 7 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
/F9 32 0 R
/F10 119 0 R
>>
endobj
574 0 obj
<<
/Length 575 0 R
>>
stream
BT
114 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0365 Tc -0.0782 Tw (262 ) Tj
256.44 0 TD 0.0368 Tc -0.0186 Tw (TclHttpd Web Server) Tj
74.28 0 TD 0.0261 Tc 0.0282 Tw ( Chap. 18) Tj
ET
113.52 701.88 0.48 0.96 re f
486 701.88 0.48 0.96 re f
114 701.88 372 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
554.76 746.76 0.24 0.48 re f
584.04 746.76 0.24 0.48 re f
555 746.76 29.04 0.48 re f
585 80.76 0.24 0.48 re f
553.8 80.76 0.24 0.48 re f
554.04 80.76 30.96 0.48 re f
548.76 69.96 0.48 0.24 re f
548.76 33.72 0.48 0.24 re f
548.76 33.96 0.48 36 re f
BT
0.9955 0 0 0.9955 138 572.4 Tm
/F4 10 Tf
-0.0017 Tc 0.7335 Tw (Table 18\2268 shows the elements of the ) Tj
ET
BT
318.24 572.4 TD
/F5 9 Tf
0 Tc 0 Tw (env) Tj
ET
BT
0.9955 0 0 0.9955 334.32 572.4 Tm
/F4 10 Tf
0 Tc 0.7142 Tw ( arra) Tj
-1.1533 Tc 0 Tw (y) Tj
0.0197 Tc 0.6949 Tw (. These are defined during) Tj
-221.3252 -12.0547 TD 0.0093 Tc 0.0088 Tw (CGI requests, application-direct URL handlers, and page template processing: ) Tj
ET
BT
123.96 656.04 TD
/F5 9 Tf
0 Tc 0 Tw (template) Tj
72 0 TD /F10 9 Tf
-0.0054 Tc 0.0054 Tw (The file system pathname of the template file \(e.g.,) Tj
183.48 0 TD /F5 9 Tf
-0.0109 Tc 0.0109 Tw ( /usr/local/) Tj
-183.48 -10.08 TD -0.0048 Tc 0 Tw (htdocs/tclhttpd/index.tml) Tj
134.88 0 TD /F10 9 Tf
-0.0435 Tc (\).) Tj
-206.88 -15.96 TD /F5 9 Tf
0 Tc (url) Tj
72 0 TD /F10 9 Tf
-0.0106 Tc 0.0286 Tw (The part of the url after the server name \(e.g., ) Tj
165.96 0 TD /F5 9 Tf
-0.006 Tc 0 Tw (/tclhttpd/index.html) Tj
107.88 0 TD /F10 9 Tf
0.0165 Tc (\).) Tj
-345.84 -15.96 TD /F5 9 Tf
0 Tc (root) Tj
72 0 TD /F10 9 Tf
-0.0057 Tc -0.1125 Tw (A relative path from the template file back to the root of the URL tree. This is ) Tj
0 -10.08 TD -0.005 Tc -0.0183 Tw (useful for creating relative links between pages in different directories.) Tj
-75.96 -70.32 TD /F1 7.92 Tf
-0.0372 Tc 0.0554 Tw (Table 18\226) Tj
3.9965 Tc -3.9182 Tw (8 ) Tj
48.72 0 TD /F0 7.92 Tf
0.0473 Tc -0.0891 Tw (Elements of the ) Tj
57.84 0 TD /F5 9 Tf
0 Tc 0 Tw (env) Tj
16.08 0 TD /F0 7.92 Tf
0.0196 Tc 0.0587 Tw ( arra) Tj
-0.2609 Tc 0 Tw (y.) Tj
-118.68 -15.6 TD /F5 9 Tf
0 Tc (AUTH_TYPE) Tj
120 0 TD /F10 9 Tf
-0.0034 Tc -0.0066 Tw (Authentication protocol \(e.g., ) Tj
108.36 0 TD /F5 9 Tf
0 Tc 0 Tw (Basic) Tj
27 0 TD /F10 9 Tf
-0.0435 Tc (\).) Tj
-255.36 -16.08 TD /F5 9 Tf
-0.0086 Tc (CONTENT_LENGTH) Tj
120 0 TD /F10 9 Tf
-0.0046 Tc 0.0106 Tw (The size of the query data.) Tj
-120 -15.96 TD /F5 9 Tf
-0.01 Tc 0 Tw (CONTENT_TYPE) Tj
120 0 TD /F10 9 Tf
-0.002 Tc -0.016 Tw (The type of the query data.) Tj
-120 -15.96 TD /F5 9 Tf
-0.0092 Tc 0 Tw (DOCUMENT_ROOT) Tj
120 0 TD /F10 9 Tf
-0.0038 Tc -0.0062 Tw (File system pathname of the document root.) Tj
-120 -16.08 TD /F5 9 Tf
-0.0071 Tc 0 Tw (GATEWAY_INTERFACE) Tj
120 0 TD /F10 9 Tf
-0.0055 Tc 0.0055 Tw (Protocol version, which is ) Tj
96.12 0 TD /F5 9 Tf
0 Tc 0 Tw (CGI/1.1) Tj
37.8 0 TD /F10 9 Tf
0.03 Tc (.) Tj
-253.92 -15.96 TD /F5 9 Tf
-0.0109 Tc (HTTP_ACCEPT) Tj
120 0 TD /F10 9 Tf
-0.0034 Tc -0.0146 Tw (The Accept headers from the request.) Tj
-120 -15.96 TD /F5 9 Tf
-0.0067 Tc 0 Tw (HTTP_AUTHORIZATION) Tj
120 0 TD /F10 9 Tf
-0.0043 Tc -0.0137 Tw (The Authorization challenge from the request.) Tj
-120 -16.08 TD /F5 9 Tf
-0.0109 Tc 0 Tw (HTTP_COOKIE) Tj
120 0 TD /F10 9 Tf
-0.0019 Tc -0.0281 Tw (The cookie from the request.) Tj
-120 -15.96 TD /F5 9 Tf
0 Tc 0 Tw (HTTP_FROM) Tj
120 0 TD /F10 9 Tf
-0.006 Tc 0.012 Tw (The From: header of the request.) Tj
-120 -15.96 TD /F5 9 Tf
-0.01 Tc 0 Tw (HTTP_REFERER) Tj
120 0 TD /F10 9 Tf
-0.0048 Tc 0.0108 Tw (The Referer indicates the previous page.) Tj
-120 -16.08 TD /F5 9 Tf
-0.008 Tc 0 Tw (HTTP_USER_AGENT) Tj
120 0 TD /F10 9 Tf
-0.0054 Tc 0.0114 Tw (An ID string for the ) Tj
-0.1192 Tc 0.1492 Tw (Web browser.) Tj
-120 -15.96 TD /F5 9 Tf
0 Tc 0 Tw (PATH_INFO) Tj
120 0 TD /F10 9 Tf
-0.0053 Tc 0.0153 Tw (Extra path information after the template file.) Tj
-120 -15.96 TD /F5 9 Tf
-0.008 Tc 0 Tw (PATH_TRANSLATED) Tj
120 0 TD /F10 9 Tf
-0.0089 Tc 0.0239 Tw (The extra path information appended to the document root.) Tj
-120 -16.08 TD /F5 9 Tf
-0.01 Tc 0 Tw (QUERY_STRING) Tj
120 0 TD /F10 9 Tf
-0.0064 Tc -0.0036 Tw (The form query data.) Tj
-120 -15.96 TD /F5 9 Tf
-0.0109 Tc 0 Tw (REMOTE_ADDR) Tj
120 0 TD /F10 9 Tf
0.0097 Tc -0.0997 Tw (The client) Tj
-0.045 Tc 0.015 Tw (\222s IP address.) Tj
-120 -15.96 TD /F5 9 Tf
-0.0109 Tc 0 Tw (REMOTE_USER) Tj
120 0 TD /F10 9 Tf
-0.001 Tc -0.0204 Tw (The remote user name specified by Basic authentication.) Tj
-120 -16.08 TD /F5 9 Tf
-0.0086 Tc 0 Tw (REQUEST_METHOD) Tj
120 0 TD /F10 9 Tf
0.0015 Tc (GE) Tj
-0.699 Tc (T) Tj
-0.009 Tc 0.039 Tw (, POS) Tj
-0.699 Tc 0 Tw (T) Tj
-0.0038 Tc 0.0338 Tw (, or HEAD.) Tj
-120 -15.96 TD /F5 9 Tf
-0.0109 Tc 0 Tw (REQUEST_URI) Tj
120 0 TD /F10 9 Tf
0 Tc -0.0426 Tw (The complete URL that was requested.) Tj
-120 -15.96 TD /F5 9 Tf
-0.0109 Tc 0 Tw (SCRIPT_NAME) Tj
120 0 TD /F10 9 Tf
0 Tc -0.0303 Tw (The name of the current file relative to the document root.) Tj
-120 -16.08 TD /F5 9 Tf
-0.0109 Tc 0 Tw (SERVER_NAME) Tj
120 0 TD /F10 9 Tf
-0 Tc -0.0294 Tw (The server name, e.g., ) Tj
81.84 0 TD /F5 9 Tf
-0.0086 Tc 0 Tw (www.beedub.com) Tj
75.6 0 TD /F10 9 Tf
0.03 Tc (.) Tj
-277.44 -15.96 TD /F5 9 Tf
-0.0109 Tc (SERVER_PORT) Tj
120 0 TD /F10 9 Tf
0.042 Tc -0.132 Tw (The server) Tj
-0.0362 Tc 0.0262 Tw (\222s port, e.g., 80.) Tj
-120 -15.96 TD /F5 9 Tf
-0.008 Tc 0 Tw (SERVER_PROTOCOL) Tj
120 0 TD /F10 9 Tf
0.0026 Tc -0.0526 Tw (The protocol \(e.g., ) Tj
68.88 0 TD /F5 9 Tf
0 Tc 0 Tw (http) Tj
21.6 0 TD /F10 9 Tf
-0.0285 Tc 0.0585 Tw ( or ) Tj
12 0 TD /F5 9 Tf
0 Tc 0 Tw (https) Tj
27 0 TD /F10 9 Tf
-0.0435 Tc (\).) Tj
-249.48 -16.08 TD /F5 9 Tf
-0.008 Tc (SERVER_SOFTWARE) Tj
120 0 TD /F10 9 Tf
-0.0209 Tc 0.0309 Tw (A software version string for the server.) Tj
-123.96 505.68 TD /F1 7.92 Tf
-0.0372 Tc 0.0554 Tw (Table 18\226) Tj
3.9965 Tc -3.9182 Tw (7 ) Tj
48.72 0 TD /F0 7.92 Tf
0.0473 Tc -0.0891 Tw (Elements of the ) Tj
57.84 0 TD /F5 9 Tf
0 Tc 0 Tw (page) Tj
21.48 0 TD /F0 7.92 Tf
0.0196 Tc 0.0587 Tw ( arra) Tj
-0.0104 Tc 0.0887 Tw (y. \(Continued\)) Tj
ET
120 664.8 360 0.48 re f
120 596.76 360 0.48 re f
120 526.8 360 0.48 re f
120 158.76 360 0.48 re f
endstream
endobj
575 0 obj
6830
endobj
573 0 obj
<<
/Type /Page
/Parent 554 0 R
/Resources <<
/Font <<
/F0 6 0 R
/F1 7 0 R
/F4 14 0 R
/F5 16 0 R
/F10 119 0 R
>>
/ProcSet 2 0 R
>>
/Contents 574 0 R
>>
endobj
578 0 obj
<<
/Length 579 0 R
>>
stream
BT
108.96 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0362 Tc -0.018 Tw (Standard Application-Direct URLs) Tj
356.76 0 TD 0.0765 Tc 0 Tw (263) Tj
ET
108.48 701.88 0.48 0.96 re f
480.72 701.88 0.48 0.96 re f
108.96 701.88 371.76 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
553.8 746.76 0.24 0.48 re f
585 746.76 0.24 0.48 re f
554.04 746.76 30.96 0.48 re f
585 80.76 0.24 0.48 re f
554.76 80.76 0.24 0.48 re f
555 80.76 30 0.48 re f
547.8 75 0.48 0.24 re f
547.8 34.8 0.48 0.24 re f
547.8 35.04 0.48 39.96 re f
510 504 54 108 re f
510 611.76 54.24 0.48 re f
563.76 503.76 0.48 108.24 re f
509.76 503.76 54.24 0.48 re f
509.76 504 0.48 108.24 re f
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 605.52 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 602.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 598.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (.) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 595.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 592.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (A) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 583.2 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 575.28 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (v) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 568.56 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (a) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 560.64 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (n) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 553.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 545.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (e) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 538.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 530.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 526.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (T) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 521.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 514.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (l) Tj
ET
Q
BT
0.997 0 0 0.997 108.96 668.4 Tm
/F2 13 Tf
0.2772 Tc -0.0061 Tw (Standard Application-Direct URLs) Tj
ET
BT
0.9955 0 0 0.9955 108.96 647.4 Tm
/F4 10 Tf
0.0117 Tc 2.3102 Tw (The server has several modules that provide application-direct URLs. These) Tj
0 -12.0547 TD 0.0174 Tc -0.0262 Tw (application-direct URLs lets you control the server or examine its state from any) Tj
T* -0.0406 Tc 0.3938 Tw (Web browse) Tj
-0.9461 Tc 0 Tw (r) Tj
0.0058 Tc 0.4019 Tw (. You can look at the implementation of these modules as examples) Tj
T* 0.0122 Tc 0.0594 Tw (for your own application.) Tj
24.1095 -30.1369 TD /F2 10 Tf
0.0193 Tc 0 Tw (Status) Tj
0 -18.0821 TD /F4 10 Tf
0.0176 Tc 0.6969 Tw (The ) Tj
ET
BT
154.2 563.4 TD
/F5 9 Tf
-0.0171 Tc 0 Tw (/status) Tj
ET
BT
0.9955 0 0 0.9955 191.88 563.4 Tm
/F4 10 Tf
0.0263 Tc 0.5878 Tw ( URL is implemented in the ) Tj
ET
BT
326.88 563.4 TD
/F5 9 Tf
-0.012 Tc 0 Tw (status.tcl) Tj
ET
BT
0.9955 0 0 0.9955 380.76 563.4 Tm
/F4 10 Tf
0.0075 Tc 0.6166 Tw ( file. The status mod-) Tj
-273.04 -12.0547 TD 0.0093 Tc 1.045 Tw (ule implements the display of hit counts, document hits, and document misses) Tj
0 -12.1753 TD 0.0137 Tc 1.0143 Tw (\(i.e., documents not found\). The ) Tj
ET
BT
262.56 539.28 TD
/F5 9 Tf
-0.012 Tc 0 Tw (Status_Url) Tj
ET
BT
0.9955 0 0 0.9955 316.44 539.28 Tm
/F4 10 Tf
0.0108 Tc 1.0654 Tw ( command enables the application-) Tj
-208.4266 -12.0547 TD 0.0115 Tc 1.1753 Tw (direct URLs and assigns the top-level URL for the status module. The default) Tj
0 -12.0547 TD 0.0198 Tc -0.0285 Tw (configuration file contains this command:) Tj
ET
BT
144.96 501.96 TD
/F5 9 Tf
0 Tc -0.12 Tw (Status_Url /status) Tj
ET
BT
0.9955 0 0 0.9955 132.96 488.28 Tm
/F4 10 Tf
0.0171 Tc 0.0086 Tw (Assuming this configuration, the following URLs are implemented:) Tj
0 -192.876 TD /F2 10 Tf
0.0292 Tc 0 Tw (Debugging) Tj
0 -18.0821 TD /F4 10 Tf
0.0176 Tc 0.6969 Tw (The ) Tj
ET
BT
154.2 278.28 TD
/F5 9 Tf
0 Tc 0 Tw (/debug) Tj
ET
BT
0.9955 0 0 0.9955 186.6 278.28 Tm
/F4 10 Tf
0.0148 Tc 0.6998 Tw ( URL is implemented in the ) Tj
ET
BT
321.96 278.28 TD
/F5 9 Tf
-0.0133 Tc 0 Tw (debug.tcl) Tj
ET
BT
0.9955 0 0 0.9955 370.56 278.28 Tm
/F4 10 Tf
0.0072 Tc 0.7074 Tw ( file. The debug module) Tj
-262.7935 -12.0547 TD 0.0212 Tc 0.0102 Tw (has several useful URLs that let you examine variable values and other internal) Tj
0 -12.0547 TD 0.0163 Tc -0.015 Tw (state. It is turned on with this command in the default configuration file:) Tj
ET
BT
144.96 240.96 TD
/F5 9 Tf
-0.008 Tc 0.008 Tw (Debug_Url /debug) Tj
ET
BT
0.9955 0 0 0.9955 132.96 227.28 Tm
/F4 10 Tf
-0.0128 Tc 0.7275 Tw (Table 18\22610 lists the ) Tj
ET
BT
234.48 227.28 TD
/F5 9 Tf
-0.02 Tc 0 Tw (/debug) Tj
ET
BT
0.9955 0 0 0.9955 266.88 227.28 Tm
/F4 10 Tf
0.0146 Tc 0.6799 Tw ( URLs. These URLs often require parameters) Tj
-158.6405 -12.0547 TD 0.0144 Tc 1.4837 Tw (that you can specify directly in the URL. ) Tj
-0.0304 Tc 1.5086 Tw (For example, the ) Tj
ET
BT
395.4 215.28 TD
/F5 9 Tf
-0.0109 Tc 0 Tw (/debug/echo) Tj
ET
BT
0.9955 0 0 0.9955 454.68 215.28 Tm
/F4 10 Tf
0.0034 Tc 1.555 Tw ( URL) Tj
-347.2973 -12.0547 TD 0.018 Tc -0.0268 Tw (echoes its query parameters:) Tj
ET
BT
144.96 189.96 TD
/F5 9 Tf
0 Tc 0 Tw (http://) Tj
37.8 0 TD /F9 9 Tf
-0.012 Tc (yourserver) Tj
53.88 0 TD /F5 9 Tf
0 Tc (:) Tj
5.4 0 TD /F9 9 Tf
(port) Tj
21.6 0 TD /F5 9 Tf
-0.0073 Tc (/debug/echo?name=value&name2=val2) Tj
-148.68 271.68 TD /F1 7.92 Tf
-0.0372 Tc 0.0554 Tw (Table 18\226) Tj
4.1165 Tc -4.1582 Tw (9 ) Tj
48.72 0 TD /F0 7.92 Tf
0.0319 Tc 0.0463 Tw (Status application-direct URLs.) Tj
-44.64 -16.68 TD /F5 9 Tf
0 Tc 0 Tw (/status) Tj
96 0 TD /F10 9 Tf
-0.0026 Tc -0.0074 Tw (Main status page showing summary counters and hit count histograms.) Tj
-96 -16.92 TD /F5 9 Tf
0 Tc 0 Tw (/status/doc) Tj
96 0 TD /F10 9 Tf
-0.0075 Tc 0.0135 Tw (Shows hit counts for each page. This page lets you sort by name or hit ) Tj
0 -10.08 TD 0.0008 Tc -0.0188 Tw (count, and limit files by patterns.) Tj
-96 -16.92 TD /F5 9 Tf
0 Tc 0 Tw (/status/hello) Tj
96 0 TD /F10 9 Tf
0.0038 Tc -0.0458 Tw (A trivial URL that returns "hello".) Tj
-96 -17.04 TD /F5 9 Tf
-0.0075 Tc 0 Tw (/status/notfound) Tj
96 0 TD /F10 9 Tf
-0.0059 Tc 0.0092 Tw (Shows miss counts for URLs that users tried to fetch.) Tj
-96 -17.04 TD /F5 9 Tf
0 Tc 0 Tw (/status/size) Tj
96 0 TD /F10 9 Tf
-0.0042 Tc 0.0102 Tw (Displays an estimated size of ) Tj
-0.0585 Tc 0.0085 Tw (Tcl code and ) Tj
-0.0529 Tc 0.0829 Tw (Tcl data used by the ) Tj
-0.119 Tc 0 Tw (TclHt-) Tj
0 -9.96 TD -0.0076 Tc 0.0376 Tw (tpd program.) Tj
-96 -17.04 TD /F5 9 Tf
0 Tc 0 Tw (/status/text) Tj
96 0 TD /F10 9 Tf
-0.0042 Tc -0.0087 Tw (This is a version of the main status page that doesn\222t use the graphical ) Tj
0 -9.96 TD -0.0078 Tc 0.0378 Tw (histograms of hit counts.) Tj
ET
114.96 454.8 360 0.48 re f
114.96 322.8 360 0.48 re f
endstream
endobj
579 0 obj
7663
endobj
576 0 obj
<<
/Type /Page
/Parent 577 0 R
/Resources <<
/Font 580 0 R
/ProcSet 2 0 R
>>
/Contents 578 0 R
>>
endobj
580 0 obj
<<
/F0 6 0 R
/F1 7 0 R
/F2 8 0 R
/F4 14 0 R
/F5 16 0 R
/F9 32 0 R
/F10 119 0 R
>>
endobj
582 0 obj
<<
/Length 583 0 R
>>
stream
BT
114 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0365 Tc -0.0782 Tw (264 ) Tj
256.44 0 TD 0.0368 Tc -0.0186 Tw (TclHttpd Web Server) Tj
74.28 0 TD 0.0261 Tc 0.0282 Tw ( Chap. 18) Tj
ET
113.52 701.88 0.48 0.96 re f
486 701.88 0.48 0.96 re f
114 701.88 372 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
554.76 746.76 0.24 0.48 re f
584.04 746.76 0.24 0.48 re f
555 746.76 29.04 0.48 re f
585 80.76 0.24 0.48 re f
553.8 80.76 0.24 0.48 re f
554.04 80.76 30.96 0.48 re f
548.76 69.96 0.48 0.24 re f
548.76 33.72 0.48 0.24 re f
548.76 33.96 0.48 36 re f
BT
0.9955 0 0 0.9955 138 394.32 Tm
/F4 10 Tf
0.0158 Tc 0.8394 Tw (The sample URL tree that is included in the distribution includes the file) Tj
ET
BT
114 382.32 TD
/F5 9 Tf
-0.0071 Tc 0 Tw (htdocs/hacks.html) Tj
ET
BT
0.9955 0 0 0.9955 205.68 382.32 Tm
/F4 10 Tf
0.0158 Tc 0.1442 Tw (. This file has several small forms that use the ) Tj
ET
BT
424.08 382.32 TD
/F5 9 Tf
-0.02 Tc 0 Tw (/debug) Tj
ET
BT
0.9955 0 0 0.9955 456.48 382.32 Tm
/F4 10 Tf
0.0199 Tc 0.2125 Tw ( URLs) Tj
-344.0425 -12.0547 TD 0.0159 Tc 0.27 Tw (to examine variables and source files. Example18\22615 shows the implementation) Tj
0 -12.0547 TD -0.008 Tc 0.8432 Tw (of ) Tj
ET
BT
125.88 358.32 TD
/F5 9 Tf
-0.0185 Tc 0 Tw (/debug/source) Tj
ET
BT
0.9955 0 0 0.9955 195.84 358.32 Tm
/F4 10 Tf
-0.0023 Tc 0.8096 Tw (. You can see that it limits the files to the main script library) Tj
-82.2134 -12.0547 TD 0.0144 Tc 0.4591 Tw (and to the script library associated with document templates. It may seem dan-) Tj
0 -12.0547 TD 0.013 Tc 0.9929 Tw (gerous to have these facilities, but I reason that because my source directories) Tj
T* 0.0174 Tc 0.9985 Tw (are under my control, it cannot hurt to reload any source files. In general, the) Tj
T* 0.0135 Tc 0.6243 Tw (library scripts contain only procedure definitions and no global code that might) Tj
T* 0.0176 Tc 0.8778 Tw (reset state inappropriatel) Tj
-1.2738 Tc 0 Tw (y) Tj
0.0114 Tc 0.8785 Tw (. In practice, the ability to tune \(i.e., fix bugs\) in the) Tj
T* 0.0129 Tc 1.4064 Tw (running server has proven useful to me on many occasions. It lets you evolve) Tj
T* 0.0142 Tc 0.0012 Tw (your application without restarting it! ) Tj
ET
1 1 1 rg
114 240.96 372 8.04 re f
0 0 0 rg
136.8 244.8 0.24 0.48 re f
485.04 244.8 0.24 0.48 re f
137.04 244.8 348 0.48 re f
BT
138 251.64 TD
/F1 7.92 Tf
0.0519 Tc -0.0937 Tw (Example 18\2261) Tj
3.9965 Tc 0 Tw (5) Tj
61.32 0 TD /F0 7.92 Tf
0.0513 Tc -0.093 Tw (The ) Tj
15.96 0 TD /F5 9 Tf
-0.0092 Tc 0 Tw (/debug/source) Tj
70.2 0 TD /F0 7.92 Tf
0.0345 Tc 0.0038 Tw ( application-direct URL implementation.) Tj
-147.48 -22.68 TD /F5 9 Tf
-0.0048 Tc -0.0352 Tw (proc Debug/source {source} {) Tj
18 -9.96 TD -0.0086 Tc 0.0086 Tw (global Httpd Doc) Tj
0 -9.96 TD -0.0046 Tc -0.0254 Tw (set source [file tail $source]) Tj
0 -10.08 TD -0.0096 Tc 0.0096 Tw (set dirlist $Httpd\(library\)) Tj
0 -9.96 TD -0.0097 Tc 0.0097 Tw (if {[info exists Doc\(templateLibrary\)]} {) Tj
18 -9.96 TD -0.0069 Tc 0.0069 Tw (lappend dirlist $Doc\(templateLibrary\)) Tj
-18 -10.08 TD 0 Tc 0 Tw (}) Tj
0 -9.96 TD -0.0126 Tc 0.0126 Tw (foreach dir $dirlist {) Tj
18 -9.96 TD -0.0086 Tc 0.0086 Tw (set file [file join $dir $source]) Tj
0 -10.08 TD -0.012 Tc 0.012 Tw (if [file exists $file] {) Tj
18 -9.96 TD 0 Tc 0 Tw (break) Tj
-60 542.64 TD /F1 7.92 Tf
-0.029 Tc 0.0473 Tw (Table 18\2261) Tj
4.1165 Tc -4.1582 Tw (0 ) Tj
53.16 0 TD /F0 7.92 Tf
0.0317 Tc 0.0466 Tw (Debug application-direct URLs.) Tj
-49.2 -16.68 TD /F5 9 Tf
-0.01 Tc 0 Tw (/debug/after) Tj
96 0 TD /F10 9 Tf
-0.0098 Tc 0.0398 Tw (Lists the outstanding ) Tj
77.16 0 TD /F5 9 Tf
0 Tc 0 Tw (after) Tj
27 0 TD /F10 9 Tf
-0.0064 Tc 0.0364 Tw ( events.) Tj
-200.16 -16.92 TD /F5 9 Tf
0 Tc 0 Tw (/debug/dbg) Tj
96 0 TD /F10 9 Tf
-0.006 Tc 0.036 Tw (Connects to ) Tj
45 0 TD /F11 9 Tf
-0.924 Tc 0 Tw (T) Tj
-0.0699 Tc 0.0999 Tw (clPro Debugger) Tj
61.44 0 TD /F10 9 Tf
-0.0166 Tc 0.0466 Tw (. This takes a ) Tj
49.68 0 TD /F5 9 Tf
0 Tc 0 Tw (host) Tj
21.6 0 TD /F10 9 Tf
-0.012 Tc 0.042 Tw ( and ) Tj
17.52 0 TD /F5 9 Tf
-0.03 Tc 0 Tw (port) Tj
21.48 0 TD /F10 9 Tf
0 Tc 0.03 Tw ( ) Tj
-216.72 -10.08 TD 0.0019 Tc 0 Tw (paramete) Tj
-0.597 Tc (r) Tj
-0.051 Tc 0.033 Tw (. You need to install ) Tj
109.44 0 TD /F5 9 Tf
-0.01 Tc 0 Tw (prodebug.tcl) Tj
64.8 0 TD /F10 9 Tf
0.006 Tc -0.036 Tw ( from ) Tj
21.96 0 TD /F11 9 Tf
-0.187 Tc 0 Tw (TclPro) Tj
23.76 0 TD /F10 9 Tf
0 Tc 0.03 Tw ( ) Tj
-219.96 -9.96 TD 0.0224 Tc -0.0524 Tw (into the server) Tj
-0.0209 Tc 0.0109 Tw (\222s script library director) Tj
-0.66 Tc 0 Tw (y) Tj
0.03 Tc (.) Tj
-96 -17.04 TD /F5 9 Tf
-0.0109 Tc (/debug/echo) Tj
96 0 TD /F10 9 Tf
-0.0105 Tc 0.0405 Tw (Echoes its query parameters. Accepts a ) Tj
143.04 0 TD /F5 9 Tf
0 Tc 0 Tw (title) Tj
27 0 TD /F10 9 Tf
-0.0552 Tc -0.0348 Tw ( parameter.) Tj
-266.04 -16.92 TD /F5 9 Tf
-0.0075 Tc 0 Tw (/debug/errorInfo) Tj
96 0 TD /F10 9 Tf
-0.0016 Tc -0.0284 Tw (Displays the ) Tj
46.92 0 TD /F5 9 Tf
0 Tc 0 Tw (errorInfo) Tj
48.6 0 TD /F10 9 Tf
0.0118 Tc -0.0538 Tw ( variable along with the server) Tj
-0.078 Tc 0.108 Tw (\222s ver-) Tj
-95.52 -10.08 TD -0.0042 Tc -0.0058 Tw (sion number and ) Tj
-0.0391 Tc 0.0691 Tw (Webmaster e-mail. Accepts ) Tj
163.32 0 TD /F5 9 Tf
-0.024 Tc 0 Tw (title) Tj
27 0 TD /F10 9 Tf
-0.012 Tc 0.042 Tw ( and ) Tj
-190.32 -9.96 TD /F5 9 Tf
0 Tc 0 Tw (errorInfo) Tj
48.6 0 TD /F10 9 Tf
-0.0144 Tc -0.0756 Tw ( arguments.) Tj
-144.6 -17.04 TD /F5 9 Tf
-0.0092 Tc 0 Tw (/debug/parray) Tj
96 0 TD /F10 9 Tf
-0.0035 Tc -0.0102 Tw (Displays a global array variable. The name of the variable is ) Tj
0 -9.96 TD 0.0019 Tc -0.0519 Tw (specified with the ) Tj
66.24 0 TD /F5 9 Tf
0 Tc 0 Tw (aname) Tj
26.88 0 TD /F10 9 Tf
-0.0552 Tc 0.0852 Tw ( parameter.) Tj
-189.12 -17.04 TD /F5 9 Tf
-0.0092 Tc 0 Tw (/debug/pvalue) Tj
96 0 TD /F10 9 Tf
-0.0082 Tc -0.2127 Tw (A more general value display function. The name of the variable ) Tj
0 -9.96 TD -0.0118 Tc 0.0418 Tw (is specified with the ) Tj
74.4 0 TD /F5 9 Tf
0 Tc 0 Tw (aname) Tj
27 0 TD /F10 9 Tf
-0.016 Tc -0.0226 Tw ( parameter. This can be a variable ) Tj
-101.4 -9.96 TD -0.0012 Tc -0.0233 Tw (name, an array name, or a pattern that matches several variable ) Tj
0 -10.08 TD -0.0075 Tc 0 Tw (names.) Tj
-96 -16.92 TD /F5 9 Tf
-0.01 Tc (/debug/raise) Tj
96 0 TD /F10 9 Tf
-0.0049 Tc -0.0011 Tw (Raises an error \(to test error handling\). Any parameters become ) Tj
0 -10.08 TD 0 Tc -0.0302 Tw (the error string.) Tj
-96 -16.92 TD /F5 9 Tf
-0.0092 Tc 0 Tw (/debug/source) Tj
96 0 TD /F10 9 Tf
0.0032 Tc 0.0068 Tw (Sources a file from either the server) Tj
-0.0266 Tc 0.0326 Tw (\222s main library directory or ) Tj
0 -10.08 TD 0.014 Tc -0.104 Tw (the ) Tj
13.32 0 TD /F5 9 Tf
-0.0063 Tc 0 Tw (Doc_TemplateLibrary) Tj
102.36 0 TD /F10 9 Tf
-0.0037 Tc 0.0338 Tw ( director) Tj
-0.66 Tc 0 Tw (y) Tj
-0.0008 Tc -0.0172 Tw (. The file is specified ) Tj
-115.68 -9.96 TD -0 Tc -0.03 Tw (with the ) Tj
31.44 0 TD /F5 9 Tf
0 Tc 0 Tw (source) Tj
32.4 0 TD /F10 9 Tf
-0.0552 Tc 0.0852 Tw ( parameter.) Tj
ET
132 664.8 336 0.48 re f
132 418.8 336 0.48 re f
endstream
endobj
583 0 obj
7693
endobj
581 0 obj
<<
/Type /Page
/Parent 577 0 R
/Resources <<
/Font 584 0 R
/ProcSet 2 0 R
>>
/Contents 582 0 R
>>
endobj
584 0 obj
<<
/F0 6 0 R
/F1 7 0 R
/F4 14 0 R
/F5 16 0 R
/F10 119 0 R
/F11 120 0 R
>>
endobj
586 0 obj
<<
/Length 587 0 R
>>
stream
BT
108.96 690.36 TD
0 0 0 rg
/F0 7.92 Tf
0.0362 Tc -0.018 Tw (Standard Application-Direct URLs) Tj
356.76 0 TD 0.0765 Tc 0 Tw (265) Tj
ET
108.48 701.88 0.48 0.96 re f
480.72 701.88 0.48 0.96 re f
108.96 701.88 371.76 0.96 re f
39 746.76 0.24 0.48 re f
18 746.76 21 0.48 re f
44.76 754.8 0.48 0.24 re f
44.76 755.04 0.48 18.96 re f
44.76 34.8 0.48 0.24 re f
44.76 75 0.48 0.24 re f
44.76 35.04 0.48 39.96 re f
41.04 80.76 0.24 0.48 re f
18 80.76 23.04 0.48 re f
548.76 754.8 0.48 0.24 re f
548.76 755.04 0.48 18.96 re f
553.8 746.76 0.24 0.48 re f
585 746.76 0.24 0.48 re f
554.04 746.76 30.96 0.48 re f
585 80.76 0.24 0.48 re f
554.76 80.76 0.24 0.48 re f
555 80.76 30 0.48 re f
547.8 75 0.48 0.24 re f
547.8 34.8 0.48 0.24 re f
547.8 35.04 0.48 39.96 re f
510 504 54 108 re f
510 611.76 54.24 0.48 re f
563.76 503.76 0.48 108.24 re f
509.76 503.76 54.24 0.48 re f
509.76 504 0.48 108.24 re f
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 605.52 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 602.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (I) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 598.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (.) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 595.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 592.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (A) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 583.2 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 575.28 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (v) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 568.56 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (a) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 560.64 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (n) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 553.44 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 545.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (e) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 538.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (d) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 530.16 Tm
1 1 1 rg
/F2 12 Tf
0 Tc ( ) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 526.8 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (T) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 521.76 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (c) Tj
ET
Q
q
18 18 576 756 re W n
BT
0 -0.9995 0.9995 0 519.96 514.08 Tm
1 1 1 rg
/F2 12 Tf
0 Tc (l) Tj
ET
Q
BT
168.96 671.04 TD
/F5 9 Tf
0 Tc (}) Tj
-18 -10.08 TD (}) Tj
0 -9.96 TD -0.0098 Tc -0.1552 Tw (set error [catch {uplevel #0 [list source $file]} result]) Tj
T* -0.0062 Tc 0.0062 Tw (set html "Source $source\\n") Tj
0 -10.08 TD -0.0109 Tc 0.0109 Tw (if {$error} {) Tj
18 -9.96 TD -0.008 Tc 0.008 Tw (global errorInfo) Tj
0 -9.96 TD -0.0065 Tc 0.0065 Tw (append html "Error in $source
\\n") Tj
0 -10.08 TD -0.0084 Tc 0.0084 Tw (append html "$result$errorInfo
") Tj
-18 -9.96 TD 0 Tc 0 Tw (} else {) Tj
18 -9.96 TD -0.0063 Tc 0.0063 Tw (append html "Reloaded $source
\\n") Tj
0 -10.08 TD -0.008 Tc 0.008 Tw (append html "$result
") Tj
-18 -9.96 TD 0 Tc 0 Tw (}) Tj
0 -9.96 TD -0.0109 Tc 0.0109 Tw (return $html) Tj
ET
1 1 1 rg
108.96 530.04 372 7.92 re f
0 0 0 rg
131.76 533.76 0.24 0.48 re f
480 533.76 0.24 0.48 re f
132 533.76 348 0.48 re f
BT
132.96 540.96 TD
0 Tc 0 Tw (}) Tj
ET
BT
0.9955 0 0 0.9955 132.96 504.36 Tm
/F2 10 Tf
0.0232 Tc (Administration) Tj
0 -18.0821 TD /F4 10 Tf
0.0176 Tc 0.5763 Tw (The ) Tj
ET
BT
154.08 486.36 TD
/F5 9 Tf
-0.02 Tc 0 Tw (/admin) Tj
ET
BT
0.9955 0 0 0.9955 186.48 486.36 Tm
/F4 10 Tf
0.0148 Tc 0.5591 Tw ( URL is implemented in the ) Tj
ET
BT
320.88 486.36 TD
/F5 9 Tf
0 Tc 0 Tw (admin.tcl) Tj
ET
BT
0.9955 0 0 0.9955 369.48 486.36 Tm
/F4 10 Tf
0.0081 Tc 0.5257 Tw ( file. The admin module) Tj
-261.7086 -12.0547 TD 0.0149 Tc 0.9063 Tw (lets you load URL redirect tables, and it provides URLs that reset some of the) Tj
0 -12.0547 TD 0.0171 Tc 1.6317 Tw (counters maintained by the serve) Tj
-1.0667 Tc 0 Tw (r) Tj
0.0198 Tc 1.6056 Tw (. It is turned on with this command in the) Tj
T* 0.018 Tc -0.0267 Tw (default configuration file:) Tj
ET
BT
144.96 437.04 TD
/F5 9 Tf
-0.008 Tc 0.008 Tw (Admin_Url /admin) Tj
ET
BT
0.9955 0 0 0.9955 132.96 423.36 Tm
/F4 10 Tf
0.0157 Tc 0 Tw (Currentl) Tj
-1.1533 Tc (y) Tj
0.0103 Tc 2.3919 Tw (, there is only one useful admin URL. The ) Tj
ET
BT
394.68 423.36 TD
/F5 9 Tf
-0.0075 Tc 0 Tw (/admin/redirect/) Tj
-285.72 -12 TD 0 Tc 0.96 Tw (reload ) Tj
ET
BT
0.9955 0 0 0.9955 147.72 411.36 Tm
/F4 10 Tf
0.0228 Tc 0.4988 Tw (URL sources the file named ) Tj
ET
BT
281.4 411.36 TD
/F5 9 Tf
-0.015 Tc 0 Tw (redirect) Tj
ET
BT
0.9955 0 0 0.9955 324.48 411.36 Tm
/F4 10 Tf
0.0296 Tc 0.4437 Tw ( in the document root. This file is) Tj
-216.5033 -12.0547 TD 0.0253 Tc 1.3522 Tw (expected to contain a number of ) Tj
ET
BT
267.24 399.36 TD
/F5 9 Tf
-0.01 Tc 0 Tw (Url_Redirect) Tj
ET
BT
0.9955 0 0 0.9955 331.92 399.36 Tm
/F4 10 Tf
0.0147 Tc 1.4231 Tw ( commands that establish URL) Tj
-223.9772 -12.0547 TD 0.0122 Tc 1.0296 Tw (redirects. These are useful if you change the names of pages and want the old) Tj
0 -12.0547 TD 0.0236 Tc -0.0324 Tw (names to still work.) Tj
24.1095 -12.0547 TD 0.0165 Tc 1.9437 Tw (The administration module has a limited set of application-direct URLs) Tj
-24.1095 -12.0547 TD 0.0158 Tc -0.0379 Tw (because the simple application-direct mechanism doesn\222t provide the right hooks) Tj
0 -12.0547 TD 0.0113 Tc 0.4622 Tw (to check authentication credentials. The HTML+Tcl templates work better with) Tj
T* 0.0056 Tc -0.0143 Tw (the authentication schemes. ) Tj
24.1095 -30.1369 TD /F2 10 Tf
0.029 Tc -0.0578 Tw (Sending Email) Tj
0 -18.0821 TD /F4 10 Tf
0.0176 Tc 2.3845 Tw (The ) Tj
ET
BT
155.88 279.36 TD
/F5 9 Tf
-0.024 Tc 0 Tw (/mail) Tj
ET
BT
0.9955 0 0 0.9955 182.76 279.36 Tm
/F4 10 Tf
0.009 Tc 2.353 Tw ( URL is implemented in the ) Tj
ET
BT
327.96 279.36 TD
/F5 9 Tf
0 Tc 0 Tw (mail.tcl) Tj
ET
BT
0.9955 0 0 0.9955 371.04 279.36 Tm
/F4 10 Tf
0.0099 Tc 2.3019 Tw ( file. The mail module) Tj
-263.2757 -12.0547 TD 0.0175 Tc 0.3655 Tw (implements various form handlers that e-mail form data. Currentl) Tj
-1.2738 Tc 0 Tw (y) Tj
0.0219 Tc 0.331 Tw (, it is UNIX-) Tj
0 -12.0547 TD 0.0177 Tc -0.1168 Tw (specific because it uses ) Tj
ET
BT
217.32 255.36 TD
/F5 9 Tf
-0.0071 Tc 0 Tw (/usr/lib/sendmail) Tj
ET
BT
0.9955 0 0 0.9955 309 255.36 Tm
/F4 10 Tf
0.0199 Tc -0.1091 Tw ( to send the mail. It is turned on with) Tj
-200.9527 -12.0547 TD 0.013 Tc 0.0385 Tw (this command in the default configuration file:) Tj
ET
BT
144.96 230.04 TD
/F5 9 Tf
-0.0092 Tc 0.0092 Tw (Mail_Url /mail) Tj
ET
BT
0.9955 0 0 0.9955 132.96 216.36 Tm
/F4 10 Tf
0.0193 Tc 1.6355 Tw (The application-direct URLs shown in ) Tj
-0.1033 Tc 1.7827 Tw (Table ) Tj
217.5882 0 TD 0.0204 Tc 1.5983 Tw (18\22611 are useful form han-) Tj
-241.6977 -12.0547 TD -0.0326 Tc 1.109 Tw (dlers. ) Tj
-1.0158 Tc 0 Tw (Y) Tj
0.0173 Tc 1.0388 Tw (ou can specify them as the ) Tj
ET
BT
275.04 204.36 TD
/F5 9 Tf
0 Tc 0 Tw (ACTION) Tj
ET
BT
0.9955 0 0 0.9955 307.44 204.36 Tm
/F4 10 Tf
0.0149 Tc 1.0312 Tw ( parameter in your ) Tj
ET
BT
401.28 204.36 TD
/F5 9 Tf
0 Tc 0 Tw (