home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / tcl / tut / tclc.ppres < prev    next >
Encoding:
Text File  |  1993-02-01  |  47.0 KB  |  1,067 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 {} -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.20 -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.20 -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.20 -linespacetype 1 -paraspace 1.50 -paraspacetype 1 -justify left -tabs { 54 90 126 162 198 234 270 306 342 378 414} -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 414} -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.20 -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 0 -italic 0 -underline 0 -left 36.00 -indent -36.00 -right 0.00 -top 0.00 -bottom 0.00 -linespace 1.20 -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 72.00 -indent -36.00 -right 0.00 -top 0.00 -bottom 0.00 -linespace 1.20 -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 72.00 -indent -36.00 -right 0.00 -top 0.00 -bottom 0.00 -linespace 1.20 -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 72.00 -indent -36.00 -right 0.00 -top 0.00 -bottom 0.00 -linespace 1.20 -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 72.00 -indent -36.00 -right 0.00 -top 0.00 -bottom 0.00 -linespace 1.20 -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.00 -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 Blue -bg Red -fp Solid -width 1.00 -arrow head -feather White -dir 90
  32. talk textconfig  -look TextBox
  33. talk paraconfig  -look BHeading
  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 20 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 "Tcl C Interfaces, slide "  -family Helvetica -pointsize 12;
  82. set id [PowerCreate 1 $ti cursor {Page Number} Numbers { -family Helvetica -pointsize 12} -1 { 13 }];
  83. insert $ti shift -string "."  -family Helvetica -pointsize 12;
  84. tiformat $ti 0 29 0 30 -pointsize 12;
  85. set ti;
  86.  
  87. view active 1slide
  88. backg - 1
  89. set ti [new - title "27 140 585 241.0288" -look TextBox];
  90. tiformat $ti 0 0 0 1 -revert 1;
  91. insert $ti shift -revert 1;
  92. tlconfig $ti cursor  -look Title -justify center;
  93. insert $ti shift -revert 1;
  94. insert $ti shift -string "Writing Tcl-Based Applications" ;
  95. insertPara $ti shift ;
  96. insert $ti shift -string "In C" ;
  97. set ti;
  98. set ti [new - textitem "27 423 585 636.824" -look TextBox];
  99. tiformat $ti 0 0 0 1 -revert 1;
  100. insert $ti shift -revert 1;
  101. tlconfig $ti cursor  -look Heading -paraspace 1.00 -justify center;
  102. insert $ti shift -revert 1;
  103. insert $ti shift -color Red -bold 0 -italic 0 -underline 0;
  104. insert $ti shift -string "John Ousterhout"  -color Red -bold 0 -italic 0 -underline 0;
  105. insertPara $ti shift ;
  106. insertPara $ti shift  -color -1;
  107. insertPara $ti shift ;
  108. insert $ti shift -string "Computer Science Division"  -bold 0 -italic 0 -underline 0;
  109. insertPara $ti shift ;
  110. insert $ti shift -string "Department of EECS"  -bold 0 -italic 0 -underline 0;
  111. insertPara $ti shift ;
  112. insertPara $ti shift ;
  113. insert $ti shift -string "University of California at Berkeley"  -bold 0 -italic 0 -underline 0;
  114. tiformat $ti 6 36 6 37 -bold 0 -italic 0 -underline 0;
  115. set ti;
  116. set ti [new - textitem "81 270 126 301.304" -look TextBox];
  117. tiformat $ti 0 0 0 1 -revert 1;
  118. insert $ti shift -revert 1;
  119. tlconfig $ti cursor  -look Heading;
  120. insert $ti shift -revert 1;
  121. set ti;
  122.  
  123. view active 1note
  124. orientation - v
  125. icon - 100.45455 40 0.67171717
  126.  
  127. view active 2slide
  128. backg - 2
  129. set ti [new - title "45 63.5 567 109.456" -look TextBox];
  130. tiformat $ti 0 0 0 1 -revert 1;
  131. insert $ti shift -revert 1;
  132. tlconfig $ti cursor  -look Title;
  133. insert $ti shift -revert 1;
  134. insert $ti shift -string "Outline" ;
  135. set ti;
  136. set ti [new - textitem "36 180 594 637.11968" -look TextBox];
  137. tiformat $ti 0 0 0 1 -revert 1;
  138. insert $ti shift -revert 1;
  139. tlconfig $ti cursor -plook { -color Red} -look 1.Heading -paraspace 4.00;
  140. insert $ti shift -revert 1;
  141. insert $ti shift -string "Philosophy: focus on " ;
  142. insert $ti shift -color Red;
  143. insert $ti shift -string "primitives"  -color Red;
  144. insert $ti shift -color -1;
  145. insert $ti shift -string "." ;
  146. insertPara $ti shift ;
  147. tlconfig $ti cursor -plook { -color Red};
  148. insert $ti shift -string "Basics: interpreters, executing scripts." ;
  149. insertPara $ti shift ;
  150. tlconfig $ti cursor -plook { -color Red};
  151. insert $ti shift -string "Implementing new commands." ;
  152. insertPara $ti shift ;
  153. tlconfig $ti cursor -plook { -color Red};
  154. insert $ti shift -string "Managing the result string." ;
  155. insertPara $ti shift ;
  156. tlconfig $ti cursor -plook { -color Red};
  157. insert $ti shift -string "Useful library procedures: parsing, variables,  list manipulation, hash tables." ;
  158. set ti;
  159.  
  160. view active 3slide
  161. backg - 2
  162. set ti [new - title "45 63.5 567 109.456" -look TextBox];
  163. tiformat $ti 0 0 0 1 -revert 1;
  164. insert $ti shift -revert 1;
  165. tlconfig $ti cursor  -look Title;
  166. insert $ti shift -revert 1;
  167. insert $ti shift -string "Philosophy" ;
  168. set ti;
  169. set ti [new - textitem "36 171 594 617.52896" -look TextBox];
  170. tiformat $ti 0 0 0 1 -revert 1;
  171. insert $ti shift -revert 1;
  172. tlconfig $ti cursor -plook { -color Red} -look BHeading;
  173. insert $ti shift -revert 1;
  174. insert $ti shift -string "Take advantage of Tcl as scripting language." ;
  175. insertPara $ti shift ;
  176. tlconfig $ti cursor -plook { -color Red} -paraspace 2.50;
  177. insert $ti shift -string "Application should:" ;
  178. insertPara $ti shift ;
  179. tlconfig $ti cursor -plook { -color Red} -look (a)Subheading -paraspace 2.00;
  180. insert $ti shift -string "Implement new kinds of objects in C." ;
  181. insertPara $ti shift ;
  182. tlconfig $ti cursor -plook { -color Red};
  183. insert $ti shift -string "Define textual names for objects (to use in Tcl commands)." ;
  184. insertPara $ti shift ;
  185. tlconfig $ti cursor -plook { -color Red};
  186. insert $ti shift -string "Implement primitive operations on objects as Tcl commands." ;
  187. insertPara $ti shift ;
  188. tlconfig $ti cursor -plook { -color Red} -look BHeading -paraspace 2.50;
  189. insert $ti shift -string "Build complex features as Tcl scripts." ;
  190. insertPara $ti shift ;
  191. tlconfig $ti cursor -plook { -color Red};
  192. insert $ti shift -string "For C code, focus on clean, orthogonal " ;
  193. insert $ti shift -color Red;
  194. insert $ti shift -string "primitives"  -color Red;
  195. insert $ti shift -color -1;
  196. insert $ti shift -string "." ;
  197. set ti;
  198.  
  199. view active 4slide
  200. backg - 2
  201. set ti [new - title "45 63.5 567 109.456" -look TextBox];
  202. tiformat $ti 0 0 0 1 -revert 1;
  203. insert $ti shift -revert 1;
  204. tlconfig $ti cursor  -look Title;
  205. insert $ti shift -revert 1;
  206. insert $ti shift -string "Interpreters" ;
  207. set ti;
  208. set ti [new - textitem "36 153 594 624.13568" -look TextBox];
  209. tiformat $ti 0 0 0 1 -revert 1;
  210. insert $ti shift -revert 1;
  211. tlconfig $ti cursor -plook { -color Red} -look BHeading;
  212. insert $ti shift -revert 1;
  213. insert $ti shift -string "Tcl_Interp data structure encapsulates execution state:" ;
  214. insertPara $ti shift ;
  215. tlconfig $ti cursor  -look Subheading;
  216. insert $ti shift -string "-  Variables." ;
  217. insertPara $ti shift ;
  218. insert $ti shift -string "-  Commands implemented in C." ;
  219. insertPara $ti shift ;
  220. insert $ti shift -string "-  Tcl procedures." ;
  221. insertPara $ti shift ;
  222. insert $ti shift -string "-  Execution stack." ;
  223. insertPara $ti shift ;
  224. tlconfig $ti cursor -plook { -color Red} -look BHeading -paraspace 2.50;
  225. insert $ti shift -string "Can have many interpreters in a single application (but usually just one)." ;
  226. insertPara $ti shift ;
  227. tlconfig $ti cursor -plook { -color Red};
  228. insert $ti shift -string "Creating and deleting interpreters:" ;
  229. insertPara $ti shift ;
  230. tlconfig $ti cursor  -look Code -paraspace 1.50;
  231. insert $ti shift -string "Tcl_Interp *interp\;" ;
  232. insertPara $ti shift ;
  233. insert $ti shift -string "interp = Tcl_CreateInterp()\;" ;
  234. insertPara $ti shift ;
  235. tlconfig $ti cursor  -paraspace -1;
  236. insert $ti shift -string "Tcl_DeleteInterp(interp)\;" ;
  237. set ti;
  238.  
  239. view active 4note
  240. orientation - v
  241. icon - 100.45455 40 0.67171717
  242.  
  243. view active 5slide
  244. backg - 2
  245. set ti [new - title "45 63.5 567 109.456" -look TextBox];
  246. tiformat $ti 0 0 0 1 -revert 1;
  247. insert $ti shift -revert 1;
  248. tlconfig $ti cursor  -look Title;
  249. insert $ti shift -revert 1;
  250. insert $ti shift -string "Executing Tcl Scripts" ;
  251. set ti;
  252. set ti [new - textitem "9 153 594 302.598" -look TextBox];
  253. tiformat $ti 0 0 0 1 -revert 1;
  254. insert $ti shift -revert 1;
  255. tlconfig $ti cursor  -look Code;
  256. insert $ti shift -revert 1;
  257. insert $ti shift -pointsize 22;
  258. insert $ti shift -string "int code\;"  -pointsize 22;
  259. insertPara $ti shift ;
  260. insert $ti shift -string "code = Tcl_Eval(interp, \"set a 1\", ...)\;"  -pointsize 22;
  261. insertPara $ti shift ;
  262. insert $ti shift -string "code = Tcl_VarEval(interp, \"set a\","  -pointsize 22;
  263. insertPara $ti shift ;
  264. insert $ti shift -string "    \" 1\", (char *) NULL)\;"  -pointsize 22;
  265. insertPara $ti shift ;
  266. insert $ti shift -string "code = Tcl_EvalFile(interp, \"init.tcl\")\;"  -pointsize 22;
  267. tiformat $ti 4 40 4 41 -pointsize 22;
  268. set ti;
  269. set ti [new - textitem "45 333 594 607.34816" -look TextBox];
  270. tiformat $ti 0 0 0 1 -revert 1;
  271. insert $ti shift -revert 1;
  272. tlconfig $ti cursor  -look BHeading;
  273. insert $ti shift -revert 1;
  274. insert $ti shift -string "code"  -family Courier -bold 1;
  275. insert $ti shift -family -1 -bold -1;
  276. insert $ti shift -string " indicates success or failure:" ;
  277. insertPara $ti shift ;
  278. tlconfig $ti cursor  -look Subheading -left 36.00 -indent 0.00 -tabs { 198 252 288 324 360 396};
  279. insert $ti shift -family Courier -color Green -bold 1;
  280. insert $ti shift -string "TCL_OK"  -family Courier -color Green -bold 1;
  281. insert $ti shift -family -1;
  282. insert $ti shift -string ":"  -color Green -bold 1;
  283. insert $ti shift -color -1 -bold -1;
  284. insert $ti shift -string "    normal completion." ;
  285. insertPara $ti shift ;
  286. tlconfig $ti cursor  -paraspace 1.20;
  287. insert $ti shift -family Courier -color Green -bold 1;
  288. insert $ti shift -string "TCL_ERROR"  -family Courier -color Green -bold 1;
  289. insert $ti shift -family -1;
  290. insert $ti shift -string ":"  -color Green -bold 1;
  291. insert $ti shift -color -1 -bold -1;
  292. insert $ti shift -string "    error occurred." ;
  293. insertPara $ti shift ;
  294. tlconfig $ti cursor  -look BHeading -paraspace 2.50;
  295. insert $ti shift -string "interp->result"  -family Courier -color Green -bold 1;
  296. insert $ti shift -family -1 -color -1 -bold -1;
  297. insert $ti shift -string " points to string: result or error message." ;
  298. insertPara $ti shift ;
  299. insert $ti shift -string "Application should display result or message for user." ;
  300. set ti;
  301.  
  302. view active 6slide
  303. backg - 2
  304. set ti [new - title "45 63.5 567 109.456" -look TextBox];
  305. tiformat $ti 0 0 0 1 -revert 1;
  306. insert $ti shift -revert 1;
  307. tlconfig $ti cursor  -look Title;
  308. insert $ti shift -revert 1;
  309. insert $ti shift -string "Where Do Scripts Come From?" ;
  310. set ti;
  311. set ti [new - textitem "36 198 585 467.06048" -look TextBox];
  312. tiformat $ti 0 0 0 1 -revert 1;
  313. insert $ti shift -revert 1;
  314. tlconfig $ti cursor -plook { -color Red} -look BHeading -paraspace 4.00;
  315. insert $ti shift -revert 1;
  316. insert $ti shift -string "Read from standard input (see " ;
  317. insert $ti shift -family Courier -bold 1;
  318. insert $ti shift -string "tclTest.c"  -family Courier -bold 1;
  319. insert $ti shift -family -1 -bold -1;
  320. insert $ti shift -string ")." ;
  321. insertPara $ti shift ;
  322. tlconfig $ti cursor -plook { -color Red};
  323. insert $ti shift -string "Read from script file (see " ;
  324. insert $ti shift -family Courier -bold 1;
  325. insert $ti shift -string "tclTest.c"  -family Courier -bold 1;
  326. insert $ti shift -family -1 -bold -1;
  327. insert $ti shift -string ")." ;
  328. insertPara $ti shift ;
  329. tlconfig $ti cursor -plook { -color Red};
  330. insert $ti shift -string "Associate with X events, wait for events, invoke associated scripts (see " ;
  331. insert $ti shift -family Courier -bold 1;
  332. insert $ti shift -string "main.c"  -family Courier -bold 1;
  333. insert $ti shift -family -1 -bold -1;
  334. insert $ti shift -string " for " ;
  335. insert $ti shift -family Courier -bold 1;
  336. insert $ti shift -string "wish"  -family Courier -bold 1;
  337. insert $ti shift -family -1 -bold -1;
  338. insert $ti shift -string ")." ;
  339. set ti;
  340.  
  341. view active 7slide
  342. backg - 2
  343. set ti [new - title "45 63.5 567 109.456" -look TextBox];
  344. tiformat $ti 0 0 0 1 -revert 1;
  345. insert $ti shift -revert 1;
  346. tlconfig $ti cursor  -look Title;
  347. insert $ti shift -revert 1;
  348. insert $ti shift -string "Creating New Tcl Commands" ;
  349. set ti;
  350. set ti [new - textitem "45 153 603 709.5516" -look TextBox];
  351. tiformat $ti 0 0 0 1 -revert 1;
  352. insert $ti shift -revert 1;
  353. tlconfig $ti cursor -plook { -color Red} -look BHeading;
  354. insert $ti shift -revert 1;
  355. insert $ti shift -string "Write command procedure in C:" ;
  356. insertPara $ti shift ;
  357. tlconfig $ti cursor  -look Code -paraspace 1.50;
  358. insert $ti shift -pointsize 22;
  359. insert $ti shift -string "int cmdProc(ClientData clientData,"  -pointsize 22;
  360. insertPara $ti shift ;
  361. tlconfig $ti cursor  -paraspace 0.00;
  362. insert $ti shift -string "      Tcl_Interp *interp, int argc,"  -pointsize 22;
  363. insertPara $ti shift ;
  364. insert $ti shift -string "      char **argv) \{"  -pointsize 22;
  365. insertPara $ti shift ;
  366. insert $ti shift -string "   if (argc != 3) \{"  -pointsize 22;
  367. insertPara $ti shift ;
  368. insert $ti shift -string "      interp->result = \"wrong # args\"\;"  -pointsize 22;
  369. insertPara $ti shift ;
  370. insert $ti shift -string "      return TCL_ERROR\;"  -pointsize 22;
  371. insertPara $ti shift ;
  372. insert $ti shift -string "   \}"  -pointsize 22;
  373. insertPara $ti shift ;
  374. insert $ti shift -string "   if (strcmp(argv\[1\], argv\[2\]) == 0) \{"  -pointsize 22;
  375. insertPara $ti shift ;
  376. insert $ti shift -string "      interp->result = \"1\"\;"  -pointsize 22;
  377. insertPara $ti shift ;
  378. insert $ti shift -string "   \} else \{"  -pointsize 22;
  379. insertPara $ti shift ;
  380. insert $ti shift -string "      interp->result = \"0\"\;"  -pointsize 22;
  381. insertPara $ti shift ;
  382. insert $ti shift -string "   \}"  -pointsize 22;
  383. insertPara $ti shift ;
  384. insert $ti shift -string "   return TCL_OK\;"  -pointsize 22;
  385. insertPara $ti shift ;
  386. insert $ti shift -string "\}"  -pointsize 22;
  387. insertPara $ti shift ;
  388. tlconfig $ti cursor -plook { -color Red} -look BHeading;
  389. insert $ti shift -string "Register with interpreter:" ;
  390. insertPara $ti shift ;
  391. tlconfig $ti cursor  -look Code -paraspace 1.50;
  392. insert $ti shift -pointsize 22;
  393. insert $ti shift -string "Tcl_CreateCommand(interp, \"eq\","  -pointsize 22;
  394. insertPara $ti shift ;
  395. tlconfig $ti cursor  -paraspace 0.00;
  396. insert $ti shift -string "      cmdProc, (ClientData) NULL, ...)\;"  -pointsize 22;
  397. insertPara $ti shift ;
  398. insert $ti shift -string "Tcl_DeleteCommand(interp, \"eq\")\;"  -pointsize 22;
  399. tiformat $ti 18 32 18 33 -pointsize 22;
  400. set ti;
  401.  
  402. view active 8slide
  403. backg - 2
  404. set ti [new - title "45 63.5 567 109.456" -look TextBox];
  405. tiformat $ti 0 0 0 1 -revert 1;
  406. insert $ti shift -revert 1;
  407. tlconfig $ti cursor  -look Title;
  408. insert $ti shift -revert 1;
  409. insert $ti shift -string "ClientData" ;
  410. set ti;
  411. set ti [new - textitem "9 153 594 287.55" -look TextBox];
  412. tiformat $ti 0 0 0 1 -revert 1;
  413. insert $ti shift -revert 1;
  414. tlconfig $ti cursor  -look Code;
  415. insert $ti shift -revert 1;
  416. insert $ti shift -pointsize 22;
  417. insert $ti shift -string "Tcl_CreateCommand(interp, \"eq\", cmdProc,"  -pointsize 22;
  418. insertPara $ti shift ;
  419. tlconfig $ti cursor  -paraspace 0.00;
  420. insert $ti shift -string "   "  -pointsize 22;
  421. insert $ti shift -color Red;
  422. insert $ti shift -string "clientData"  -color Red -pointsize 22;
  423. insert $ti shift -color -1;
  424. insert $ti shift -string ", ...)\;"  -pointsize 22;
  425. insertPara $ti shift ;
  426. insert $ti shift -string "int cmdProc("  -pointsize 22;
  427. insert $ti shift -color Red;
  428. insert $ti shift -string "ClientData clientData"  -color Red -pointsize 22;
  429. insert $ti shift -color -1;
  430. insert $ti shift -string ", ...) \{"  -pointsize 22;
  431. insertPara $ti shift ;
  432. insert $ti shift -string "   ..."  -pointsize 22;
  433. insertPara $ti shift ;
  434. insert $ti shift -string "\}"  -pointsize 22;
  435. tiformat $ti 4 1 4 2 -pointsize 22;
  436. set ti;
  437. set ti [new - textitem "36 315 576 628.25984" -look TextBox];
  438. tiformat $ti 0 0 0 1 -revert 1;
  439. insert $ti shift -revert 1;
  440. tlconfig $ti cursor -plook { -color Red} -look BHeading -paraspace 2.50;
  441. insert $ti shift -revert 1;
  442. insert $ti shift -string "Used to pass any one-word value to command procedures and other callbacks." ;
  443. insertPara $ti shift ;
  444. tlconfig $ti cursor -plook { -color Red};
  445. insert $ti shift -string "clientData"  -family Courier -bold 1;
  446. insert $ti shift -family -1 -bold -1;
  447. insert $ti shift -string " is usually a pointer to data structure needed by procedure." ;
  448. insertPara $ti shift ;
  449. tlconfig $ti cursor -plook { -color Red};
  450. insert $ti shift -string "Widget commands: " ;
  451. insert $ti shift -family Courier -bold 1;
  452. insert $ti shift -string "clientData"  -family Courier -bold 1;
  453. insert $ti shift -family -1 -bold -1;
  454. insert $ti shift -string " points to widget record." ;
  455. insertPara $ti shift ;
  456. tlconfig $ti cursor -plook { -color Red};
  457. insert $ti shift -string "Similar in use to " ;
  458. insert $ti shift -family Courier -bold 1;
  459. insert $ti shift -string "client_data"  -family Courier -bold 1;
  460. insert $ti shift -family -1 -bold -1;
  461. insert $ti shift -string " in Xt." ;
  462. set ti;
  463.  
  464. view active 9slide
  465. backg - 2
  466. set ti [new - title "45 63.5 567 109.456" -look TextBox];
  467. tiformat $ti 0 0 0 1 -revert 1;
  468. insert $ti shift -revert 1;
  469. tlconfig $ti cursor  -look Title;
  470. insert $ti shift -revert 1;
  471. insert $ti shift -string "Managing The Result String" ;
  472. set ti;
  473. set ti [new - textitem "45 135 603 400.5104" -look TextBox];
  474. tiformat $ti 0 0 0 1 -revert 1;
  475. insert $ti shift -revert 1;
  476. tlconfig $ti cursor -plook { -color Red} -look BHeading;
  477. insert $ti shift -revert 1;
  478. insert $ti shift -string "Need conventions for " ;
  479. insert $ti shift -family Courier -bold 1;
  480. insert $ti shift -string "interp->result"  -family Courier -bold 1;
  481. insert $ti shift -family -1 -bold -1;
  482. insert $ti shift -string ":" ;
  483. insertPara $ti shift ;
  484. tlconfig $ti cursor  -look Subheading -paraspace 1.20;
  485. insert $ti shift -string "-  Permit results of any length." ;
  486. insertPara $ti shift ;
  487. insert $ti shift -string "-  Avoid " ;
  488. insert $ti shift -family Courier -bold 1;
  489. insert $ti shift -string "malloc"  -family Courier -bold 1;
  490. insert $ti shift -family -1 -bold -1;
  491. insert $ti shift -string " overheads if possible." ;
  492. insertPara $ti shift ;
  493. insert $ti shift -string "-  Avoid storage reclamation problems." ;
  494. insertPara $ti shift ;
  495. insert $ti shift -string "-  Simplify command procedures." ;
  496. insertPara $ti shift ;
  497. tlconfig $ti cursor -plook { -color Red} -look BHeading -paraspace 2.50;
  498. insert $ti shift -string "Normal state of interpreter (e.g. whenever command procedure is invoked):" ;
  499. set ti;
  500. set ti [new - textitem "45 621 585 654.272" -look TextBox];
  501. tiformat $ti 0 0 0 1 -revert 1;
  502. insert $ti shift -revert 1;
  503. tlconfig $ti cursor -plook { -color Red} -look BHeading;
  504. insert $ti shift -revert 1;
  505. insert $ti shift -string "Default: command returns empty string." ;
  506. set ti;
  507. new - rectangle "234 423 468 567" -look Drawing -fg Black -bg Yellow -fp Solid -width 1.00 -feather White -dir 90
  508. new - rectangle "369 432 441 459" -look Drawing -fg Black -bg White -fp Solid -width 1.00 -feather White -dir 90
  509. set ti [new - textitem "252 434.768 342 461.688" -look TextBox];
  510. tiformat $ti 0 0 0 1 -revert 1;
  511. insert $ti shift -revert 1;
  512. tlconfig $ti cursor  -look Text;
  513. insert $ti shift -revert 1;
  514. insert $ti shift -family Courier -pointsize 20 -bold 1;
  515. insert $ti shift -string "result"  -family Courier -pointsize 20 -bold 1;
  516. tiformat $ti 0 6 0 7 -pointsize 20;
  517. set ti;
  518. set ti [new - textitem "252 470.768 369 497.688" -look TextBox];
  519. tiformat $ti 0 0 0 1 -revert 1;
  520. insert $ti shift -revert 1;
  521. tlconfig $ti cursor  -look Text;
  522. insert $ti shift -revert 1;
  523. insert $ti shift -family Courier -pointsize 20 -bold 1;
  524. insert $ti shift -string "freeProc"  -family Courier -pointsize 20 -bold 1;
  525. tiformat $ti 0 8 0 9 -pointsize 20;
  526. set ti;
  527. set ti [new - textitem "108 419.14 189 446.06" -look TextBox];
  528. tiformat $ti 0 0 0 1 -revert 1;
  529. insert $ti shift -revert 1;
  530. tlconfig $ti cursor  -look Text -justify left;
  531. insert $ti shift -revert 1;
  532. insert $ti shift -family Courier -pointsize 20 -bold 1;
  533. insert $ti shift -string "interp"  -family Courier -pointsize 20 -bold 1;
  534. tiformat $ti 0 6 0 7 -pointsize 20;
  535. set ti;
  536. new - rectangle "369 468 441 495" -look Drawing -fg Black -bg White -fp Solid -width 1.00 -feather White -dir 90
  537. new - rectangle "252 531 441 558" -look Drawing -fg Black -bg White -fp Solid -width 1.00 -feather White -dir 90
  538. new - line "445.5 445.5 405 445.5" -look Drawing -fg Black -width 1.00 -arrow none
  539. new - arc "400.5 441 409.5 450 0 23040" -look Drawing -fg Black -bg Black -fp Solid -width 1.00
  540. new - line "270 513 270 531" -look Drawing -fg Black -width 1.00 -arrow head
  541. set ti [new - textitem "373.5 468.64 436.5 495.56" -look TextBox];
  542. tiformat $ti 0 0 0 1 -revert 1;
  543. insert $ti shift -revert 1;
  544. tlconfig $ti cursor  -look Text -justify center;
  545. insert $ti shift -revert 1;
  546. insert $ti shift -family Courier -pointsize 20 -bold 1;
  547. insert $ti shift -string "NULL"  -family Courier -pointsize 20 -bold 1;
  548. tiformat $ti 0 4 0 5 -pointsize 20;
  549. set ti;
  550. set ti [new - textitem "265.5 531.64 328.5 558.56" -look TextBox];
  551. tiformat $ti 0 0 0 1 -revert 1;
  552. insert $ti shift -revert 1;
  553. tlconfig $ti cursor  -look Text -justify left;
  554. insert $ti shift -revert 1;
  555. insert $ti shift -family Courier -pointsize 20 -bold 1;
  556. insert $ti shift -string "\"\""  -family Courier -pointsize 20 -bold 1;
  557. tiformat $ti 0 2 0 3 -pointsize 20;
  558. set ti;
  559. new - line "189 432 225 432" -look Drawing -fg Black -width 1.00 -arrow head
  560. new - arc "436.5 486 454.5 504 17280 5760" -look Drawing -fg Black -bg None -fp Solid -width 1.00
  561. new - arc "270 504 288 522 5760 5760" -look Drawing -fg Black -bg None -fp Solid -width 1.00
  562. new - line "279 504 445.5 504" -look Drawing -fg Black -width 1.00 -arrow none
  563. new - arc "436.5 445.5 454.5 463.5 0 5760" -look Drawing -fg Black -bg None -fp Solid -width 1.00
  564. new - line "454.5 454.5 454.5 495" -look Drawing -fg Black -width 1.00 -arrow none
  565.  
  566. view active 10slide
  567. backg - 2
  568. set ti [new - title "45 63.5 567 109.456" -look TextBox];
  569. tiformat $ti 0 0 0 1 -revert 1;
  570. insert $ti shift -revert 1;
  571. tlconfig $ti cursor  -look Title;
  572. insert $ti shift -revert 1;
  573. insert $ti shift -string "Result String, cont'd" ;
  574. set ti;
  575. set ti [new - textitem "36 135 576 202.3584" -look TextBox];
  576. tiformat $ti 0 0 0 1 -revert 1;
  577. insert $ti shift -revert 1;
  578. tlconfig $ti cursor -plook { -color Red} -look BHeading;
  579. insert $ti shift -revert 1;
  580. insert $ti shift -string "Option 1: (semi-) static result." ;
  581. insertPara $ti shift ;
  582. tlconfig $ti cursor  -look Code -paraspace 1.20;
  583. insert $ti shift -pointsize 20;
  584. insert $ti shift -string "interp->result = \"0\"\;"  -pointsize 20;
  585. tiformat $ti 1 21 1 22 -pointsize 20;
  586. set ti;
  587. new - rectangle "216 216 450 360" -look Drawing -fg Black -bg Yellow -fp Solid -width 1.00 -feather White -dir 90
  588. new - rectangle "351 225 423 252" -look Drawing -fg Black -bg White -fp Solid -width 1.00 -feather White -dir 90
  589. set ti [new - textitem "234 227.768 324 254.688" -look TextBox];
  590. tiformat $ti 0 0 0 1 -revert 1;
  591. insert $ti shift -revert 1;
  592. tlconfig $ti cursor  -look Text;
  593. insert $ti shift -revert 1;
  594. insert $ti shift -family Courier -pointsize 20 -bold 1;
  595. insert $ti shift -string "result"  -family Courier -pointsize 20 -bold 1;
  596. tiformat $ti 0 6 0 7 -pointsize 20;
  597. set ti;
  598. set ti [new - textitem "234 263.768 351 290.688" -look TextBox];
  599. tiformat $ti 0 0 0 1 -revert 1;
  600. insert $ti shift -revert 1;
  601. tlconfig $ti cursor  -look Text;
  602. insert $ti shift -revert 1;
  603. insert $ti shift -family Courier -pointsize 20 -bold 1;
  604. insert $ti shift -string "freeProc"  -family Courier -pointsize 20 -bold 1;
  605. tiformat $ti 0 8 0 9 -pointsize 20;
  606. set ti;
  607. set ti [new - textitem "90 212.14 171 239.06" -look TextBox];
  608. tiformat $ti 0 0 0 1 -revert 1;
  609. insert $ti shift -revert 1;
  610. tlconfig $ti cursor  -look Text -justify left;
  611. insert $ti shift -revert 1;
  612. insert $ti shift -family Courier -pointsize 20 -bold 1;
  613. insert $ti shift -string "interp"  -family Courier -pointsize 20 -bold 1;
  614. tiformat $ti 0 6 0 7 -pointsize 20;
  615. set ti;
  616. new - rectangle "351 261 423 288" -look Drawing -fg Black -bg White -fp Solid -width 1.00 -feather White -dir 90
  617. new - rectangle "234 324 423 351" -look Drawing -fg Black -bg White -fp Solid -width 1.00 -feather White -dir 90
  618. new - arc "382.5 234 391.5 243 0 23040" -look Drawing -fg Black -bg Black -fp Solid -width 1.00
  619. set ti [new - textitem "355.5 261.64 418.5 288.56" -look TextBox];
  620. tiformat $ti 0 0 0 1 -revert 1;
  621. insert $ti shift -revert 1;
  622. tlconfig $ti cursor  -look Text -justify center;
  623. insert $ti shift -revert 1;
  624. insert $ti shift -family Courier -pointsize 20 -bold 1;
  625. insert $ti shift -string "NULL"  -family Courier -pointsize 20 -bold 1;
  626. tiformat $ti 0 4 0 5 -pointsize 20;
  627. set ti;
  628. set ti [new - textitem "247.5 324.64 310.5 351.56" -look TextBox];
  629. tiformat $ti 0 0 0 1 -revert 1;
  630. insert $ti shift -revert 1;
  631. tlconfig $ti cursor  -look Text -justify left;
  632. insert $ti shift -revert 1;
  633. insert $ti shift -family Courier -pointsize 20 -bold 1;
  634. insert $ti shift -string "\"\""  -family Courier -pointsize 20 -bold 1;
  635. tiformat $ti 0 2 0 3 -pointsize 20;
  636. set ti;
  637. set ti [new - textitem "36 414 585 481.3584" -look TextBox];
  638. tiformat $ti 0 0 0 1 -revert 1;
  639. insert $ti shift -revert 1;
  640. tlconfig $ti cursor -plook { -color Red} -look BHeading;
  641. insert $ti shift -revert 1;
  642. insert $ti shift -string "Option 2: use pre-allocated space in interp." ;
  643. insertPara $ti shift ;
  644. tlconfig $ti cursor  -look Code -paraspace 1.20;
  645. insert $ti shift -pointsize 20;
  646. insert $ti shift -string "sprintf(interp->result, \"Value is %d\", i)\;"  -pointsize 20;
  647. tiformat $ti 1 42 1 43 -pointsize 20;
  648. set ti;
  649. new - line "171 225 207 225" -look Drawing -fg Black -width 1.00 -arrow head
  650. new - rectangle "216 495 450 639" -look Drawing -fg Black -bg Yellow -fp Solid -width 1.00 -feather White -dir 90
  651. new - rectangle "351 504 423 531" -look Drawing -fg Black -bg White -fp Solid -width 1.00 -feather White -dir 90
  652. set ti [new - textitem "234 506.768 324 533.688" -look TextBox];
  653. tiformat $ti 0 0 0 1 -revert 1;
  654. insert $ti shift -revert 1;
  655. tlconfig $ti cursor  -look Text;
  656. insert $ti shift -revert 1;
  657. insert $ti shift -family Courier -pointsize 20 -bold 1;
  658. insert $ti shift -string "result"  -family Courier -pointsize 20 -bold 1;
  659. tiformat $ti 0 6 0 7 -pointsize 20;
  660. set ti;
  661. set ti [new - textitem "234 542.768 351 569.688" -look TextBox];
  662. tiformat $ti 0 0 0 1 -revert 1;
  663. insert $ti shift -revert 1;
  664. tlconfig $ti cursor  -look Text;
  665. insert $ti shift -revert 1;
  666. insert $ti shift -family Courier -pointsize 20 -bold 1;
  667. insert $ti shift -string "freeProc"  -family Courier -pointsize 20 -bold 1;
  668. tiformat $ti 0 8 0 9 -pointsize 20;
  669. set ti;
  670. set ti [new - textitem "90 491.14 171 518.06" -look TextBox];
  671. tiformat $ti 0 0 0 1 -revert 1;
  672. insert $ti shift -revert 1;
  673. tlconfig $ti cursor  -look Text -justify left;
  674. insert $ti shift -revert 1;
  675. insert $ti shift -family Courier -pointsize 20 -bold 1;
  676. insert $ti shift -string "interp"  -family Courier -pointsize 20 -bold 1;
  677. tiformat $ti 0 6 0 7 -pointsize 20;
  678. set ti;
  679. new - rectangle "351 540 423 567" -look Drawing -fg Black -bg White -fp Solid -width 1.00 -feather White -dir 90
  680. new - rectangle "234 603 423 630" -look Drawing -fg Black -bg White -fp Solid -width 1.00 -feather White -dir 90
  681. new - line "427.5 517.5 387 517.5" -look Drawing -fg Black -width 1.00 -arrow none
  682. new - arc "382.5 513 391.5 522 0 23040" -look Drawing -fg Black -bg Black -fp Solid -width 1.00
  683. new - line "252 585 252 603" -look Drawing -fg Black -width 1.00 -arrow head
  684. set ti [new - textitem "355.5 540.64 418.5 567.56" -look TextBox];
  685. tiformat $ti 0 0 0 1 -revert 1;
  686. insert $ti shift -revert 1;
  687. tlconfig $ti cursor  -look Text -justify center;
  688. insert $ti shift -revert 1;
  689. insert $ti shift -family Courier -pointsize 20 -bold 1;
  690. insert $ti shift -string "NULL"  -family Courier -pointsize 20 -bold 1;
  691. tiformat $ti 0 4 0 5 -pointsize 20;
  692. set ti;
  693. set ti [new - textitem "247.5 603.64 414 630.56" -look TextBox];
  694. tiformat $ti 0 0 0 1 -revert 1;
  695. insert $ti shift -revert 1;
  696. tlconfig $ti cursor  -look Text -justify left;
  697. insert $ti shift -revert 1;
  698. insert $ti shift -family Courier -pointsize 20 -bold 1;
  699. insert $ti shift -string "\"Value is 2\""  -family Courier -pointsize 20 -bold 1;
  700. tiformat $ti 0 12 0 13 -pointsize 20;
  701. set ti;
  702. new - line "171 504 207 504" -look Drawing -fg Black -width 1.00 -arrow head
  703. new - arc "418.5 558 436.5 576 17280 5760" -look Drawing -fg Black -bg None -fp Solid -width 1.00
  704. new - arc "252 576 270 594 5760 5760" -look Drawing -fg Black -bg None -fp Solid -width 1.00
  705. new - line "261 576 427.5 576" -look Drawing -fg Black -width 1.00 -arrow none
  706. new - arc "418.5 517.5 436.5 535.5 0 5760" -look Drawing -fg Black -bg None -fp Solid -width 1.00
  707. new - line "436.5 526.5 436.5 567" -look Drawing -fg Black -width 1.00 -arrow none
  708. set ti [new - textitem "117 660.572 243 689.428" -look TextBox -fg None];
  709. tiformat $ti 0 0 0 1 -revert 1;
  710. insert $ti shift -revert 1;
  711. tlconfig $ti cursor  -look Text -justify right;
  712. insert $ti shift -revert 1;
  713. insert $ti shift -color Red;
  714. insert $ti shift -string "~ 200 bytes"  -color Red;
  715. tiformat $ti 0 11 0 12 -color Red;
  716. set ti;
  717. new - arc "315 657 333 675 17280 5760" -look Drawing -fg Red -bg None -fp Solid -width 1.00
  718. new - line "333 666 333 630" -look Drawing -fg Red -width 1.00 -arrow head
  719. new - line "324 675 252 675" -look Drawing -fg Red -width 1.00 -arrow none
  720. new - line "387 238.5 477 238.5" -look Drawing -fg Black -width 1.00 -arrow head
  721. set ti [new - textitem "486 224.48 558 255.4" -look TextBox];
  722. tiformat $ti 0 0 0 1 -revert 1;
  723. insert $ti shift -revert 1;
  724. tlconfig $ti cursor  -look Text;
  725. insert $ti shift -revert 1;
  726. insert $ti shift -family Courier -bold 1;
  727. insert $ti shift -string "\"0\""  -family Courier -bold 1;
  728. tiformat $ti 0 3 0 4 -family Courier;
  729. set ti;
  730.  
  731. view active 11slide
  732. backg - 2
  733. set ti [new - title "45 63.5 567 109.456" -look TextBox];
  734. tiformat $ti 0 0 0 1 -revert 1;
  735. insert $ti shift -revert 1;
  736. tlconfig $ti cursor  -look Title;
  737. insert $ti shift -revert 1;
  738. insert $ti shift -string "Result String, cont'd" ;
  739. set ti;
  740. set ti [new - textitem "45 135 585 272.474" -look TextBox];
  741. tiformat $ti 0 0 0 1 -revert 1;
  742. insert $ti shift -revert 1;
  743. tlconfig $ti cursor -plook { -color Red} -look BHeading;
  744. insert $ti shift -revert 1;
  745. insert $ti shift -string "Option 3: allocate new space for result." ;
  746. insertPara $ti shift ;
  747. tlconfig $ti cursor  -look Code -paraspace 1.50;
  748. insert $ti shift -string "interp->result = malloc(2000)\;" ;
  749. insertPara $ti shift ;
  750. tlconfig $ti cursor  -paraspace -1;
  751. insert $ti shift -string "..." ;
  752. insertPara $ti shift ;
  753. insert $ti shift -string "interp->freeProc = free\;" ;
  754. set ti;
  755. new - rectangle "225 288 459 432" -look Drawing -fg Black -bg Yellow -fp Solid -width 1.00 -feather White -dir 90
  756. new - rectangle "360 297 432 324" -look Drawing -fg Black -bg White -fp Solid -width 1.00 -feather White -dir 90
  757. set ti [new - textitem "243 299.768 333 326.688" -look TextBox];
  758. tiformat $ti 0 0 0 1 -revert 1;
  759. insert $ti shift -revert 1;
  760. tlconfig $ti cursor  -look Text;
  761. insert $ti shift -revert 1;
  762. insert $ti shift -family Courier -pointsize 20 -bold 1;
  763. insert $ti shift -string "result"  -family Courier -pointsize 20 -bold 1;
  764. tiformat $ti 0 6 0 7 -pointsize 20;
  765. set ti;
  766. set ti [new - textitem "243 335.768 360 362.688" -look TextBox];
  767. tiformat $ti 0 0 0 1 -revert 1;
  768. insert $ti shift -revert 1;
  769. tlconfig $ti cursor  -look Text;
  770. insert $ti shift -revert 1;
  771. insert $ti shift -family Courier -pointsize 20 -bold 1;
  772. insert $ti shift -string "freeProc"  -family Courier -pointsize 20 -bold 1;
  773. tiformat $ti 0 8 0 9 -pointsize 20;
  774. set ti;
  775. set ti [new - textitem "99 284.14 180 311.06" -look TextBox];
  776. tiformat $ti 0 0 0 1 -revert 1;
  777. insert $ti shift -revert 1;
  778. tlconfig $ti cursor  -look Text -justify left;
  779. insert $ti shift -revert 1;
  780. insert $ti shift -family Courier -pointsize 20 -bold 1;
  781. insert $ti shift -string "interp"  -family Courier -pointsize 20 -bold 1;
  782. tiformat $ti 0 6 0 7 -pointsize 20;
  783. set ti;
  784. new - rectangle "360 333 432 360" -look Drawing -fg Black -bg White -fp Solid -width 1.00 -feather White -dir 90
  785. new - rectangle "243 396 432 423" -look Drawing -fg Black -bg White -fp Solid -width 1.00 -feather White -dir 90
  786. new - arc "391.5 306 400.5 315 0 23040" -look Drawing -fg Black -bg Black -fp Solid -width 1.00
  787. set ti [new - textitem "364.5 333.64 427.5 360.56" -look TextBox];
  788. tiformat $ti 0 0 0 1 -revert 1;
  789. insert $ti shift -revert 1;
  790. tlconfig $ti cursor  -look Text -justify center;
  791. insert $ti shift -revert 1;
  792. insert $ti shift -family Courier -pointsize 20 -bold 1;
  793. insert $ti shift -string "free"  -family Courier -pointsize 20 -bold 1;
  794. tiformat $ti 0 4 0 5 -pointsize 20;
  795. set ti;
  796. set ti [new - textitem "256.5 396.64 319.5 423.56" -look TextBox];
  797. tiformat $ti 0 0 0 1 -revert 1;
  798. insert $ti shift -revert 1;
  799. tlconfig $ti cursor  -look Text -justify left;
  800. insert $ti shift -revert 1;
  801. insert $ti shift -family Courier -pointsize 20 -bold 1;
  802. insert $ti shift -string "\"\""  -family Courier -pointsize 20 -bold 1;
  803. tiformat $ti 0 2 0 3 -pointsize 20;
  804. set ti;
  805. new - line "180 297 216 297" -look Drawing -fg Black -width 1.00 -arrow head
  806. new - line "396 310.5 486 310.5" -look Drawing -fg Black -width 1.00 -arrow head
  807. new - rectangle "486 288 558 477" -look Drawing -fg Black -bg Yellow -fp Solid -width 1.00 -feather White -dir 90
  808. set ti [new - textitem "45 513 585 668.89856" -look TextBox];
  809. tiformat $ti 0 0 0 1 -revert 1;
  810. insert $ti shift -revert 1;
  811. tlconfig $ti cursor -plook { -color Red} -look BHeading;
  812. insert $ti shift -revert 1;
  813. insert $ti shift -string "Tcl will call " ;
  814. insert $ti shift -family Courier -bold 1;
  815. insert $ti shift -string "freeProc"  -family Courier -bold 1;
  816. insert $ti shift -family -1 -bold -1;
  817. insert $ti shift -string " (if non-" ;
  818. insert $ti shift -family Courier -bold 1;
  819. insert $ti shift -string "NULL"  -family Courier -bold 1;
  820. insert $ti shift -family -1 -bold -1;
  821. insert $ti shift -string ") to dispose of result." ;
  822. insertPara $ti shift ;
  823. tlconfig $ti cursor -plook { -color Red} -paraspace 2.50;
  824. insert $ti shift -string "Mechanism supports storage allocators other than " ;
  825. insert $ti shift -family Courier -bold 1;
  826. insert $ti shift -string "malloc"  -family Courier -bold 1;
  827. insert $ti shift -bold -1;
  828. insert $ti shift -string "/"  -family Courier;
  829. insert $ti shift -bold 1;
  830. insert $ti shift -string "free"  -family Courier -bold 1;
  831. insert $ti shift -family -1 -bold -1;
  832. insert $ti shift -string "." ;
  833. set ti;
  834.  
  835. view active 12slide
  836. backg - 2
  837. set ti [new - title "45 63.5 567 109.456" -look TextBox];
  838. tiformat $ti 0 0 0 1 -revert 1;
  839. insert $ti shift -revert 1;
  840. tlconfig $ti cursor  -look Title;
  841. insert $ti shift -revert 1;
  842. insert $ti shift -string "Procedures For Managing Result" ;
  843. set ti;
  844. set ti [new - textitem "45 171 594 232.8752" -look TextBox];
  845. tiformat $ti 0 0 0 1 -revert 1;
  846. insert $ti shift -revert 1;
  847. tlconfig $ti cursor  -look Heading;
  848. insert $ti shift -revert 1;
  849. insert $ti shift -string "When in doubt, use library procedures:  sometimes slower, always safe." ;
  850. tiformat $ti 0 70 0 71 -pointsize 22;
  851. set ti;
  852. set ti [new - textitem "9 306 585 587.268" -look TextBox];
  853. tiformat $ti 0 0 0 1 -revert 1;
  854. insert $ti shift -revert 1;
  855. tlconfig $ti cursor  -look Code;
  856. insert $ti shift -revert 1;
  857. insert $ti shift -pointsize 22;
  858. insert $ti shift -string "Tcl_SetResult(interp, string, ...)\;"  -pointsize 22;
  859. insertPara $ti shift ;
  860. tlconfig $ti cursor  -paraspace 3.00;
  861. insert $ti shift -string "Tcl_AppendResult(interp, string,"  -pointsize 22;
  862. insertPara $ti shift ;
  863. tlconfig $ti cursor  -paraspace 0.00;
  864. insert $ti shift -string "   string, ..., string, (char *) NULL)\;"  -pointsize 22;
  865. insertPara $ti shift ;
  866. tlconfig $ti cursor  -paraspace 3.00;
  867. insert $ti shift -string "Tcl_AppendElement(interp, string, ...)\;"  -pointsize 22;
  868. insertPara $ti shift ;
  869. insert $ti shift -string "Tcl_ResetResult(interp)\;"  -pointsize 22;
  870. tiformat $ti 4 24 4 25 -pointsize 22;
  871. set ti;
  872.  
  873. view active 13slide
  874. backg - 2
  875. set ti [new - title "45 63.5 567 109.456" -look TextBox];
  876. tiformat $ti 0 0 0 1 -revert 1;
  877. insert $ti shift -revert 1;
  878. tlconfig $ti cursor  -look Title;
  879. insert $ti shift -revert 1;
  880. insert $ti shift -string "Utility Procedures: Parsing" ;
  881. set ti;
  882. set ti [new - textitem "45 135 594 680.81408" -look TextBox];
  883. tiformat $ti 0 0 0 1 -revert 1;
  884. insert $ti shift -revert 1;
  885. tlconfig $ti cursor -plook { -color Red} -look BHeading;
  886. insert $ti shift -revert 1;
  887. insert $ti shift -string "Used by command procedures to parse arguments:" ;
  888. insertPara $ti shift ;
  889. tlconfig $ti cursor  -look Code -paraspace 1.50;
  890. insert $ti shift -string "int value, code\;" ;
  891. insertPara $ti shift ;
  892. tlconfig $ti cursor  -paraspace -1;
  893. insert $ti shift -string "code = Tcl_GetInt(interp, argv\[1\]," ;
  894. insertPara $ti shift ;
  895. tlconfig $ti cursor  -paraspace 0.00;
  896. insert $ti shift -string "    &value)\;" ;
  897. insertPara $ti shift ;
  898. tlconfig $ti cursor -plook { -color Red} -look BHeading -paraspace 2.50;
  899. insert $ti shift -string "Stores integer value in " ;
  900. insert $ti shift -family Courier -bold 1;
  901. insert $ti shift -string "value"  -family Courier -bold 1;
  902. insert $ti shift -family -1 -bold -1;
  903. insert $ti shift -string "." ;
  904. insertPara $ti shift ;
  905. tlconfig $ti cursor -plook { -color Red};
  906. insert $ti shift -string "Returns " ;
  907. insert $ti shift -family Courier -bold 1;
  908. insert $ti shift -string "TCL_OK"  -family Courier -bold 1;
  909. insert $ti shift -family -1 -bold -1;
  910. insert $ti shift -string " or " ;
  911. insert $ti shift -family Courier -bold 1;
  912. insert $ti shift -string "TCL_ERROR"  -family Courier -bold 1;
  913. insert $ti shift -family -1 -bold -1;
  914. insert $ti shift -string "." ;
  915. insertPara $ti shift ;
  916. tlconfig $ti cursor -plook { -color Red};
  917. insert $ti shift -string "If parse error, returns " ;
  918. insert $ti shift -family Courier -bold 1;
  919. insert $ti shift -string "TCL_ERROR"  -family Courier -bold 1;
  920. insert $ti shift -family -1 -bold -1;
  921. insert $ti shift -string " and leaves message in " ;
  922. insert $ti shift -family Courier -bold 1;
  923. insert $ti shift -string "interp->result"  -family Courier -bold 1;
  924. insert $ti shift -family -1 -bold -1;
  925. insert $ti shift -string "." ;
  926. insertPara $ti shift ;
  927. tlconfig $ti cursor -plook { -color Red};
  928. insert $ti shift -string "Other procedures:" ;
  929. insertPara $ti shift ;
  930. tlconfig $ti cursor  -look Code -left 36.00 -indent 0.00 -paraspace 1.50 -tabs { 288 324 360 396};
  931. insert $ti shift -string "Tcl_GetDouble    Tcl_ExprDouble" ;
  932. insertPara $ti shift ;
  933. tlconfig $ti cursor  -paraspace 1.20;
  934. insert $ti shift -string "Tcl_GetBoolean    Tcl_ExprBoolean" ;
  935. insertPara $ti shift ;
  936. tlconfig $ti cursor ;
  937. insert $ti shift -string "Tcl_ExprLong    Tcl_ExprString" ;
  938. set ti;
  939.  
  940. view active 14slide
  941. backg - 2
  942. set ti [new - title "45 63.5 567 109.456" -look TextBox];
  943. tiformat $ti 0 0 0 1 -revert 1;
  944. insert $ti shift -revert 1;
  945. tlconfig $ti cursor  -look Title;
  946. insert $ti shift -revert 1;
  947. insert $ti shift -string "Utility Procedures: Variables" ;
  948. set ti;
  949. set ti [new - textitem "45 153 594 649.88416" -look TextBox];
  950. tiformat $ti 0 0 0 1 -revert 1;
  951. insert $ti shift -revert 1;
  952. tlconfig $ti cursor -plook { -color Red} -look BHeading;
  953. insert $ti shift -revert 1;
  954. insert $ti shift -string "Read, write and unset:" ;
  955. insertPara $ti shift ;
  956. tlconfig $ti cursor  -look Code -paraspace 1.50;
  957. insert $ti shift -pointsize 22;
  958. insert $ti shift -string "char *value\;"  -pointsize 22;
  959. insertPara $ti shift ;
  960. tlconfig $ti cursor  -paraspace -1;
  961. insert $ti shift -string "value = Tcl_GetVar(interp, \"a\", ...)\;"  -pointsize 22;
  962. insertPara $ti shift ;
  963. insert $ti shift -string "Tcl_SetVar(interp, \"a\", \"new\", ...)\;"  -pointsize 22;
  964. insertPara $ti shift ;
  965. insert $ti shift -string "Tcl_UnsetVar(interp, \"a\", ...)\;"  -pointsize 22;
  966. insertPara $ti shift ;
  967. tlconfig $ti cursor -plook { -color Red} -look BHeading -paraspace 2.50;
  968. insert $ti shift -string "Set traces:" ;
  969. insertPara $ti shift ;
  970. tlconfig $ti cursor  -look Code -paraspace 1.50;
  971. insert $ti shift -pointsize 22;
  972. insert $ti shift -string "Tcl_TraceVar(interp, \"a\","  -pointsize 22;
  973. insertPara $ti shift ;
  974. tlconfig $ti cursor  -paraspace 0.00;
  975. insert $ti shift -string "    TCL_TRACE_READS|TCL_TRACE_WRITES,"  -pointsize 22;
  976. insertPara $ti shift ;
  977. insert $ti shift -string "    traceProc, clientData)\;"  -pointsize 22;
  978. insertPara $ti shift ;
  979. tlconfig $ti cursor -plook { -color Red} -look BHeading -paraspace 2.50;
  980. insert $ti shift -string "traceProc"  -family Courier -bold 1;
  981. insert $ti shift -family -1 -bold -1;
  982. insert $ti shift -string " will be called during each read or write of " ;
  983. insert $ti shift -family Courier -bold 1;
  984. insert $ti shift -string "a"  -family Courier -bold 1;
  985. insert $ti shift -family -1 -bold -1;
  986. insert $ti shift -string ":" ;
  987. insertPara $ti shift ;
  988. tlconfig $ti cursor  -look Subheading;
  989. insert $ti shift -string "-  Can monitor accesses." ;
  990. insertPara $ti shift ;
  991. tlconfig $ti cursor  -paraspace 1.20;
  992. insert $ti shift -string "-  Can override value read or written." ;
  993. set ti;
  994.  
  995. view active 15slide
  996. backg - 2
  997. set ti [new - title "45 63.5 567 109.456" -look TextBox];
  998. tiformat $ti 0 0 0 1 -revert 1;
  999. insert $ti shift -revert 1;
  1000. tlconfig $ti cursor  -look Title;
  1001. insert $ti shift -revert 1;
  1002. insert $ti shift -string "Other Utility Procedures" ;
  1003. set ti;
  1004. set ti [new - textitem "45 162 585 694.8404" -look TextBox];
  1005. tiformat $ti 0 0 0 1 -revert 1;
  1006. insert $ti shift -revert 1;
  1007. tlconfig $ti cursor -plook { -color Red} -look BHeading;
  1008. insert $ti shift -revert 1;
  1009. insert $ti shift -string "Parsing, assembling proper lists:" ;
  1010. insertPara $ti shift ;
  1011. tlconfig $ti cursor  -look Code -paraspace 1.50;
  1012. insert $ti shift -string "Tcl_SplitList(...)" ;
  1013. insertPara $ti shift ;
  1014. tlconfig $ti cursor  -paraspace -1;
  1015. insert $ti shift -string "Tcl_Merge(...)" ;
  1016. insertPara $ti shift ;
  1017. tlconfig $ti cursor -plook { -color Red} -look BHeading -paraspace 3.00;
  1018. insert $ti shift -string "Flexible hash tables:" ;
  1019. insertPara $ti shift ;
  1020. tlconfig $ti cursor  -look Code -paraspace 1.50;
  1021. insert $ti shift -string "Tcl_CreateHashTable(...)" ;
  1022. insertPara $ti shift ;
  1023. tlconfig $ti cursor  -paraspace -1;
  1024. insert $ti shift -string "Tcl_CreateHashEntry(...)" ;
  1025. insertPara $ti shift ;
  1026. insert $ti shift -string "Tcl_FindHashEntry(...)" ;
  1027. insertPara $ti shift ;
  1028. insert $ti shift -string "Tcl_DeleteHashEntry(...)" ;
  1029. insertPara $ti shift ;
  1030. insert $ti shift -string "Tcl_DeleteHashTable(...)" ;
  1031. insertPara $ti shift ;
  1032. tlconfig $ti cursor -plook { -color Red} -look BHeading -paraspace 3.00;
  1033. insert $ti shift -string "Assembling multi-line commands from input:" ;
  1034. insertPara $ti shift ;
  1035. tlconfig $ti cursor  -look Code -paraspace 1.50;
  1036. insert $ti shift -string "Tcl_CreateCmdBuf(...)" ;
  1037. insertPara $ti shift ;
  1038. tlconfig $ti cursor  -paraspace 1.00;
  1039. insert $ti shift -string "Tcl_AssembleCmd(...)" ;
  1040. insertPara $ti shift ;
  1041. insert $ti shift -string "Tcl_CommandComplete(...)" ;
  1042. set ti;
  1043.  
  1044. view active 16slide
  1045. backg - 2
  1046. set ti [new - title "45 63.5 567 109.456" -look TextBox];
  1047. tiformat $ti 0 0 0 1 -revert 1;
  1048. insert $ti shift -revert 1;
  1049. tlconfig $ti cursor  -look Title;
  1050. insert $ti shift -revert 1;
  1051. insert $ti shift -string "Summary" ;
  1052. set ti;
  1053. set ti [new - textitem "45 207 585 395.33216" -look TextBox];
  1054. tiformat $ti 0 0 0 1 -revert 1;
  1055. insert $ti shift -revert 1;
  1056. tlconfig $ti cursor -plook { -color Red} -look BHeading;
  1057. insert $ti shift -revert 1;
  1058. insert $ti shift -string "Interfaces to C are simple: Tcl was designed to make this possible." ;
  1059. insertPara $ti shift ;
  1060. tlconfig $ti cursor -plook { -color Red} -paraspace 4.00;
  1061. insert $ti shift -string "Focus on primitives, use Tcl scripts to compose fancy features." ;
  1062. set ti;
  1063.  
  1064. MakeWindow slide 13 0 .views.1 683x835+0+4
  1065. SpotConfig .views.1 0 3 1 on
  1066. UpdateTitles; set generateName 2
  1067.