home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / tcl / tut / tcl.ppres < prev    next >
Encoding:
Text File  |  1993-02-01  |  45.5 KB  |  1,063 lines

  1. # ppres data_file
  2.  
  3. # This file contains a presentation prepared by
  4. # Perspecta Presents 1.09
  5.  
  6. dictdefine itemlook Drawing -fg Black -lp Solid -bg White -fp Solid -width 1.00 -dash solid -arrow none -feather White -dir 0
  7. dictdefine itemlook Arrows -fg Black -lp Solid -bg White -fp Solid -width 1.00 -dash solid -arrow head -feather White -dir 0
  8. dictdefine itemlook TextBox -fg None -lp Solid -bg None -fp Solid -width 1.00 -dash solid -arrow none -feather Black -dir 0
  9. dictdefine paralook Title -family Times -color Blue -pointsize 36 -bold 1 -italic 0 -underline 0 -left 0.00 -indent 0.00 -right 0.00 -top 0.00 -bottom 0.00 -linespace 1.20 -linespacetype 1 -paraspace 1.20 -paraspacetype 1 -justify left -tabs { 36 72 108 144 180 216 252 288} -powertext None
  10. dictdefine paralook Text -family Times -color Black -pointsize 24 -bold 0 -italic 0 -underline 0 -left 0.00 -indent 0.00 -right 0.00 -top 0.00 -bottom 0.00 -linespace 1.00 -linespacetype 1 -paraspace 1.00 -paraspacetype 1 -justify left -tabs { 36 72 108 144 180 216 252 288 324 360 396} -powertext None
  11. dictdefine paralook Heading -family Times -color Black -pointsize 24 -bold 1 -italic 0 -underline 0 -left 0.00 -indent 0.00 -right 0.00 -top 0.00 -bottom 0.00 -linespace 1.00 -linespacetype 1 -paraspace 1.50 -paraspacetype 1 -justify left -tabs { 36 72 108 144 180 216 252 288 324 360 396} -powertext None
  12. dictdefine paralook Subheading -family Times -color Black -pointsize 24 -bold 0 -italic 0 -underline 0 -left 36.00 -indent 0.00 -right 0.00 -top 0.00 -bottom 0.00 -linespace 1.00 -linespacetype 1 -paraspace 1.50 -paraspacetype 1 -justify left -tabs { 36 72 108 144 180 216 252 288 324 360 396} -powertext None
  13. dictdefine paralook BHeading -family Times -color Black -pointsize 24 -bold 0 -italic 0 -underline 0 -left 18.00 -indent -18.00 -right 0.00 -top 0.00 -bottom 0.00 -linespace 1.00 -linespacetype 1 -paraspace 1.50 -paraspacetype 1 -justify left -tabs { 18 54 90 126 162 198 234 270 306 342 378} -powertext Bullets
  14. dictdefine paralook BSubheading -family Times -color Black -pointsize 24 -bold 0 -italic 0 -underline 0 -left 54.00 -indent -18.00 -right 0.00 -top 0.00 -bottom 0.00 -linespace 1.20 -linespacetype 1 -paraspace 1.50 -paraspacetype 1 -justify left -tabs { 54 90 126 162 198 234 270 306 342 378} -powertext Bullets
  15. dictdefine paralook I.Heading -family Times -color Black -pointsize 24 -bold 1 -italic 0 -underline 0 -left 36.00 -indent -36.00 -right 0.00 -top 0.00 -bottom 0.00 -linespace 1.00 -linespacetype 1 -paraspace 1.50 -paraspacetype 1 -justify left -tabs { 36 72 108 144 180 216 252 288 324 360 396} -powertext Roman
  16. dictdefine paralook 1.Heading -family Times -color Black -pointsize 24 -bold 1 -italic 0 -underline 0 -left 36.00 -indent -36.00 -right 0.00 -top 0.00 -bottom 0.00 -linespace 1.00 -linespacetype 1 -paraspace 1.50 -paraspacetype 1 -justify left -tabs { 36 72 108 144 180 216 252 288 324 360 396} -powertext Numbers
  17. dictdefine paralook A.Subheading -family Times -color Black -pointsize 24 -bold 0 -italic 0 -underline 0 -left 63.00 -indent -27.00 -right 0.00 -top 0.00 -bottom 0.00 -linespace 1.00 -linespacetype 1 -paraspace 1.50 -paraspacetype 1 -justify left -tabs { 72 108 144 180 216 252 288 324 360 396} -powertext Letters
  18. dictdefine paralook 1.Subheading -family Times -color Black -pointsize 24 -bold 0 -italic 0 -underline 0 -left 90.00 -indent -27.00 -right 0.00 -top 0.00 -bottom 0.00 -linespace 1.00 -linespacetype 1 -paraspace 1.50 -paraspacetype 1 -justify left -tabs { 108 144 180 216 252 288 324 360 396} -powertext Numbers
  19. dictdefine paralook (a)Subheading -family Times -color Black -pointsize 24 -bold 0 -italic 0 -underline 0 -left 126.00 -indent -36.00 -right 0.00 -top 0.00 -bottom 0.00 -linespace 1.00 -linespacetype 1 -paraspace 1.50 -paraspacetype 1 -justify left -tabs { 144 180 216 252 288 324 360 396} -powertext Letters(lc)
  20. dictdefine paralook i.Subheading -family Times -color Black -pointsize 24 -bold 0 -italic 0 -underline 0 -left 162.00 -indent -36.00 -right 0.00 -top 0.00 -bottom 0.00 -linespace 1.00 -linespacetype 1 -paraspace 1.50 -paraspacetype 1 -justify left -tabs { 180 216 252 288 324 360 396} -powertext Roman(lc)
  21. dictdefine paralook Code -family Courier -color Green -pointsize 24 -bold 1 -italic 0 -underline 0 -left 36.00 -indent 0.00 -right 0.00 -top 0.00 -bottom 0.00 -linespace 1.00 -linespacetype 1 -paraspace 1.20 -paraspacetype 1 -justify left -tabs { 36 72 108 144 180 216 252 288 324 360 396} -powertext None
  22. dictdefine color Black #000000
  23. dictdefine color White #ffffff
  24. dictdefine color Red #ff0000
  25. dictdefine color Orange #ffa500
  26. dictdefine color Yellow #ffff00
  27. dictdefine color Green #00ff00
  28. dictdefine color Blue #00beff
  29. dictdefine color Purple #ca00e1
  30. dictdefine color Grey #c0c0c0
  31. talk itemconfig  -look Drawing -fg Red -bg Green -width 1.00 -arrow head -feather White -dir 90
  32. talk textconfig  -look TextBox
  33. talk paraconfig  -look Text
  34. set talk(textUnits) i
  35. set talk(featherSwatches) 16
  36. set talk(noteOrientation) v
  37. set talk(backgOrientation) v
  38. set talk(featherPrint) 1
  39. set talk(gridGridi) 8
  40. set talk(windowZoom) 1
  41. set talk(pointsize) {8 10 12 14 18 22 24 36}
  42. set talk(grid) 9
  43. set talk(textGridc) 5
  44. set talk(pagesize) {612 792}
  45. set talk(gridUnits) i
  46. set talk(textGridi) 8
  47. set talk(featherBlend) color
  48. set talk(spacing) {0.00 0.50 1.00 1.2 1.50 1.75 2.00 2.5 3.00 4.0}
  49. set talk(featherDisplay) 1
  50. set talk(printLevel) 2
  51. set talk(customUnits) i
  52. set talk(gridGridc) 5
  53. view active 1backg
  54. orientation - v
  55. set ti [new - title "54 95 558 140.956" -look TextBox];
  56. tiformat $ti 0 0 0 1 -revert 1;
  57. insert $ti shift -revert 1;
  58. tlconfig $ti cursor  -look Title -justify center;
  59. insert $ti shift -revert 1;
  60. insert $ti shift -color Blue;
  61. insert $ti shift -string "Title"  -color Blue;
  62. tiformat $ti 0 5 0 6 -color Blue;
  63. set ti;
  64.  
  65. view active 2backg
  66. orientation - v
  67. set ti [new - title "45 63.5 567 109.456" -look TextBox];
  68. tiformat $ti 0 0 0 1 -revert 1;
  69. insert $ti shift -revert 1;
  70. tlconfig $ti cursor  -look Title;
  71. insert $ti shift -revert 1;
  72. insert $ti shift -string "Title" ;
  73. set ti;
  74. new - rectangle "27 108 585 114.75" -look Drawing -fg None -bg Blue -fp Blend -width 0.50 -feather White -dir 90
  75. set ti [new - textitem "387 702 585 718.004" -look TextBox];
  76. tiformat $ti 0 0 0 1 -revert 1;
  77. insert $ti shift -revert 1;
  78. tlconfig $ti cursor  -look Text -justify right;
  79. insert $ti shift -revert 1;
  80. insert $ti shift -family Helvetica -pointsize 12;
  81. insert $ti shift -string "Writing Tcl scripts, slide "  -family Helvetica -pointsize 12;
  82. set id [PowerCreate 1 $ti cursor {Page Number} Numbers { -family Helvetica -pointsize 12} -1 { 6 }];
  83. insert $ti shift -string "."  -family Helvetica -pointsize 12;
  84. tiformat $ti 0 31 0 32 -pointsize 12;
  85. set ti;
  86.  
  87. view active 3backg
  88. orientation - v
  89. set ti [new - title "45 63.5 567 109.456" -look TextBox];
  90. tiformat $ti 0 0 0 1 -revert 1;
  91. insert $ti shift -revert 1;
  92. tlconfig $ti cursor  -look Title;
  93. insert $ti shift -revert 1;
  94. insert $ti shift -string "Title" ;
  95. set ti;
  96. new - rectangle "27 108 585 114.75" -look Drawing -fg None -bg Blue -fp Blend -width 0.50 -feather White -dir 90
  97. set ti [new - textitem "387 702 585 717.428" -look TextBox];
  98. tiformat $ti 0 0 0 1 -revert 1;
  99. insert $ti shift -revert 1;
  100. tlconfig $ti cursor  -look Text;
  101. insert $ti shift -revert 1;
  102. insert $ti shift -pointsize 12;
  103. insert $ti shift -string "WRL update talk, 10/27/92, slide "  -pointsize 12;
  104. set id [PowerCreate 1 $ti cursor {Page Number} Numbers { -pointsize 12} -1 { 3 }];
  105. insert $ti shift -string "."  -pointsize 12;
  106. tiformat $ti 0 37 0 38 -pointsize 12;
  107. set ti;
  108.  
  109. view active 1slide
  110. backg - 1
  111. set ti [new - title "27 140 585 241.0288" -look TextBox];
  112. tiformat $ti 0 0 0 1 -revert 1;
  113. insert $ti shift -revert 1;
  114. tlconfig $ti cursor  -look Title -justify center;
  115. insert $ti shift -revert 1;
  116. insert $ti shift -string "An Introduction" ;
  117. insertPara $ti shift ;
  118. insert $ti shift -string "To Writing Tcl Scripts" ;
  119. set ti;
  120. set ti [new - textitem "27 423 585 636.824" -look TextBox];
  121. tiformat $ti 0 0 0 1 -revert 1;
  122. insert $ti shift -revert 1;
  123. tlconfig $ti cursor  -look Heading -paraspace 1.00 -justify center;
  124. insert $ti shift -revert 1;
  125. insert $ti shift -color Red -bold 0 -italic 0 -underline 0;
  126. insert $ti shift -string "John Ousterhout"  -color Red -bold 0 -italic 0 -underline 0;
  127. insertPara $ti shift ;
  128. insertPara $ti shift  -color -1;
  129. insertPara $ti shift ;
  130. insert $ti shift -string "Computer Science Division"  -bold 0 -italic 0 -underline 0;
  131. insertPara $ti shift ;
  132. insert $ti shift -string "Department of EECS"  -bold 0 -italic 0 -underline 0;
  133. insertPara $ti shift ;
  134. insertPara $ti shift ;
  135. insert $ti shift -string "University of California at Berkeley"  -bold 0 -italic 0 -underline 0;
  136. tiformat $ti 6 36 6 37 -bold 0 -italic 0 -underline 0;
  137. set ti;
  138. set ti [new - textitem "81 270 126 301.304" -look TextBox];
  139. tiformat $ti 0 0 0 1 -revert 1;
  140. insert $ti shift -revert 1;
  141. tlconfig $ti cursor  -look Heading;
  142. insert $ti shift -revert 1;
  143. set ti;
  144.  
  145. view active 1note
  146. orientation - v
  147. icon - 100.45455 40 0.67171717
  148.  
  149. view active 2slide
  150. backg - 2
  151. set ti [new - title "45 63.5 567 109.456" -look TextBox];
  152. tiformat $ti 0 0 0 1 -revert 1;
  153. insert $ti shift -revert 1;
  154. tlconfig $ti cursor  -look Title;
  155. insert $ti shift -revert 1;
  156. insert $ti shift -string "Language Overview" ;
  157. set ti;
  158. set ti [new - textitem "45 171 585 502.2368" -look TextBox];
  159. tiformat $ti 0 0 0 1 -revert 1;
  160. insert $ti shift -revert 1;
  161. tlconfig $ti cursor  -look Heading;
  162. insert $ti shift -revert 1;
  163. insert $ti shift -string " Two parts to learning Tcl:" ;
  164. insertPara $ti shift ;
  165. insertPara $ti shift ;
  166. tlconfig $ti cursor -plook { -color Red} -look 1.Heading;
  167. insert $ti shift -string "Syntax and substitution rules:" ;
  168. insertPara $ti shift ;
  169. tlconfig $ti cursor  -look Subheading;
  170. insert $ti shift -string "Substitutions simple but may be confusing at first." ;
  171. insertPara $ti shift ;
  172. tlconfig $ti cursor  -look Heading;
  173. insertPara $ti shift ;
  174. tlconfig $ti cursor -plook { -color Red} -look 1.Heading;
  175. insert $ti shift -string "Built-in commands:" ;
  176. insertPara $ti shift ;
  177. tlconfig $ti cursor  -look Subheading;
  178. insert $ti shift -string "Can learn individually as needed." ;
  179. insertPara $ti shift ;
  180. insert $ti shift -string "Control structures are commands, not syntax." ;
  181. set ti;
  182.  
  183. view active 3slide
  184. backg - 2
  185. set ti [new - title "45 63.5 567 109.456" -look TextBox];
  186. tiformat $ti 0 0 0 1 -revert 1;
  187. insert $ti shift -revert 1;
  188. tlconfig $ti cursor  -look Title;
  189. insert $ti shift -revert 1;
  190. insert $ti shift -string "Basics" ;
  191. set ti;
  192. set ti [new - textitem "45 144 585 661.57748" -look TextBox];
  193. tiformat $ti 0 0 0 1 -revert 1;
  194. insert $ti shift -revert 1;
  195. tlconfig $ti cursor  -look Heading;
  196. insert $ti shift -revert 1;
  197. insert $ti shift -string "Tcl script =" ;
  198. insertPara $ti shift ;
  199. tlconfig $ti cursor -plook { -color Red} -look BSubheading;
  200. insert $ti shift -string "Sequence of commands." ;
  201. insertPara $ti shift ;
  202. tlconfig $ti cursor -plook { -color Red};
  203. insert $ti shift -string "Commands separated by newlines, semi-colons." ;
  204. insertPara $ti shift ;
  205. tlconfig $ti cursor  -look Heading -paraspace 2.50;
  206. insert $ti shift -string "Tcl command =" ;
  207. insertPara $ti shift ;
  208. tlconfig $ti cursor -plook { -color Red} -look BSubheading;
  209. insert $ti shift -string "One or more words separated by spaces." ;
  210. insertPara $ti shift ;
  211. tlconfig $ti cursor -plook { -color Red};
  212. insert $ti shift -string "First word is command name, others are arguments." ;
  213. insertPara $ti shift ;
  214. tlconfig $ti cursor  -look Heading -paraspace 2.50;
  215. insert $ti shift -string "Examples:" ;
  216. insertPara $ti shift ;
  217. tlconfig $ti cursor  -look Code -paraspace 1.75;
  218. insert $ti shift -string "set a 22\; set b 33" ;
  219. insertPara $ti shift ;
  220. tlconfig $ti cursor  -paraspace -1;
  221. insertPara $ti shift ;
  222. insert $ti shift -string "set a 22" ;
  223. insertPara $ti shift ;
  224. tlconfig $ti cursor  -paraspace 1.00;
  225. insert $ti shift -string "set b 33" ;
  226. set ti;
  227.  
  228. view active 4slide
  229. backg - 2
  230. set ti [new - title "45 63.5 567 109.456" -look TextBox];
  231. tiformat $ti 0 0 0 1 -revert 1;
  232. insert $ti shift -revert 1;
  233. tlconfig $ti cursor  -look Title;
  234. insert $ti shift -revert 1;
  235. insert $ti shift -string "Division of Responsibility" ;
  236. set ti;
  237. new - rectangle "45 180 306 198" -look Drawing -fg Black -bg Green -width 1.00 -feather White -dir 90
  238. new - rectangle "144 333 189 351" -look Drawing -fg Black -bg Green -width 1.00 -feather White -dir 90;
  239. new - rectangle "144 360 225 378" -look Drawing -fg Black -bg Green -width 1.00 -feather White -dir 90;
  240. new - rectangle "144 387 171 405" -look Drawing -fg Black -bg Green -width 1.00 -feather White -dir 90;
  241. new - rectangle "144 414 198 432" -look Drawing -fg Black -bg Green -width 1.00 -feather White -dir 90;
  242. new - rectangle "144 441 198 459" -look Drawing -fg Black -bg Green -width 1.00 -feather White -dir 90;
  243. group - 5
  244. new - rectangle "117 243 243 288" -look Drawing -fg Black -bg None -width 0.50 -feather White -dir 90;
  245. set ti [new - textitem "121.84615 251.072 238.15385 279.928" -look TextBox];
  246. tiformat $ti 0 0 0 1 -revert 1;
  247. insert $ti shift -revert 1;
  248. tlconfig $ti cursor  -look Text -justify center;
  249. insert $ti shift -revert 1;
  250. insert $ti shift -string "Tcl Parser" ;
  251. set ti;;
  252. group - 2
  253. new - line "180 207 180 234" -look Drawing -fg Black -width 1.00 -arrow head
  254. new - line "180 297 180 324" -look Drawing -fg Black -width 1.00 -arrow head
  255. new - line "180 468 180 495" -look Drawing -fg Black -width 1.00 -arrow head
  256. set ti [new - textitem "117.6 511.0688 242.4 568.9312" -look TextBox];
  257. tiformat $ti 0 0 0 1 -revert 1;
  258. insert $ti shift -revert 1;
  259. tlconfig $ti cursor  -look Text -justify center;
  260. insert $ti shift -revert 1;
  261. insert $ti shift -string "Command" ;
  262. insertPara $ti shift ;
  263. insert $ti shift -string "Procedure" ;
  264. set ti;
  265. new - rectangle "108 504 252 576" -look Drawing -fg Black -bg None -width 0.50 -feather White -dir 90
  266. new - line "180 585 180 612" -look Drawing -fg Black -width 1.00 -arrow head
  267. new - rectangle "126 621 234 639" -look Drawing -fg Black -bg Green -width 1.00 -feather White -dir 90
  268. set ti [new - textitem "270 227.4176 558 303.5824" -look TextBox];
  269. tiformat $ti 0 0 0 1 -revert 1;
  270. insert $ti shift -revert 1;
  271. tlconfig $ti cursor  -look Text;
  272. insert $ti shift -revert 1;
  273. insert $ti shift -string "Chops command into words, makes substitutions.  " ;
  274. insert $ti shift -color Red;
  275. insert $ti shift -string "Does not interpret values of words."  -color Red;
  276. set ti;
  277. set ti [new - textitem "279 513.7448 549 566.2552" -look TextBox];
  278. tiformat $ti 0 0 0 1 -revert 1;
  279. insert $ti shift -revert 1;
  280. tlconfig $ti cursor  -look Text;
  281. insert $ti shift -revert 1;
  282. insert $ti shift -string "Interprets words, produces string result." ;
  283. set ti;
  284. set ti [new - textitem "324 174.572 504 203.428" -look TextBox];
  285. tiformat $ti 0 0 0 1 -revert 1;
  286. insert $ti shift -revert 1;
  287. tlconfig $ti cursor  -look Text;
  288. insert $ti shift -revert 1;
  289. insert $ti shift -color Green;
  290. insert $ti shift -string "Command"  -color Green;
  291. tiformat $ti 0 7 0 8 -color Green;
  292. set ti;
  293. set ti [new - textitem "243 381.572 378 410.428" -look TextBox];
  294. tiformat $ti 0 0 0 1 -revert 1;
  295. insert $ti shift -revert 1;
  296. tlconfig $ti cursor  -look Text;
  297. insert $ti shift -revert 1;
  298. insert $ti shift -color Green;
  299. insert $ti shift -string "Words"  -color Green;
  300. set ti;
  301. set ti [new - textitem "252 615.572 423 644.428" -look TextBox];
  302. tiformat $ti 0 0 0 1 -revert 1;
  303. insert $ti shift -revert 1;
  304. tlconfig $ti cursor  -look Text;
  305. insert $ti shift -revert 1;
  306. insert $ti shift -color Green;
  307. insert $ti shift -string "Result"  -color Green;
  308. set ti;
  309.  
  310. view active 5slide
  311. backg - 2
  312. set ti [new - title "45 63.5 567 109.456" -look TextBox];
  313. tiformat $ti 0 0 0 1 -revert 1;
  314. insert $ti shift -revert 1;
  315. tlconfig $ti cursor  -look Title;
  316. insert $ti shift -revert 1;
  317. insert $ti shift -string "Arguments" ;
  318. set ti;
  319. set ti [new - textitem "45 153 585 642.6056" -look TextBox];
  320. tiformat $ti 0 0 0 1 -revert 1;
  321. insert $ti shift -revert 1;
  322. tlconfig $ti cursor  -look Heading;
  323. insert $ti shift -revert 1;
  324. insert $ti shift -string "Parser assigns no meaning to arguments" ;
  325. insertPara $ti shift ;
  326. tlconfig $ti cursor  -paraspace 1.00;
  327. insert $ti shift -string "(quoting by default, evaluation is special):" ;
  328. insertPara $ti shift ;
  329. tlconfig $ti cursor  -look Subheading;
  330. insert $ti shift -color Red -bold 1;
  331. insert $ti shift -string "C"  -color Red -bold 1;
  332. insert $ti shift -bold -1;
  333. insert $ti shift -string ":"  -color Red;
  334. insert $ti shift -color -1;
  335. insert $ti shift -string "        " ;
  336. insert $ti shift -family Courier -color Green -bold 1;
  337. insert $ti shift -string "x = 4\; y = x+10"  -family Courier -color Green -bold 1;
  338. insert $ti shift -family -1;
  339. insert $ti shift -string "\;"  -color Green -bold 1;
  340. insertPara $ti shift  -color -1 -bold -1;
  341. tlconfig $ti cursor  -paraspace 1.00;
  342. insert $ti shift -string "        " ;
  343. insert $ti shift -italic 1;
  344. insert $ti shift -string "y is 14"  -italic 1;
  345. insertPara $ti shift  -italic -1;
  346. tlconfig $ti cursor  -paraspace -1;
  347. insert $ti shift -color Red -bold 1;
  348. insert $ti shift -string "Tcl:"  -color Red -bold 1;
  349. insert $ti shift -color -1 -bold -1;
  350. insert $ti shift -string "    " ;
  351. insert $ti shift -family Courier -color Green -bold 1;
  352. insert $ti shift -string "set x 4\; set y x+10"  -family Courier -color Green -bold 1;
  353. insertPara $ti shift  -family -1 -color -1 -bold -1;
  354. tlconfig $ti cursor  -paraspace 1.00;
  355. insert $ti shift -string "        " ;
  356. insert $ti shift -italic 1;
  357. insert $ti shift -string "y is ``x+10''"  -italic 1;
  358. insertPara $ti shift ;
  359. tlconfig $ti cursor  -look Heading -paraspace 2.50;
  360. insert $ti shift -italic -1;
  361. insert $ti shift -string "Different commands assign different meanings to their arguments:" ;
  362. insertPara $ti shift ;
  363. tlconfig $ti cursor  -look Code -paraspace 1.50;
  364. insert $ti shift -string "set a 122" ;
  365. insertPara $ti shift ;
  366. tlconfig $ti cursor  -paraspace -1;
  367. insert $ti shift -string "expr 24/3.2" ;
  368. insertPara $ti shift ;
  369. insert $ti shift -string "eval \"set a 122\"" ;
  370. insertPara $ti shift ;
  371. insert $ti shift -string "button .b -text Hello -fg red" ;
  372. insertPara $ti shift ;
  373. insert $ti shift -string "string length Abracadabra" ;
  374. set ti;
  375.  
  376. view active 6slide
  377. backg - 2
  378. set ti [new - title "45 63.5 567 109.456" -look TextBox];
  379. tiformat $ti 0 0 0 1 -revert 1;
  380. insert $ti shift -revert 1;
  381. tlconfig $ti cursor  -look Title;
  382. insert $ti shift -revert 1;
  383. insert $ti shift -string "Variable Substitution" ;
  384. set ti;
  385. set ti [new - textitem "45 153 585 634.9232" -look TextBox];
  386. tiformat $ti 0 0 0 1 -revert 1;
  387. insert $ti shift -revert 1;
  388. tlconfig $ti cursor -plook { -color Red} -look BHeading;
  389. insert $ti shift -revert 1;
  390. insert $ti shift -string "Syntax: " ;
  391. insert $ti shift -family Courier -color Red -bold 1;
  392. insert $ti shift -string "\$"  -family Courier -color Red -bold 1;
  393. insert $ti shift -family -1 -bold -1 -italic 1;
  394. insert $ti shift -string "varName"  -color Red -italic 1;
  395. insertPara $ti shift  -color -1 -italic -1;
  396. tlconfig $ti cursor -plook { -color Red};
  397. insert $ti shift -string "Variable name is letters, digits, underscores." ;
  398. insertPara $ti shift  -family Courier;
  399. tlconfig $ti cursor -plook { -color Red};
  400. insert $ti shift -string "May occur anywhere within a word." ;
  401. insertPara $ti shift ;
  402. tlconfig $ti cursor  -look Heading -left 0.00 -indent 0.00 -paraspace 3.00 -tabs { 288};
  403. insert $ti shift -string "Sample command    Result" ;
  404. insertPara $ti shift  -color Red;
  405. tlconfig $ti cursor  -paraspace -1;
  406. insert $ti shift -family Courier -color Green -bold 1 -italic 0 -underline 0;
  407. insert $ti shift -string "set b 66    66"  -family Courier -color Green -bold 1 -italic 0 -underline 0;
  408. insertPara $ti shift ;
  409. tlconfig $ti cursor ;
  410. insert $ti shift -string "set a b    b"  -family Courier -color Green -bold 1 -italic 0 -underline 0;
  411. insertPara $ti shift ;
  412. tlconfig $ti cursor ;
  413. insert $ti shift -string "set a \$b    66"  -family Courier -color Green -bold 1 -italic 0 -underline 0;
  414. insertPara $ti shift ;
  415. tlconfig $ti cursor ;
  416. insert $ti shift -string "set a \$b+\$b+\$b    66+66+66"  -family Courier -color Green -bold 1 -italic 0 -underline 0;
  417. insertPara $ti shift ;
  418. tlconfig $ti cursor ;
  419. insert $ti shift -string "set a \$b.3    66.3"  -family Courier -color Green -bold 1 -italic 0 -underline 0;
  420. insertPara $ti shift ;
  421. tlconfig $ti cursor ;
  422. insert $ti shift -string "set a \$b4"  -family Courier -color Green -bold 1 -italic 0 -underline 0;
  423. insert $ti shift -color -1 -bold 0;
  424. insert $ti shift -string "    "  -family Courier -bold 0 -italic 0 -underline 0;
  425. insert $ti shift -family -1 -italic 1;
  426. insert $ti shift -string "no such variable"  -bold 0 -italic 1 -underline 0;
  427. tiformat $ti 9 26 9 27 -bold 0 -italic 1 -underline 0;
  428. set ti;
  429.  
  430. view active 7slide
  431. backg - 2
  432. set ti [new - title "45 63.5 567 109.456" -look TextBox];
  433. tiformat $ti 0 0 0 1 -revert 1;
  434. insert $ti shift -revert 1;
  435. tlconfig $ti cursor  -look Title;
  436. insert $ti shift -revert 1;
  437. insert $ti shift -string "Command Substitution" ;
  438. set ti;
  439. set ti [new - textitem "45 153 585 586.973" -look TextBox];
  440. tiformat $ti 0 0 0 1 -revert 1;
  441. insert $ti shift -revert 1;
  442. tlconfig $ti cursor -plook { -color Red} -look BHeading;
  443. insert $ti shift -revert 1;
  444. insert $ti shift -string "Syntax: " ;
  445. insert $ti shift -family Courier -color Red -bold 1 -italic 0 -underline 0;
  446. insert $ti shift -string "\["  -family Courier -color Red -bold 1 -italic 0 -underline 0;
  447. insert $ti shift -family Times -bold 0 -italic 1;
  448. insert $ti shift -string "script"  -family Times -color Red -bold 0 -italic 1 -underline 0;
  449. insert $ti shift -family Courier -bold 1 -italic 0;
  450. insert $ti shift -string "\]"  -family Courier -color Red -bold 1 -italic 0 -underline 0;
  451. insertPara $ti shift  -bold -1 -underline -1;
  452. tlconfig $ti cursor -plook { -color Red} -paraspace 2.50;
  453. insert $ti shift -string "Execute script, substitute result." ;
  454. insertPara $ti shift ;
  455. tlconfig $ti cursor -plook { -color Red};
  456. insert $ti shift -string "May occur anywhere within a word." ;
  457. insertPara $ti shift ;
  458. tlconfig $ti cursor  -look Heading -left 0.00 -indent 0.00 -paraspace 4.00 -tabs { 396};
  459. insert $ti shift -string "Sample Command    Result" ;
  460. insertPara $ti shift ;
  461. tlconfig $ti cursor  -paraspace 1.75;
  462. insert $ti shift -family Courier -color Green -bold 1 -italic 0 -underline 0;
  463. insert $ti shift -string "set b 8    8"  -family Courier -color Green -bold 1 -italic 0 -underline 0;
  464. insertPara $ti shift ;
  465. tlconfig $ti cursor ;
  466. insert $ti shift -string "set a \[expr \$b+2\]    10"  -family Courier -color Green -bold 1 -italic 0 -underline 0;
  467. insertPara $ti shift ;
  468. tlconfig $ti cursor ;
  469. insert $ti shift -string "set a \"b-3 is \[expr \$b-3\]\"    b-3 is 5"  -family Courier -color Green -bold 1 -italic 0 -underline 0;
  470. tiformat $ti 6 35 6 36 -family Courier -color Green -bold 1 -italic 0 -underline 0;
  471. set ti;
  472.  
  473. view active 8slide
  474. backg - 2
  475. set ti [new - title "45 63.5 567 109.456" -look TextBox];
  476. tiformat $ti 0 0 0 1 -revert 1;
  477. insert $ti shift -revert 1;
  478. tlconfig $ti cursor  -look Title;
  479. insert $ti shift -revert 1;
  480. insert $ti shift -string "Controlling Word Structure" ;
  481. set ti;
  482. set ti [new - textitem "45 153 585 604.0964" -look TextBox];
  483. tiformat $ti 0 0 0 1 -revert 1;
  484. insert $ti shift -revert 1;
  485. tlconfig $ti cursor  -look Heading;
  486. insert $ti shift -revert 1;
  487. insert $ti shift -string "Words break at white space and semi-colons, except:" ;
  488. insertPara $ti shift ;
  489. tlconfig $ti cursor -plook { -color Red} -look BSubheading;
  490. insert $ti shift -string "Double-quotes prevent breaks:" ;
  491. insertPara $ti shift ;
  492. tlconfig $ti cursor  -look Code;
  493. insert $ti shift -string "        set a \"Funny word\; has spaces\"" ;
  494. insertPara $ti shift ;
  495. tlconfig $ti cursor -plook { -color Red} -look BSubheading;
  496. insert $ti shift -string "Curly braces prevent breaks and substitutions:" ;
  497. insertPara $ti shift ;
  498. tlconfig $ti cursor  -look Code;
  499. insert $ti shift -string "        set a \{nested \{\} braces\}" ;
  500. insertPara $ti shift ;
  501. tlconfig $ti cursor -plook { -color Red} -look BSubheading;
  502. insert $ti shift -string "Backslashes quote special characters:" ;
  503. insertPara $ti shift ;
  504. tlconfig $ti cursor  -look Code;
  505. insert $ti shift -string "        set a word\\ with\\ \\\$\\ and\\ space" ;
  506. insertPara $ti shift ;
  507. tlconfig $ti cursor  -look Heading -paraspace 3.00;
  508. insert $ti shift -string "Substitutions don't change word structure:" ;
  509. insertPara $ti shift ;
  510. tlconfig $ti cursor  -look Code -paraspace 1.50;
  511. insert $ti shift -string "        set a \"two words\"" ;
  512. insertPara $ti shift ;
  513. tlconfig $ti cursor  -paraspace -1;
  514. insert $ti shift -string "        set b \$a" ;
  515. set ti;
  516.  
  517. view active 9slide
  518. backg - 2
  519. set ti [new - title "45 63.5 567 109.456" -look TextBox];
  520. tiformat $ti 0 0 0 1 -revert 1;
  521. insert $ti shift -revert 1;
  522. tlconfig $ti cursor  -look Title;
  523. insert $ti shift -revert 1;
  524. insert $ti shift -string "Expressions" ;
  525. set ti;
  526. set ti [new - textitem "45 135 585 648.134" -look TextBox];
  527. tiformat $ti 0 0 0 1 -revert 1;
  528. insert $ti shift -revert 1;
  529. tlconfig $ti cursor -plook { -color Red} -look BHeading;
  530. insert $ti shift -revert 1;
  531. insert $ti shift -string "C-like (int and double), extra support for string operations." ;
  532. insertPara $ti shift ;
  533. tlconfig $ti cursor -plook { -color Red};
  534. insert $ti shift -string "Support for command and variable substitution     within expressions. " ;
  535. insertPara $ti shift ;
  536. tlconfig $ti cursor -plook { -color Red};
  537. insert $ti shift -string "Used in " ;
  538. insert $ti shift -family Courier -bold 1;
  539. insert $ti shift -string "expr"  -family Courier -bold 1;
  540. insert $ti shift -family -1 -bold -1;
  541. insert $ti shift -string ", other commands." ;
  542. insertPara $ti shift ;
  543. tlconfig $ti cursor  -look Heading -left 0.00 -indent 0.00 -paraspace 2.50 -tabs { 324 360 396};
  544. insert $ti shift -string "Sample command    Result" ;
  545. insertPara $ti shift ;
  546. tlconfig $ti cursor  -paraspace -1;
  547. insert $ti shift -family Courier -color Green -bold 1 -italic 0 -underline 0;
  548. insert $ti shift -string "set b 5    5"  -family Courier -color Green -bold 1 -italic 0 -underline 0;
  549. insertPara $ti shift ;
  550. tlconfig $ti cursor ;
  551. insert $ti shift -string "expr (\$b*4)-3    17"  -family Courier -color Green -bold 1 -italic 0 -underline 0;
  552. insertPara $ti shift ;
  553. tlconfig $ti cursor ;
  554. insert $ti shift -string "expr \$b<=2    0"  -family Courier -color Green -bold 1 -italic 0 -underline 0;
  555. insertPara $ti shift ;
  556. tlconfig $ti cursor ;
  557. insert $ti shift -string "expr \{\$b * \[fac 4\]\}    120"  -family Courier -color Green -bold 1 -italic 0 -underline 0;
  558. insertPara $ti shift ;
  559. tlconfig $ti cursor ;
  560. insert $ti shift -string "set a Bill    Bill"  -family Courier -color Green -bold 1 -italic 0 -underline 0;
  561. insertPara $ti shift ;
  562. tlconfig $ti cursor ;
  563. insert $ti shift -string "expr \{\$a < \"Anne\"\}    0"  -family Courier -color Green -bold 1 -italic 0 -underline 0;
  564. tiformat $ti 9 20 9 21 -family Courier -color Green -bold 1 -italic 0 -underline 0;
  565. set ti;
  566.  
  567. view active 10slide
  568. backg - 2
  569. set ti [new - title "45 63.5 567 109.456" -look TextBox];
  570. tiformat $ti 0 0 0 1 -revert 1;
  571. insert $ti shift -revert 1;
  572. tlconfig $ti cursor  -look Title;
  573. insert $ti shift -revert 1;
  574. insert $ti shift -string "Lists" ;
  575. set ti;
  576. set ti [new - textitem "36 153 585 668.672" -look TextBox];
  577. tiformat $ti 0 0 0 1 -revert 1;
  578. insert $ti shift -revert 1;
  579. tlconfig $ti cursor -plook { -color Red} -look BHeading;
  580. insert $ti shift -revert 1;
  581. insert $ti shift -string "Zero or more elements separated by white space:" ;
  582. insertPara $ti shift ;
  583. tlconfig $ti cursor  -look Code;
  584. insert $ti shift -string "red green blue" ;
  585. insertPara $ti shift ;
  586. tlconfig $ti cursor -plook { -color Red} -look BHeading -paraspace 2.00;
  587. insert $ti shift -string "Braces and backslashes for grouping:" ;
  588. insertPara $ti shift ;
  589. tlconfig $ti cursor  -look Code;
  590. insert $ti shift -string "a b \{c d e\} f" ;
  591. insertPara $ti shift ;
  592. insert $ti shift -string "one\\ word two three" ;
  593. insertPara $ti shift ;
  594. tlconfig $ti cursor -plook { -color Red} -look BHeading -paraspace 2.00;
  595. insert $ti shift -string "List-related commands:" ;
  596. insertPara $ti shift ;
  597. tlconfig $ti cursor  -look Code -left 36.00 -indent 0.00 -tabs { 36 180 324 360 396};
  598. insert $ti shift -string "concat    linsert    lreplace" ;
  599. insertPara $ti shift ;
  600. tlconfig $ti cursor ;
  601. insert $ti shift -string "foreach    list    lsearch" ;
  602. insertPara $ti shift ;
  603. tlconfig $ti cursor ;
  604. insert $ti shift -string "lappend    llength    lsort" ;
  605. insertPara $ti shift ;
  606. tlconfig $ti cursor ;
  607. insert $ti shift -string "lindex    lrange" ;
  608. insertPara $ti shift ;
  609. tlconfig $ti cursor -plook { -color Red} -look BHeading -paraspace 2.00;
  610. insert $ti shift -string "Example:" ;
  611. insertPara $ti shift ;
  612. tlconfig $ti cursor  -look Code;
  613. insert $ti shift -string "lindex \{a b \{c d e\} f\} 2" ;
  614. insertPara $ti shift ;
  615. insert $ti shift -color Red;
  616. insert $ti shift -string "c d e"  -color Red;
  617. set ti;
  618. set ti [new - textitem "81 207 99 238.304" -look TextBox];
  619. tiformat $ti 0 0 0 1 -revert 1;
  620. insert $ti shift -revert 1;
  621. tlconfig $ti cursor  -look Heading;
  622. insert $ti shift -revert 1;
  623. set ti;
  624.  
  625. view active 11slide
  626. backg - 2
  627. set ti [new - title "45 63.5 567 109.456" -look TextBox];
  628. tiformat $ti 0 0 0 1 -revert 1;
  629. insert $ti shift -revert 1;
  630. tlconfig $ti cursor  -look Title;
  631. insert $ti shift -revert 1;
  632. insert $ti shift -string "Control Structures" ;
  633. set ti;
  634. set ti [new - textitem "45 144 585 632.6168" -look TextBox];
  635. tiformat $ti 0 0 0 1 -revert 1;
  636. insert $ti shift -revert 1;
  637. tlconfig $ti cursor -plook { -color Red} -look BHeading;
  638. insert $ti shift -revert 1;
  639. insert $ti shift -string "C-like appearance." ;
  640. insertPara $ti shift ;
  641. tlconfig $ti cursor -plook { -color Red} -paraspace 2.00;
  642. insert $ti shift -string "No new syntax: just commands that take Tcl scripts as arguments." ;
  643. insertPara $ti shift ;
  644. tlconfig $ti cursor -plook { -color Red};
  645. insert $ti shift -string "Example:" ;
  646. insertPara $ti shift ;
  647. tlconfig $ti cursor  -look Code -paraspace 1.50;
  648. insert $ti shift -string "if \{\$x < 3\} \{" ;
  649. insertPara $ti shift ;
  650. tlconfig $ti cursor  -paraspace 1.00;
  651. insert $ti shift -string "        puts stdout \"x is too small!\"" ;
  652. insertPara $ti shift ;
  653. insert $ti shift -string "        set x 3" ;
  654. insertPara $ti shift ;
  655. insert $ti shift -string "\}" ;
  656. insertPara $ti shift ;
  657. tlconfig $ti cursor -plook { -color Red} -look BHeading -paraspace 2.00;
  658. insert $ti shift -string "Commands:" ;
  659. insertPara $ti shift ;
  660. tlconfig $ti cursor  -look Code -left 36.00 -indent 0.00 -paraspace 1.50 -tabs { 252 288 324 360 396};
  661. insert $ti shift -string "if    case" ;
  662. insertPara $ti shift ;
  663. tlconfig $ti cursor  -paraspace 1.00;
  664. insert $ti shift -string "for    break" ;
  665. insertPara $ti shift ;
  666. tlconfig $ti cursor ;
  667. insert $ti shift -string "foreach    continue" ;
  668. insertPara $ti shift ;
  669. tlconfig $ti cursor ;
  670. insert $ti shift -string "while    eval" ;
  671. set ti;
  672.  
  673. view active 12slide
  674. backg - 2
  675. set ti [new - title "45 63.5 567 109.456" -look TextBox];
  676. tiformat $ti 0 0 0 1 -revert 1;
  677. insert $ti shift -revert 1;
  678. tlconfig $ti cursor  -look Title;
  679. insert $ti shift -revert 1;
  680. insert $ti shift -string "Procedures" ;
  681. set ti;
  682. set ti [new - textitem "45 144 585 214.1264" -look TextBox];
  683. tiformat $ti 0 0 0 1 -revert 1;
  684. insert $ti shift -revert 1;
  685. tlconfig $ti cursor -plook { -color Red} -look BHeading;
  686. insert $ti shift -revert 1;
  687. insert $ti shift -string "proc"  -family Courier -bold 1;
  688. insert $ti shift -family -1 -bold -1;
  689. insert $ti shift -string " command defines procedure:" ;
  690. insertPara $ti shift ;
  691. tlconfig $ti cursor  -look Code;
  692. insert $ti shift -string "proc sub1 x \{expr \$x-1\}" ;
  693. set ti;
  694. set ti [new - textitem "81 219.572 144 248.428" -look TextBox];
  695. tiformat $ti 0 0 0 1 -revert 1;
  696. insert $ti shift -revert 1;
  697. tlconfig $ti cursor  -look Text -justify right;
  698. insert $ti shift -revert 1;
  699. insert $ti shift -color Red;
  700. insert $ti shift -string "name"  -color Red;
  701. set ti;
  702. set ti [new - textitem "378 219.572 459 248.428" -look TextBox];
  703. tiformat $ti 0 0 0 1 -revert 1;
  704. insert $ti shift -revert 1;
  705. tlconfig $ti cursor  -look Text -justify left;
  706. insert $ti shift -revert 1;
  707. insert $ti shift -color Red;
  708. insert $ti shift -string "body"  -color Red;
  709. tiformat $ti 0 4 0 5 -color Red;
  710. set ti;
  711. set ti [new - textitem "121.5 252 346.5 280.856" -look TextBox];
  712. tiformat $ti 0 0 0 1 -revert 1;
  713. insert $ti shift -revert 1;
  714. tlconfig $ti cursor  -look Text -justify center;
  715. insert $ti shift -revert 1;
  716. insert $ti shift -color Red;
  717. insert $ti shift -string "list of argument names"  -color Red;
  718. tiformat $ti 0 22 0 23 -color Red;
  719. set ti;
  720. new - line "153 234 180 234 180 207" -look Drawing -fg Red -width 1.00 -arrow head
  721. new - line "234 252 234 207" -look Drawing -fg Red -width 1.00 -arrow head
  722. new - line "369 234 333 234 333 207" -look Drawing -fg Red -width 1.00 -arrow head
  723. set ti [new - textitem "45 306 585 554.4128" -look TextBox];
  724. tiformat $ti 0 0 0 1 -revert 1;
  725. insert $ti shift -revert 1;
  726. tlconfig $ti cursor -plook { -color Red} -look BHeading;
  727. insert $ti shift -revert 1;
  728. insert $ti shift -string "Procedures behave just like built-in commands:" ;
  729. insertPara $ti shift ;
  730. tlconfig $ti cursor  -look Code;
  731. insert $ti shift -string "sub1 3                " ;
  732. insert $ti shift -family Times;
  733. insert $ti shift -string "returns"  -family Times;
  734. insert $ti shift -family -1;
  735. insert $ti shift -string " 2" ;
  736. insertPara $ti shift ;
  737. tlconfig $ti cursor -plook { -color Red} -look BHeading -paraspace 2.00;
  738. insert $ti shift -string "Arguments can have defaults:" ;
  739. insertPara $ti shift ;
  740. tlconfig $ti cursor  -look Code;
  741. insert $ti shift -string "proc decr \{x \{y 1\}\} \{expr \$x-\$y\}" ;
  742. insertPara $ti shift ;
  743. tlconfig $ti cursor -plook { -color Red} -look BHeading -paraspace 2.00;
  744. insert $ti shift -string "Can have variable number of arguments:" ;
  745. insertPara $ti shift ;
  746. tlconfig $ti cursor  -look Code;
  747. insert $ti shift -string "proc foo \{a b args\} \{ ... \}" ;
  748. set ti;
  749. new - line "310.5 585 310.5 558" -look Drawing -fg Red -width 1.00 -arrow head
  750. set ti [new - textitem "207 585 414 613.856" -look TextBox];
  751. tiformat $ti 0 0 0 1 -revert 1;
  752. insert $ti shift -revert 1;
  753. tlconfig $ti cursor  -look Text -justify center;
  754. insert $ti shift -revert 1;
  755. insert $ti shift -color Red;
  756. insert $ti shift -string "gets list of extra args"  -color Red;
  757. set ti;
  758. set ti [new - textitem "45 621 585 654.272" -look TextBox];
  759. tiformat $ti 0 0 0 1 -revert 1;
  760. insert $ti shift -revert 1;
  761. tlconfig $ti cursor -plook { -color Red} -look BHeading;
  762. insert $ti shift -revert 1;
  763. insert $ti shift -string "Scoping: local and global variables." ;
  764. set ti;
  765.  
  766. view active 13slide
  767. backg - 2
  768. set ti [new - title "45 63.5 567 109.456" -look TextBox];
  769. tiformat $ti 0 0 0 1 -revert 1;
  770. insert $ti shift -revert 1;
  771. tlconfig $ti cursor  -look Title;
  772. insert $ti shift -revert 1;
  773. insert $ti shift -string "Errors" ;
  774. set ti;
  775. set ti [new - textitem "45 135 585 712.0384" -look TextBox];
  776. tiformat $ti 0 0 0 1 -revert 1;
  777. insert $ti shift -revert 1;
  778. tlconfig $ti cursor -plook { -color Red} -look BHeading;
  779. insert $ti shift -revert 1;
  780. insert $ti shift -string "Errors normally abort commands in progress, application displays message:" ;
  781. insertPara $ti shift ;
  782. tlconfig $ti cursor  -look Code -paraspace 1.50;
  783. insert $ti shift -pointsize 22;
  784. insert $ti shift -string "set n 0"  -pointsize 22;
  785. insertPara $ti shift ;
  786. tlconfig $ti cursor  -paraspace 0.00;
  787. insert $ti shift -string "foreach i \{1 2 3 4 5\} \{"  -pointsize 22;
  788. insertPara $ti shift ;
  789. insert $ti shift -string "        set n \[expr \{\$n + i*i\}\]"  -pointsize 22;
  790. insertPara $ti shift ;
  791. insert $ti shift -string "\}"  -pointsize 22;
  792. insertPara $ti shift ;
  793. insert $ti shift -color Red;
  794. insert $ti shift -string "syntax error in expression \"\$n + i*i\""  -color Red -pointsize 22;
  795. insertPara $ti shift  -color -1;
  796. tlconfig $ti cursor -plook { -color Red} -look BHeading -paraspace 2.50;
  797. insert $ti shift -string "Global variable " ;
  798. insert $ti shift -family Courier -bold 1;
  799. insert $ti shift -string "errorInfo"  -family Courier -bold 1;
  800. insert $ti shift -family -1 -bold -1;
  801. insert $ti shift -string " provides stack trace:" ;
  802. insertPara $ti shift  -pointsize 22;
  803. tlconfig $ti cursor  -look Code -paraspace 1.50;
  804. insert $ti shift -string "set errorInfo"  -pointsize 22;
  805. insertPara $ti shift ;
  806. tlconfig $ti cursor  -paraspace 0.00;
  807. insert $ti shift -color Red;
  808. insert $ti shift -string "syntax error in expression \"\$n + i*i\""  -color Red -pointsize 22;
  809. insertPara $ti shift ;
  810. insert $ti shift -string "    while executing"  -color Red -pointsize 22;
  811. insertPara $ti shift ;
  812. insert $ti shift -string "\"expr \{\$n + i*i\}\""  -color Red -pointsize 22;
  813. insertPara $ti shift ;
  814. insert $ti shift -string "    invoked from within"  -color Red -pointsize 22;
  815. insertPara $ti shift ;
  816. insert $ti shift -string "\"set n \[expr \{\$n + i*i\}\]...\""  -color Red -pointsize 22;
  817. insertPara $ti shift ;
  818. insert $ti shift -string "    (\"foreach\" body line 2)"  -color Red -pointsize 22;
  819. insertPara $ti shift ;
  820. insert $ti shift -string "    invoked from within"  -color Red -pointsize 22;
  821. insertPara $ti shift ;
  822. insert $ti shift -string "\"foreach i \{1 2 3 4 5\} \{"  -color Red -pointsize 22;
  823. insertPara $ti shift ;
  824. insert $ti shift -string "    set n \[expr \{\$n + i*i\}\]"  -color Red -pointsize 22;
  825. insertPara $ti shift ;
  826. insert $ti shift -string "\}\""  -color Red -pointsize 22;
  827. tiformat $ti 17 2 17 3 -pointsize 22;
  828. set ti;
  829.  
  830. view active 14slide
  831. backg - 2
  832. set ti [new - title "45 63.5 567 109.456" -look TextBox];
  833. tiformat $ti 0 0 0 1 -revert 1;
  834. insert $ti shift -revert 1;
  835. tlconfig $ti cursor  -look Title;
  836. insert $ti shift -revert 1;
  837. insert $ti shift -string "Advanced Error Handling" ;
  838. set ti;
  839. set ti [new - textitem "45 162 585 534.79328" -look TextBox];
  840. tiformat $ti 0 0 0 1 -revert 1;
  841. insert $ti shift -revert 1;
  842. tlconfig $ti cursor -plook { -color Red} -look BHeading;
  843. insert $ti shift -revert 1;
  844. insert $ti shift -string "Can catch errors:" ;
  845. insertPara $ti shift ;
  846. tlconfig $ti cursor  -look Code;
  847. insert $ti shift -string "catch \{expr \{2 +\}\} msg" ;
  848. insertPara $ti shift ;
  849. insert $ti shift -color Red;
  850. insert $ti shift -string "1"  -color Red;
  851. insertPara $ti shift ;
  852. insert $ti shift -color -1;
  853. insert $ti shift -string "set msg" ;
  854. insertPara $ti shift ;
  855. insert $ti shift -color Red;
  856. insert $ti shift -string "syntax error in expression \"2 +\""  -color Red;
  857. insertPara $ti shift  -color -1;
  858. tlconfig $ti cursor -plook { -color Red} -look BHeading -paraspace 2.50;
  859. insert $ti shift -string "Can generate errors:" ;
  860. insertPara $ti shift ;
  861. tlconfig $ti cursor  -look Code;
  862. insert $ti shift -string "error \"bad argument\"" ;
  863. insertPara $ti shift ;
  864. tlconfig $ti cursor -plook { -color Red} -look BHeading -linespace 1.20 -paraspace 2.50;
  865. insert $ti shift -string "Global variable " ;
  866. insert $ti shift -family Courier -bold 1;
  867. insert $ti shift -string "errorCode"  -family Courier -bold 1;
  868. insert $ti shift -family -1 -bold -1;
  869. insert $ti shift -string " holds machine-readable information about errors (e.g. UNIX " ;
  870. insert $ti shift -family Courier -bold 1;
  871. insert $ti shift -string "errno"  -family Courier -bold 1;
  872. insert $ti shift -family -1 -bold -1;
  873. insert $ti shift -string " value)." ;
  874. set ti;
  875.  
  876. view active 15slide
  877. backg - 2
  878. set ti [new - title "45 63.5 567 109.456" -look TextBox];
  879. tiformat $ti 0 0 0 1 -revert 1;
  880. insert $ti shift -revert 1;
  881. tlconfig $ti cursor  -look Title;
  882. insert $ti shift -revert 1;
  883. insert $ti shift -string "Additional Tcl Features" ;
  884. set ti;
  885. set ti [new - textitem "45 153 585 651.572" -look TextBox];
  886. tiformat $ti 0 0 0 1 -revert 1;
  887. insert $ti shift -revert 1;
  888. tlconfig $ti cursor  -look Heading;
  889. insert $ti shift -revert 1;
  890. insert $ti shift -color Red;
  891. insert $ti shift -string "1."  -color Red;
  892. insert $ti shift -color -1;
  893. insert $ti shift -string " String manipulation commands:" ;
  894. insertPara $ti shift ;
  895. tlconfig $ti cursor  -look Code -left 36.00 -indent 0.00 -paraspace 1.50 -tabs { 180 324 360 396};
  896. insert $ti shift -string "string    format    split" ;
  897. insertPara $ti shift ;
  898. tlconfig $ti cursor  -paraspace 1.20;
  899. insert $ti shift -string "regexp    scan    join" ;
  900. insertPara $ti shift ;
  901. tlconfig $ti cursor  -look Heading;
  902. insert $ti shift -color Red;
  903. insert $ti shift -string "2."  -color Red;
  904. insert $ti shift -color -1;
  905. insert $ti shift -string " File I/O commands:" ;
  906. insertPara $ti shift ;
  907. tlconfig $ti cursor  -look Code -left 36.00 -indent 0.00 -paraspace 1.50 -tabs { 180 324 360 396};
  908. insert $ti shift -string "open    seek    file" ;
  909. insertPara $ti shift ;
  910. tlconfig $ti cursor  -paraspace 1.20;
  911. insert $ti shift -string "close    tell    glob" ;
  912. insertPara $ti shift ;
  913. tlconfig $ti cursor ;
  914. insert $ti shift -string "gets    flush    cd" ;
  915. insertPara $ti shift ;
  916. tlconfig $ti cursor ;
  917. insert $ti shift -string "read    eof    pwd" ;
  918. insertPara $ti shift ;
  919. tlconfig $ti cursor ;
  920. insert $ti shift -string "puts    source" ;
  921. insertPara $ti shift ;
  922. tlconfig $ti cursor  -look Heading -paraspace 2.00;
  923. insert $ti shift -color Red;
  924. insert $ti shift -string "3."  -color Red;
  925. insert $ti shift -color -1;
  926. insert $ti shift -string " Subprocesses with " ;
  927. insert $ti shift -family Courier -bold 1 -italic 0 -underline 0;
  928. insert $ti shift -string "exec"  -family Courier -bold 1 -italic 0 -underline 0;
  929. insert $ti shift -family -1 -bold -1 -italic -1 -underline -1;
  930. insert $ti shift -string " command:" ;
  931. insertPara $ti shift ;
  932. tlconfig $ti cursor  -look Code -paraspace 1.50;
  933. insert $ti shift -string "exec grep foo << \$input | wc" ;
  934. insertPara $ti shift ;
  935. tlconfig $ti cursor  -look Heading -paraspace 2.00;
  936. insert $ti shift -color Red;
  937. insert $ti shift -string "4."  -color Red;
  938. insert $ti shift -color -1;
  939. insert $ti shift -string " History (" ;
  940. insert $ti shift -family Courier -bold 1 -italic 0 -underline 0;
  941. insert $ti shift -string "history"  -family Courier -bold 1 -italic 0 -underline 0;
  942. insert $ti shift -family -1 -bold -1 -italic -1 -underline -1;
  943. insert $ti shift -string " command)." ;
  944. set ti;
  945.  
  946. view active 16slide
  947. backg - 2
  948. set ti [new - title "45 63.5 567 109.456" -look TextBox];
  949. tiformat $ti 0 0 0 1 -revert 1;
  950. insert $ti shift -revert 1;
  951. tlconfig $ti cursor  -look Title;
  952. insert $ti shift -revert 1;
  953. insert $ti shift -string "Add" ;
  954. insert $ti shift -color Blue;
  955. insert $ti shift -string "iti"  -color Blue;
  956. insert $ti shift -color -1;
  957. insert $ti shift -string "onal Tcl Features, cont'd" ;
  958. set ti;
  959. set ti [new - textitem "45 135 585 655.8524" -look TextBox];
  960. tiformat $ti 0 0 0 1 -revert 1;
  961. insert $ti shift -revert 1;
  962. tlconfig $ti cursor  -look Heading;
  963. insert $ti shift -revert 1;
  964. insert $ti shift -color Red;
  965. insert $ti shift -string "5."  -color Red;
  966. insert $ti shift -color -1;
  967. insert $ti shift -string " Associative arrays:" ;
  968. insertPara $ti shift ;
  969. tlconfig $ti cursor  -look Code -paraspace 1.50;
  970. insert $ti shift -string "set x(fred)44" ;
  971. insertPara $ti shift ;
  972. tlconfig $ti cursor  -paraspace -1;
  973. insert $ti shift -string "set x(2) \[expr \$x(fred)+6\]" ;
  974. insertPara $ti shift ;
  975. insert $ti shift -string "array names x" ;
  976. insertPara $ti shift ;
  977. insert $ti shift -color Red;
  978. insert $ti shift -string "fred 2"  -color Red;
  979. insertPara $ti shift ;
  980. tlconfig $ti cursor  -look Heading -paraspace 2.00;
  981. insert $ti shift -string "6. "  -color Red;
  982. insert $ti shift -color -1;
  983. insert $ti shift -string "Variable scoping:" ;
  984. insertPara $ti shift ;
  985. tlconfig $ti cursor  -look Code -left 36.00 -indent 0.00 -paraspace 1.50 -tabs { 180 324 360 396};
  986. insert $ti shift -string "global    uplevel    upvar" ;
  987. insertPara $ti shift ;
  988. tlconfig $ti cursor  -look Heading -paraspace 2.00;
  989. insert $ti shift -color Red;
  990. insert $ti shift -string "7."  -color Red;
  991. insert $ti shift -color -1;
  992. insert $ti shift -string " Autoloading: " ;
  993. insertPara $ti shift ;
  994. tlconfig $ti cursor  -look BSubheading -paraspace 1.50;
  995. insert $ti shift -string "Tcl procedures loaded on demand." ;
  996. insertPara $ti shift ;
  997. insert $ti shift -string "Search path of directories." ;
  998. insertPara $ti shift ;
  999. tlconfig $ti cursor  -look Heading -paraspace 2.00;
  1000. insert $ti shift -color Red;
  1001. insert $ti shift -string "8."  -color Red;
  1002. insert $ti shift -color -1;
  1003. insert $ti shift -string " Access to Tcl internals:" ;
  1004. insertPara $ti shift ;
  1005. tlconfig $ti cursor  -look Code -left 36.00 -indent 0.00 -paraspace 1.50 -tabs { 180 324 360 396};
  1006. insert $ti shift -string "info    rename    trace" ;
  1007. set ti;
  1008.  
  1009. view active 17slide
  1010. backg - 2
  1011. set ti [new - title "45 63.5 567 109.456" -look TextBox];
  1012. tiformat $ti 0 0 0 1 -revert 1;
  1013. insert $ti shift -revert 1;
  1014. tlconfig $ti cursor  -look Title;
  1015. insert $ti shift -revert 1;
  1016. insert $ti shift -string "Tcl Syntax Summary" ;
  1017. set ti;
  1018. set ti [new - textitem "45 153 585 664.604" -look TextBox];
  1019. tiformat $ti 0 0 0 1 -revert 1;
  1020. insert $ti shift -revert 1;
  1021. tlconfig $ti cursor -plook { -color Red -bold 0 -italic 0 -underline 0} -look 1.Heading -paraspace 2.00;
  1022. insert $ti shift -revert 1;
  1023. insert $ti shift -string "Script = commands separated by newlines, semi-colons."  -bold 0 -italic 0 -underline 0;
  1024. insertPara $ti shift ;
  1025. tlconfig $ti cursor -plook { -color Red -bold 0 -italic 0 -underline 0};
  1026. insert $ti shift -string "Command = words separated by white space."  -bold 0 -italic 0 -underline 0;
  1027. insertPara $ti shift ;
  1028. tlconfig $ti cursor -plook { -color Red -bold 0 -italic 0 -underline 0};
  1029. insert $ti shift -string "\$"  -family Courier -bold 1 -italic 0 -underline 0;
  1030. insert $ti shift -family -1 -bold 0;
  1031. insert $ti shift -string " causes variable substitution."  -bold 0 -italic 0 -underline 0;
  1032. insertPara $ti shift ;
  1033. tlconfig $ti cursor -plook { -color Red -bold 0 -italic 0 -underline 0};
  1034. insert $ti shift -string "\[\]"  -family Courier -bold 1 -italic 0 -underline 0;
  1035. insert $ti shift -family -1 -bold 0;
  1036. insert $ti shift -string " causes command substitution."  -bold 0 -italic 0 -underline 0;
  1037. insertPara $ti shift ;
  1038. tlconfig $ti cursor -plook { -color Red -bold 0 -italic 0 -underline 0};
  1039. insert $ti shift -string "\"\""  -family Courier -bold 1 -italic 0 -underline 0;
  1040. insert $ti shift -family -1 -bold 0;
  1041. insert $ti shift -string " quotes white space and semi-colons."  -bold 0 -italic 0 -underline 0;
  1042. insertPara $ti shift ;
  1043. tlconfig $ti cursor -plook { -color Red -bold 0 -italic 0 -underline 0};
  1044. insert $ti shift -string "\{\}"  -family Courier -bold 1 -italic 0 -underline 0;
  1045. insert $ti shift -family -1 -bold 0;
  1046. insert $ti shift -string " quotes all special characters."  -bold 0 -italic 0 -underline 0;
  1047. insertPara $ti shift ;
  1048. tlconfig $ti cursor -plook { -color Red -bold 0 -italic 0 -underline 0};
  1049. insert $ti shift -string "\\"  -family Courier -bold 1 -italic 0 -underline 0;
  1050. insert $ti shift -family -1 -bold 0;
  1051. insert $ti shift -string " quotes next character, provides C-like substitutions."  -bold 0 -italic 0 -underline 0;
  1052. insertPara $ti shift ;
  1053. tlconfig $ti cursor -plook { -color Red -bold 0 -italic 0 -underline 0};
  1054. insert $ti shift -string "#"  -family Courier -bold 1 -italic 0 -underline 0;
  1055. insert $ti shift -family -1 -bold 0;
  1056. insert $ti shift -string " for comments (must be at beginning of command)."  -bold 0 -italic 0 -underline 0;
  1057. tiformat $ti 7 54 7 55 -bold 0 -italic 0 -underline 0;
  1058. set ti;
  1059.  
  1060. MakeWindow slide 6 0 .views.1 683x831+2+8
  1061. SpotConfig .views.1 0 1 1 on
  1062. UpdateTitles; set generateName 2
  1063.