home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / tcl / tcl_1 / !Tcl_!Help < prev    next >
Encoding:
Text File  |  1996-03-31  |  7.3 KB  |  169 lines

  1. Introduction to Tcl, tclsh and shade
  2.  
  3. THIS SYSTEM REQUIRES RISCOS 3.1 OR LATER
  4.  
  5. IT IS SUPPLIED WITHOUT ANY FORM OF WARRANTY OR RESPONSIBILITY FOR ITS USE.
  6. See below for conditions.
  7.  
  8. Tcl (pronounced tickle ) is a simple interpreted scripting language.
  9. It is extensible in that it is easy to add commmands to Tcl, and embeddable
  10. in that it can be included in other applications. 
  11.  
  12. Tcl was invented and implemented by John K.Ousterhout, originally for unix
  13. systems. It is usually used with an extension to the x windowing system called 
  14. Tk, either embedded in applications, or using a general purpose Tcl/Tk program
  15. called wish. Tcl can also be used from the command line using another program
  16. called tclsh. Unix Tcl is split into a generic part and a POSIX extension, 
  17. containing the unix-specific operations such as file handling.
  18.  
  19. This distribution contains analogs of the above components for RISCOS machines. 
  20. It contains a Tcl interpreter for generic Tcl with RISCOS extensions that can
  21. be run from from the command line using a program tclsh.
  22. It contains an extension of Tcl for writing simple wimp programs called w. This
  23. is run from a program called shade.
  24.  
  25. The RISCOS extensions provide equivalent functions to most of the POSIX 
  26. extensions that are appropriate for RISCOS.
  27.  
  28. Note that w does not attempt to be compatible with, or as comprehensive as Tk.
  29. It provides an iconbar icon, menus, simple dialog boxes, scrolling windows for
  30. text display, and windows for draw type graphics. It can run command line tasks
  31. using the taskwindow system.
  32.  
  33. The tclsh interpreter can be run in a taskwindow by double clicking on the
  34. !Tcl icon. You will need to have a program running to provide taskwindow
  35. display such as zap or edit.
  36.  
  37. ================================================================================
  38. Documentation
  39.  
  40. The Tcl Language is documented in the book "Tcl and the Tk Toolkit"
  41. by J.K.Ousterhout (Addison Wesley 1994) ISBN 0-201-63337-X.
  42.  
  43. Online documentation in the form of unix man pages are provided. These are  
  44. included in this distribution with an example shade program that displays them.
  45.  
  46. Tcl has a very regular and simple but unfamiliar syntax. If you have not used
  47. Tcl before you should attempt to master this before writing Tcl code, otherwise
  48. you will find it a very frustrating experience. You can read chapter 3 of the
  49. book or the syntax file in the online documentation. You can experiment with
  50. Tcl by running tclsh in a task window.
  51.  
  52. The !Tcl.doc directory contains the following
  53.  
  54. README        README file from the Tcl 7.4 distribution.
  55. changes       changes file from the Tcl 7.4 distribution.
  56. RISCOS        Documentation on the RISCOS extensions to Tcl. These are
  57.               replacements for some of the POSIX function that are not included.
  58. tclsh         Documentation on calling the command line interface to tcl.
  59. shade         Documentation on calling Tcl with the w desktop extensions.
  60. Manual.TeX    LaTeX manual for the w extensions.
  61.  
  62. Several shade example programs are included. They each have a !Help file.
  63. The !wtest program does nothing useful, but includes commented examples
  64. of most of the w commands.
  65.  
  66. ================================================================================
  67. Copyright
  68.  
  69. The Tcl source is  Copyright (c) The Regents of the University of California.
  70. See the file !Tcl.licence for conditions.
  71.  
  72. The RISCOS and w extensions are copyright C.T.Stretch they may be used or
  73. distributed in any manner compatible with the Tcl copyright, provided
  74. that all copyright statements including this file remain intact.
  75.  
  76. ALL MATERIAL IN THIS DISTRIBUTION IS PROVIDED WITH NO WARRANTY WHATSOEVER
  77. USE IT AT YOUR OWN RISK
  78.  
  79. ================================================================================Changes from the previous release
  80.  
  81. There is now an officially allocated file type for Tcl scripts, 0x12e.
  82.  
  83. There are no changes to Tcl itself.
  84. The only change to the RiscOS extensions are the addition of the date command.
  85.  
  86. The w extensions have a number of bug fixes, and the addition of new commands
  87. w_send, w_null and w_info. In addition there are some changes that may
  88. require alteration to code that ran under w version 1.1:
  89.  
  90. 1) The separation of %d and %w percent substitution has been made more logical.
  91. Dialog box scripts always set %d, menus and windows set %w.
  92.  
  93. 2) The interpretation of results returned by scripts has been made more
  94. consistent. Returning an empty string is now always equivalent to returning
  95. zero. This changes the behavior of action icons in dialog boxes. They now need
  96. to return 1 if the dialog box is to be kept open. This is now easier to
  97. achieve as the return command can now be used to return from any script.
  98.  
  99. 3) A wimpslot of 160K is now required to unsqueeze the shade executable.
  100. This may require changing the !Run files.
  101.  
  102. ================================================================================
  103. The source code
  104.  
  105. This distribution is based on Tcl version 7.4
  106.  
  107. The makefile is for use with Acorn's !Make.
  108. The binaries included were made with Acorn C v 5.06 and OSLib v 5.1
  109.  
  110. To use the makefile the include path C: has to include the ANSI and OSLib
  111. headers. The tboxlibs headers are not needed, if they are in your include path
  112. ensure they are AFTER OSLib, otherwise you will get the wrong h.wimp!
  113.  
  114. Source files from the 7.4 distribution that are not used in the RISCOS version
  115. are included in subdirectory !Tcl.unused.
  116.  
  117. The Tcl test files that come with Tcl 7.4 are included. They are run from the
  118. obey file !RunTests in the !Tcl.Tests directory. Some of the unix test files,
  119. do not work as they use unix specific features. These are contained in 
  120. !Tcl.test.fail, a few minor modifications were made to other test files to
  121. avoid unix specific features. These are commented on as the tests are run.
  122.  
  123.  
  124. ================================================================================
  125. Common Questions
  126.  
  127. Q1) Why have I not ported Tk?
  128.  
  129. A) Tk is very closely tied to X-windows. X-windows has major differences from
  130.    the RiscOS wimp. Porting Tk would be very hard work, and probably beyond me.
  131.    A Tk port would be tied to the X/Mosaic look and feel, which would not
  132.    fit at all well with the RicsOS Style Guide.
  133.    If you want to try porting Tk I wish you the best of luck.
  134.    
  135. Q2) Shade programs crash when I click on dbox buttons, particularly the
  136.     Quit button in the Debug dialog box.
  137.    
  138. A) This does not happen to me! I think it is due to a RiscOS bug using 3-D
  139.    icons, it tries to pop the button up after the dialog box has gone.
  140.    This does not occur with more recent versions of RiscOS. The cure is to
  141.    run the BorderUtils module that comes with !NewLook.
  142.  
  143. Q3) Why is Tcl so slow?
  144.  
  145. A)  It is a completely interpreted language, with no attempt to precompile
  146.     anything. As it works only with strings it is very slow at any arithmetic,
  147.     where it converts strings to numbers, and then converts back to strings.
  148.     It is fast enough for many user-inteface purposes.
  149.  
  150. ================================================================================
  151. Contact
  152.  
  153. I would be pleased to hear bug reports or general comments about this
  154.  distribution. I can be contacted at
  155.  
  156.            ct.stretch@ulst.ac.uk
  157.  
  158. or         C.T.Stretch,
  159.              Depatment of Mathematics,
  160.                University of Ulster,
  161.                  Coleraine Co. Londonderry,
  162.                    BT52 1SA
  163.                      NORTHERN IRELAND
  164.  
  165. New versions will be provided by electronic media only (probably HENSA).
  166.  
  167.  
  168.  
  169.