ViewVC logotype

Contents of /pubs/books/ucbka/trunk/c_tin0/c_tin0.tex

Parent Directory Parent Directory | Revision Log Revision Log

Revision 279 - (show annotations) (download) (as text)
Sat Aug 17 03:10:13 2019 UTC (4 years, 6 months ago) by dashley
File MIME type: application/x-tex
File size: 30798 byte(s)
Change keyword substitution (migration from cvs to svn).
1 %$Header$
3 \chapter[\ctinzeroshorttitle{}]{\ctinzerolongtitle{}}
5 \label{ctin0}
7 \index{Hobbs, Jeffrey}
8 \beginchapterquote{``I may seem more arrogant, but I think that's just because
9 you didn't realize how arrogant I was before.''}
10 {Jeffrey Hobbs \cite{bibref:i:jeffreyhobbs}, Tcl Ambassador, Ajuba Solutions}
12 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
14 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
16 %Section Tag: INT
17 \section{Overview Of The Iju Tool Set}
18 \index{IjuTools}\index{Iju!tool set}
19 The \emph{Iju}\footnote{The name \emph{Iju} is an acronym for
20 ``\emph{I}t's \emph{J}ust \emph{U}s'', and has its origins in
21 a dilbertesque conversation between disgruntled engineers
22 in a large company years ago where it
23 was stated that we felt \emph{it's just us} who understood
24 the nature of certain product problems.} tool set (or \emph{IjuTools} for short)
25 is a collection of utilities and research tools which are
26 useful for small microcontroller work. At this time, the current version of
27 IjuTools is v1.05.
29 As of v1.05, IjuTools consists of [only] the following components.
31 \begin{itemize}
32 \item \emph{IjuScripter}, a statically linked\footnote{By \emph{statically linked}
33 I mean that a monolithic executable which is complete and requires no
34 DLLs is provided.} version of Tclsh, with extensions.
36 \item \emph{IjuConsole}, a statically linked version of Wish, with extensions.
38 \item A set of DOS command-line utilities. In many cases, these utilities
39 perform functions similar to the Tcl/Tk extensions incorporated into
40 IjuScripter/IjuConsole.
41 \item Supplemental example scripts, technical papers, books, and URLs.\footnote{As
42 of v1.03, just a few, but I hope the list will grow.}
43 \end{itemize}
45 IjuTools is built around Tcl/Tk 8.3.1.\index{Tcl}\index{Tk}
46 Tcl is a scripting language from
47 Scriptics\index{Scriptics} (now Interwoven).\index{Interwoven}
48 At the present time,
49 all components of the tool set are implemented
50 as Tcl extensions, so that they can be executed interactively or as part of
51 a script. The scripted nature of the tool set gives users the ability to
52 use the tool set components together in arbitrary ways.
54 Although IjuTools is slanted towards microcontroller software development,
55 it is a good general automation solution (in the same sense that
56 Tcl and Tk are), and it can be used for other endeavors. (In fact,
57 the generation of this book is automated using IjuConsole.)
59 At the present time, \emph{The Iju Tool Set} (including this
60 book) is maintained
61 at the site \texttt{http://ijutools.sourceforge.net} as an
62 open-source product. All source code may be freely downloaded.
63 In the future, in order to recoup some of the cost of producing
64 the tool set, some of the convenient distributions (packaged installations,
65 printed materials, and media) may be sold
66 for a small fee. However, all of the source code will remain
67 public and free.
70 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
71 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
72 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
73 %Design Goals Of IjuTools
74 %Section tag: DGI
75 \section{IjuTools Design Goals}
76 The design goals of IjuTools are enumerated below.
77 Each goal is discussed in more detail later.
79 \begin{itemize}
81 \item \textbf{Stability, Repeatability, And Lack Of Intermittent Behavior:}
82 because the tool set will be used to produce ROM images, it must be very reliable.
84 \item \textbf{Extensibility:}
85 it must be straightforward to extend the capabilities of the tool set.
87 \item \textbf{Cross-Platform Capability:}
88 the tool set should have a migration path to platforms other than Microsoft
89 Windows.
91 \item \textbf{Utility:}
92 the tool set should be genuinely useful.
94 \end{itemize}
96 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
97 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
98 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
99 \subsection{Stability, Repeatability, And Lack Of Intermittent Behavior}
101 \emph{Microsoft Windows}\index{Windows}\index{Microsoft Windows}\index{Microsoft!Windows}
102 is surely the most despised computing
103 platform in the world. The complaints include
104 lack of stability, incomplete uninstallation of
105 applications, and unintended interactions between
106 applications. Web servers,\index{web server}\index{HTTP server}
107 file servers,\index{file server} and mail\index{mail server}
108 servers are often hosted under Unix\index{Unix} or Linux\index{Linux}
109 rather than a Microsoft product because
110 the MTBF for Windows is typically hundreds of hours, whereas the the MTBF
111 for Unix or Linux is typically hundreds of days. However, most microcontroller
112 software development is done on Windows platforms.
114 Defects in Windows are unlikely to result
115 in the corruption of a ROM image or in incorrect data (human error is
116 a more likely cause). However, to minimize the possibility of human error and
117 unforeseen interactions between applications, IjuTools possesses the following design
118 characteristics.
120 \begin{itemize}
122 \item \textbf{DLLs and the Windows registry are not used.}
123 Each component of \emph{The Iju Tool Set} is a monolithic
124 executable image (an .EXE file). This makes it impossible
125 to mismatch an application
126 with the DLLs it requires. Additionally, the Windows registry,
127 which may cause differences in behavior from machine to machine,
128 is not used. Although the IjuTools installation installs executable
129 files in specific directories, any of these executable files may be copied
130 or moved to other locations or to other machines (without an installation process),
131 because the executable files are standalone and have no DLL or registry
132 dependencies.
134 \item \textbf{Executable files are internally versioned.}
135 IjuTools version numbers are never re-used, and each executable component
136 of the tool set ``knows'' its version number. IjuScripter and IjuConsole
137 contain embedded commands to allow a script to determine the version number of
138 the executable. Thus, it is possible to author scripts that will only run
139 with a specific version of IjuScripter or IjuConsole.
141 \end{itemize}
143 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
144 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
145 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
146 \subsection{Extensibility}
148 The two core components of IjuTools (IjuScripter and IjuConsole) are extensible in the
149 sense that additional commands can be added to the language understood by the tools.
150 Because of the way in which Tcl treats strings (they can be of arbitrary length), the output
151 of a built-in command can be easily retained in RAM (for further processing by other
152 commands) or placed in a file (as output).
153 Thus, if parsing or file transformation is involved, it is easy to make the claim that
154 IjuTools is ``arbitrarily extensible'' because commands can be added arbitrarily to IjuScripter
155 and IjuConsole..
157 For microcontroller work, this type of extensibility is probably adequate.
159 However, no framework has yet been developed to encompass the integration of
160 GUI applications or additional executables into IjuTools. I welcome suggestions
161 in this area.
163 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
164 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
165 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
166 \subsection{Cross-Platform Capability}
168 Windows is presently the dominant platform for microcontroller software
169 development. However, it is easy to envision scenarios in which Linux or Unix become
170 popular platforms for certain types of development.
172 Tcl/Tk inherently runs on Windows, Linux, Unix, and Solaris platforms.
173 (I'm sure that designing one set of source code that fits all of these
174 platforms has caused Scriptics substantial technical anguish, but they
175 were successful in this.) To ensure that IjuScripter and IjuConsole are
176 portable to these other platforms if necessary, the following steps
177 are planned.
179 \begin{itemize}
181 \item All changes to the Tcl/Tk 8.3.1 core (the changes will be bug fixes
182 only) will be logged so that they can be
183 reproduced if IjuTools is ported to another platform using
184 the original Scriptics 8.3.1 code as the starting
185 point.\footnote{As the Tcl 8.3.1 core is maintained,
186 to clean up the Windows source code and enhance clarity, it is natural
187 to eliminate blocks of code that are preprocessed out and do not
188 enter the compile stream for a Windows build. This type of maintenance
189 will make it impossible to compile the code for any other platform,
190 and hence the original Scriptics code would be necessary as a starting
191 point.}
193 \item Extensions will follow coding standards to minimize platform dependencies
194 and enhance portability
195 (sizes of ordinal data sizes, use of floating-point arithmetic, etc.).
197 \item Extensions will not make use of the Win32 API or standard library
198 calls---instead, they will interact only with the Tcl/Tk core.
200 \end{itemize}
203 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
204 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
205 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
206 \subsection{Utility}
208 In the assembly of IjuTools and supporting materials, I hope and believe
209 I've met the goal of providing something genuinely useful for microcontroller
210 software developers. I've listed below the characteristics of the tool set
211 which I feel most enhance its usefulness.
213 \begin{itemize}
214 \item \textbf{The tools can be used interactively as well as from a script.}
215 Because Tcl commands can be used
216 both interactively and from
217 a script, IjuScripter and IjuConsole are useful for interactive
218 tasks (file conversions, impromptu calculations). For example,
219 with no calculator handy, \texttt{expr sqrt(5)} can be used
220 interactively in IjuScripter or IjuConsole to obtain $\sqrt{5}$.
221 \item \textbf{The tools are suitable for orchestrating microcontroller
222 software builds.} Microcontroller software builds tend to be
223 awkward, complex, and to involve many steps---utilities such as
224 \texttt{MAKE} fall short in their ability to support
225 such builds. The Tcl scripting language
226 is rich enough to allow the automation of these kinds of software builds.
227 \item \textbf{The tools can be used as a general automation utility.}
228 The static executables provided can be used
229 to automate common office tasks; such as
230 removing all files last modified prior to a certain date,
231 or searching your boss' computer for information
232 about your colleagues' salaries while your boss is away at lunch.
233 \item \textbf{The full source code for the tools is available.} The full
234 source code for the tools is available at
235 \texttt{http://ijutools.sourceforge.net}.
236 The source code can be useful in several ways.
237 \begin{itemize}
238 \item The source code contains all project files for the GUI version
239 of Microsoft Visual C++. It can be used as a quick way to get
240 a Tcl/Tk GUI build for Windows up and going.\footnote{Two notes on this
241 \ldots{} First, the base source code is available from Scriptics
242 for free, but as of this writing, Scriptics does not support
243 a GUI build (instead, they provide a MAKE file). The port to
244 the GUI interface is not wholly straightforward and requires
245 some effort. Second,
246 Tcl/Tk version 8.3.1 is old and getting older (but the new
247 features added in subsequent versions don't make them any more
248 useful for microcontroller work).}
249 \item The source code can be used as the basis for another product.
250 \item The source code for Tcl extensions can be harvested for other
251 purposes. For example, functions to calculate the CRC32
252 are included to support the
253 Tcl/Tk extensions. This code could be harvested for other
254 uses.
255 \end{itemize}
256 \item \textbf{The IjuTools distribution contains useful materials not available
257 anywhere else.} The technical papers and supplemental materials included
258 are genuinely useful for microcontroller software work.
259 \end{itemize}
261 Overall, I hope I've met the aim of assembling and distributing something which is
262 genuinely \emph{useful}.
265 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
266 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
267 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
268 %Section Tag: EPL
269 \section{IjuTools Expansion And Development Plans}
271 Future development of the Iju tool set will focus [only] in the following directions.
273 \begin{itemize}
274 \item \textbf{Removal of any existing Tcl/Tk 8.3.1 bugs.} This is the very
275 highest priority, as any such bugs threaten the usability or
276 logical integrity of the tool.
277 \item \textbf{Development and co-development of new extensions useful in
278 microcontroller work.} Any suggestions that I receive for
279 extensions will be placed on my Web page, and I will attack them as
280 time and expertise permit. I also welcome co-development opportunities,
281 where other parties develop the extensions and I act in a review and
282 integration capacity.
283 \item \textbf{Acquisition of additional software useful in microcontroller work.}
284 I welcome contributions in this area, as well.
285 \item \textbf{Acquisition of additional books, technical papers, books, web links, and
286 other materials.} I welcome contributions in all of these areas. (Please keep in
287 mind that in order for me to distribute any contributed material with the Iju
288 tool set, I must have a letter of permission from the copyright holder.)
289 \end{itemize}
291 One direction that it won't be possible to go with the Iju tool set is enhancement of
292 the Tcl/Tk 8.3.1 core. The Tcl/Tk core is its own complexity, and I'd like to confine
293 any efforts there to correction of existing defects and neatening of the set
294 of source files.
298 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
299 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
300 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
301 \section{Common Parameter Formats}
302 %Section tag: CCL0
303 \label{ctin0:sccl0}
305 \emph{The Iju Tool Set} consists of the following components:
307 \begin{itemize}
308 \item The core of \emph{Tclsh} and \emph{Wish} (the \emph{Tcl}
309 language with \emph{Tk} graphic extensions).
311 \item Extensions to the language, added for utility in microcontroller
312 work or for research purposes.
314 \item A set of DOS command-line utilities.
315 \end{itemize}
317 Each of these components makes heavy use of strings. Since Tcl/Tk is
318 string-based (really, this is the \emph{only} Tcl data type), it is natural
319 to think of each Tcl/Tk command as accepting string arguments. Many of the
320 DOS command-line utilities accept arguments on the command-line which are
321 in exactly the same form as required by a Tcl/Tk extension, and hence
322 it is also useful to think of the DOS command-line utilities as
323 accepting string arguments. For this reason, all string parameter types
324 are documented together in this section.
326 When using Tcl/Tk extensions, the author of the Tcl/Tk script
327 has complete control over how strings are passed to the extension.
328 However, when using the DOS command-line utilities,
329 the DOS/Windows command-line
330 interpreter breaks the command-line into parameters based on the
331 occurence of whitespace (spaces and tabs) on the command line. These
332 parameters are passed to the utility itself as an array of strings.
333 It is possible to cause the command-line interpreter to pass parameters
334 containing whitespace by quoting the parameter. All of the IjuTools
335 command-line utilites will work correctly with whitespace embedded in
336 parameters if it is appropriate for the context (for example, whitespace
337 may be appropriate in a path name but not appropriate within an integer).
339 In this section, each different type of parameter is given a symbolic
340 tag (\texttt{urn}, for example). This symbolic tag is used in the description
341 of Tcl extensions and DOS utilities to denote parameters. In some cases,
342 additional descriptive information is concatenated to the symbolic
343 tag (\texttt{divisor\_urn} or \texttt{urn\_divisor}, for example) to
344 indicate the role the parameter fills.
347 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
348 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
349 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
350 \subsection{\texttt{winfname} Parameter Format}
351 %Section Tag: WNF0
352 \label{ctin0:sccl0:swnf0}
354 \index{winfname@\texttt{winfname}}
355 \texttt{winfname} is used to indicate a file whose name is used only through
356 the Windows operating system (i.e. to open a file, read from a file, etc.). File
357 names are ultimately arbitrated by the underlying operating system, which
358 in the case of any of \emph{The Iju Tool Set} components will always be a variant
359 of Microsoft Windows.
360 A parameter of type \texttt{winfname} may be any file name which Windows
361 will accept.
363 Note in parameters of type \texttt{winfname} that backslashes (`$\backslash$')
364 must normally be used in paths rather than forward slashes
365 (`/').\footnote{Note that this is different than the path conventions in Tcl
366 scripts. The reason for this is that Tcl seeks to be operating system
367 independent, so that the path separator is standardized to be the
368 forward slash.}
371 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
372 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
373 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
374 \subsection{\texttt{tclfname} Parameter Format}
375 %Section Tag: TCF0
376 \label{ctin0:sccl0:stcf0}
378 \index{tclfname@\texttt{tclfname}}
379 \texttt{tclfname} is used to indicate a file name as specified within a Tcl
380 script. This is normally the same as a Windows file name, except that
381 the forward slash rather than the backslash is used as the path separator.
384 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
385 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
386 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
387 \subsection{\texttt{winfpath} Parameter Format}
388 %Section Tag: WFP0
389 \label{ctin0:sccl0:swfp0}
391 \index{winfpath@\texttt{winfpath}}
392 \texttt{winfpath} is used to indicate a directory path in a format
393 acceptable to Microsoft Windows. This means that the path
394 separator is the backslash rather than the forward slash. In nearly all
395 cases the the path name may be specified with or without a trailing backslash.
398 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
399 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
400 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
401 \subsection{\texttt{tclfpath} Parameter Format}
402 %Section Tag: TCF1
403 \label{ctin0:sccl0:stcf1}
405 \index{tclfpath@\texttt{tclfpath}}
406 \texttt{tclfpath} is used to indicate a directory path in a format
407 acceptable inside a Tcl script. This means that the path
408 separator is the forward slash rather than the backslash.
409 In nearly all cases the path name may be specified with or without
410 a trailing forward slash.
413 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
414 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
415 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
416 \subsection{\texttt{uint} Parameter Format}
417 %Section Tag: UIN0
418 \label{ctin0:sccl0:suin0}
420 \index{uint@\texttt{uint}}
421 \texttt{uint} is used to indicate an arbitrarily large unsigned integer
422 (\emph{unsigned} means non-negative). The following formats are accepted:
424 \begin{itemize}
425 \item \emph{A string of digits.} Examples: ``0'', ``342'', ``4912947'', etc.
426 Note in this format that the only acceptable representation of
427 zero is ``0'' (``00'' will not be accepted).
428 \item \emph{A string of digits with commas.} Examples: ``0'',
429 ``342'', ``4,921''. Note that if \emph{any} commas occur
430 in the string of digits, \emph{every} comma must be
431 properly placed. For example, ``49,241,34'' will not be accepted
432 as an integer. In this format, the only acceptable representation
433 of zero is ``0''.
434 \item \emph{An integer expressed as a number in scientific notation.}
435 ``3.14e2'' will be accepted as the integer ``314''. Numbers in
436 scientific notation that do not evaluate to integers, such
437 as ``3.12e1'', will not be accepted.
438 \end{itemize}
441 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
442 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
443 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
444 \subsection{\texttt{sint} Parameter Format}
445 %Section Tag: SIN0
446 \label{ctin0:sccl0:ssin0}
448 \index{sint@\texttt{sint}}
449 \texttt{sint} is used to indicate a signed integer
450 of arbitrary magnitude. (By \emph{signed} we mean
451 that the integer may be negative, zero, or positive.)
453 Any format described for the \emph{uint} parameter format
454 in Section \ref{ctin0:sccl0:suin0} (immediately above)
455 will be accepted, with the relaxation that a minus sign
456 (`-') may be included in front of the integer. As described
457 above, the integer zero may have only one `0' digit.
458 Additionally, the parsing strategies have been relaxed to
459 allow zero to be negated, i.e. ``-0'' is allowed (but
460 ``-00'' is not). \footnote{This parsing relaxation was made to allow for the
461 possibility that some software may output negative numbers
462 close to zero in forms such as ``-0.000e+000''. The
463 permissiveness in the parsing was deliberate.}
466 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
467 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
468 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
469 \subsection{The \texttt{uint8}, \texttt{uint16},
470 \texttt{uint24},
471 \texttt{uint32}, \texttt{uint64}, And
472 \texttt{uint128} Parameter Formats}
473 %Section Tag: UIG0
474 \label{ctin0:sccl0:suig0}
476 \index{uint8@\texttt{uint8}}
477 \index{uint16@\texttt{uint16}}
478 \index{uint24@\texttt{uint24}}
479 \index{uint32@\texttt{uint32}}
480 \index{uint64@\texttt{uint64}}
481 \index{uint128@\texttt{uint128}}
482 The \texttt{uint8}, \texttt{uint16},
483 \texttt{uint32}, \texttt{uint64}, and
484 \texttt{uint128} are unsigned integers with the
485 number of bits implied by the name. Such integers
486 may assume values from 0 through $2^{N} - 1$,
487 where $N$ is the number of bits.
489 For example, a \texttt{uint8} may assume values from
490 0 through 255.
493 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
494 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
495 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
496 \subsection{The \texttt{sint8}, \texttt{sint16},
497 \texttt{sint24},
498 \texttt{sint32}, \texttt{sint64}, And
499 \texttt{sint128} Parameter Formats}
500 %Section Tag: SIG0
501 \label{ctin0:sccl0:ssig0}
503 \index{sint8@\texttt{sint8}}
504 \index{sint16@\texttt{sint16}}
505 \index{sint24@\texttt{sint24}}
506 \index{sint32@\texttt{sint32}}
507 \index{sint64@\texttt{sint64}}
508 \index{sint128@\texttt{sint128}}
509 The \texttt{sint8}, \texttt{sint16},
510 \texttt{sint32}, \texttt{sint64}, and
511 \texttt{sint128} are signed integers with the
512 number of bits implied by the name. Such integers
513 may assume values from $-2^{N-1}$ through $2^{N-1} - 1$,
514 where $N$ is the number of bits.
516 For example, a \texttt{sint8} may assume values from
517 -128 through 127.
520 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
521 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
522 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
523 \subsection{The \texttt{rint8}, \texttt{rint16}, \texttt{rint24},
524 \texttt{rint32}, \texttt{rint64}, And
525 \texttt{rint128} Parameter Formats}
526 %Section Tag: RIG0
527 \label{ctin0:sccl0:srig0}
529 \index{rint8@\texttt{rint8}}
530 \index{rint16@\texttt{rint16}}
531 \index{rint24@\texttt{rint24}}
532 \index{rint32@\texttt{rint32}}
533 \index{rint64@\texttt{rint64}}
534 \index{rint128@\texttt{rint128}}
535 The \texttt{rint8}, \texttt{rint16},
536 \texttt{rint32}, \texttt{rint64}, and
537 \texttt{rint128} are unsigned (i.e. non-negative)
538 integers which do not exceed the maximum positive
539 value that a signed integer of the same size could
540 attain. Such integers may assume values from 0
541 through $2^{N-1} - 1$,
542 where $N$ is the number of bits.
544 For example, a \texttt{rint8} may assume values from
545 0 through 127.
548 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
549 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
550 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
551 \subsection{The \texttt{urn} Parameter Formats}
552 %Section Tag: URN0
553 \label{ctin0:sccl0:surn0}
555 \index{urn@\texttt{urn}}
556 The \texttt{urn} parameter type is a non-negative rational number with
557 non-negative integer components of arbitrary magnitude.
558 There are two ways to specify such a rational
559 number.
561 \begin{enumerate}
562 \item \emph{Integer components, separated by a forward slash.}
563 ``1/3'', ``0/49'', and ``36/1e31'' are acceptable. A denominator
564 of zero is not allowed.
565 \item \emph{A number in scientific notation.} The general accepted
566 form is
568 \texttt{[digs|digs.|.digs|digs.digs][e|E[[+|-]digs]]},
570 where \texttt{digs} represents a series of digits and the
571 vertical bar (`\texttt{|}') separates a string of parameters,
572 only one of which is allowed to appear. Numbers of this
573 type are always rational and will be converted to a rational
574 number for calculation. A unary `+' before the mantissa is allowed.
575 \end{enumerate}
578 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
579 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
580 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
581 \subsection{The \texttt{srn} Parameter Formats}
582 %Section Tag: SRN0
583 \label{ctin0:sccl0:ssrn0}
585 \index{srn@\texttt{srn}}
586 The \texttt{srn} parameter type is a signed arbitrary rational number
587 (by \emph{signed} we mean that it may be negative, zero, or positive).
588 This format is identical to the format
589 described in Section \ref{ctin0:sccl0:surn0}, immediately above,
590 with the relaxation that a unary `-' is allowed to indicate a
591 negative number.
594 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
595 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
596 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
597 \section{A High-Speed Tour Of Tcl And Tk}
599 \subsection{Invoking Tclsh, Wish, IjuScripter, And IjuConsole}
601 \subsection{General Features Of Tcl}
603 \subsection{Statements}
605 \subsection{Procedures}
607 \subsection{The \emph{expr} Command}
609 \subsection{Conditional Control Constructs}
611 \subsection{Looping Constructs}
613 \subsection{File And Console I/O}
615 \subsection{Obtaining Command-Line Arguments}
617 \subsection{A Sample Program}
620 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
621 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
622 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
623 \section{Additional Resources For Learning Tcl And Tk}
625 This chapter has provided a brief tutorial of Tcl and Tk---enough
626 information to begin writing basic scripts which use the microcontroller
627 extensions in IjuTools. However, to use Tcl and Tk in a competent
628 fashion, additional materials and additional study are required.
633 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
634 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
635 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
636 \section{Acknowledgements}
638 What I've called \emph{The Iju Tool Set} would not have been possible in
639 its present form without the outstanding technical work by the engineers
640 at Scriptics, Ajuba Solutions, and Interwoven; plus contributors and
641 newsgroup posters from all over the world. I had discussed with colleagues
642 the possibility of an interpreted language to integrate tools, but I never
643 could have done such a masterful job as Scriptics has done; and I was fortunate
644 to discover Tcl/Tk.
646 For proposing Tcl and Tk as a solution to my particular integration
647 problem, I'm grateful to Les Hatton \cite{bibref:i:leshatton}.
649 For generous
650 technical support from Scriptics/Ajuba/Interwoven, I'm grateful to
651 Jeff Hobbs \cite{bibref:i:jeffreyhobbs}, Dan Kuchler \cite{bibref:i:dankuchler},
652 and John Ousterhout \cite{bibref:i:johnousterhout}.
653 I'm also grateful to all of the newsgroup posters who
654 answered questions and offered suggestions, including
655 but not limited to Jan Nijtmans and Dave Graveaux.
657 For providing a solution (the \emph{mktclapp} program) which allows
658 the construction of a standalone Wish executable without the
659 requirement for external library script files, I'm grateful to
660 D. Richard Hipp \cite{bibref:i:drichardhipp}.
662 For testing installation packages and executables for the
663 Win32 platform and offering
664 prompt and detailed feedback about problems, I'm grateful to
665 Mirza Kolokovic \cite{bibref:i:mirzakolakovic}.
667 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
668 \noindent\begin{figure}[!b]
669 \noindent\rule[-0.25in]{\textwidth}{1pt}
670 \begin{tiny}
671 \begin{verbatim}
672 $HeadURL$
673 $Revision$
674 $Date$
675 $Author$
676 \end{verbatim}
677 \end{tiny}
678 \noindent\rule[0.25in]{\textwidth}{1pt}
679 \end{figure}
680 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
681 %
682 %End of file C_TIN0.TEX


Name Value
svn:eol-style native
svn:keywords Author Date Id Revision URL Header

ViewVC Help
Powered by ViewVC 1.1.25