You are viewing a plain text version of this content. The canonical link for it is here.
Posted to site-cvs@tcl.apache.org by da...@apache.org on 2001/12/07 21:59:25 UTC

cvs commit: tcl-site/presentations/tcl/tcl calc.tcl

davidw      01/12/07 12:59:25

  Modified:    presentations/tcl order.txt powerful.ttml timeline.ttml
                        tkintro.ttml
               presentations/tcl/tcl calc.tcl
  Log:
  Cleaned up a few things, simplified calc.
  
  Revision  Changes    Path
  1.2       +3 -1      tcl-site/presentations/tcl/order.txt
  
  Index: order.txt
  ===================================================================
  RCS file: /home/cvs/tcl-site/presentations/tcl/order.txt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- order.txt	2001/12/06 11:29:02	1.1
  +++ order.txt	2001/12/07 20:59:25	1.2
  @@ -6,11 +6,13 @@
   easy
   example1 
   flexibility
  -lightweight
   embeddable
   ccommand
   extensible
   powerful
  +lightweight
  +multiplatform
  +commercial
   webserver
   tk
   tkintro
  
  
  
  1.2       +6 -1      tcl-site/presentations/tcl/powerful.ttml
  
  Index: powerful.ttml
  ===================================================================
  RCS file: /home/cvs/tcl-site/presentations/tcl/powerful.ttml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- powerful.ttml	2001/12/06 11:29:02	1.1
  +++ powerful.ttml	2001/12/07 20:59:25	1.2
  @@ -13,7 +13,7 @@
         The core language gives you a lot - and extensions give you the rest.
       <p>
       <ul>      
  -      <li>Object orientation: [incr Tcl]</li>
  +      <li>Object oriented programming: [incr Tcl]</li>
         <li>Web: mod_dtcl, AOLServer, tclhttpd</li>
         <li>Database: postgresql, oracle, mysql, etc...</li>
         <li>Data structures: graphs, trees</li>
  @@ -21,6 +21,11 @@
         <li>System Administration: expect, scotty (SNMP)</li>
         <li>Unix facilities: TclX</li>
       </ul>
  +
  +    Tcl is fast - it's byte compiled at run time, like Python.  It
  +    also has a lot of high level things that you would expect in a
  +    scripting language - lists, hash tables, easy to use socket
  +    commands, etc...
   
     </body>
   </html>
  
  
  
  1.2       +1 -1      tcl-site/presentations/tcl/timeline.ttml
  
  Index: timeline.ttml
  ===================================================================
  RCS file: /home/cvs/tcl-site/presentations/tcl/timeline.ttml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- timeline.ttml	2001/12/06 11:29:02	1.1
  +++ timeline.ttml	2001/12/07 20:59:25	1.2
  @@ -9,7 +9,7 @@
       <? prevnext "<h1>Timeline</h1>" ?>
   
       <ul>
  -      <li>1998 Tcl created</li>
  +      <li>1988 Tcl created</li>
         <li>1990
   		Tk toolkit usable.  Ousterhout presents Tcl at the Usenix conference.</li>
         <li>1994
  
  
  
  1.2       +8 -8      tcl-site/presentations/tcl/tkintro.ttml
  
  Index: tkintro.ttml
  ===================================================================
  RCS file: /home/cvs/tcl-site/presentations/tcl/tkintro.ttml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- tkintro.ttml	2001/12/06 11:29:02	1.1
  +++ tkintro.ttml	2001/12/07 20:59:25	1.2
  @@ -13,17 +13,17 @@
   fashion.
   
   <PRE>
  -<B><FONT COLOR="#A020F0">label</FONT></B> .result -<B><FONT COLOR="#A020F0">text</FONT></B> <B><FONT COLOR="#BC8F8F">&quot;Result&quot;</FONT></B>
  -<B><FONT COLOR="#A020F0">entry</FONT></B> .input 
  +<B><FONT COLOR="#A020F0">label</FONT></B> .result -textvariable Result -anchor e
  +<B><FONT COLOR="#A020F0">entry</FONT></B> .input -textvariable Input
   
  -<B><FONT COLOR="#A020F0">grid</FONT></B> .result -sticky news
  -<B><FONT COLOR="#A020F0">grid</FONT></B> .input -sticky news
  +<B><FONT COLOR="#A020F0">pack</FONT></B> .result -fill both -expand 1
  +<B><FONT COLOR="#A020F0">pack</FONT></B> .input -fill both -expand 1
   
   <B><FONT COLOR="#A020F0">bind</FONT></B> .input &lt;Return&gt; {
  -    <B><FONT COLOR="#A020F0">if</FONT></B> {[<B><FONT COLOR="#A020F0">catch</FONT></B> {
  -	.result configure -<B><FONT COLOR="#A020F0">text</FONT></B> [<B><FONT COLOR="#A020F0">expr</FONT></B> [.input get]]
  -    } err]} {
  -	.result configure -<B><FONT COLOR="#A020F0">text</FONT></B> $<FONT COLOR="#B8860B">err</FONT>
  +    <B><FONT COLOR="#A020F0">if</FONT></B> { [<B><FONT COLOR="#A020F0">catch</FONT></B> {
  +	<B><FONT COLOR="#A020F0">set</FONT></B> Result [<B><FONT COLOR="#A020F0">expr</FONT></B> $<FONT COLOR="#B8860B">Input</FONT>]
  +    } err] } {
  +	<B><FONT COLOR="#A020F0">set</FONT></B> Result $<FONT COLOR="#B8860B">err</FONT>
       }
   }</PRE>
   
  
  
  
  1.2       +8 -8      tcl-site/presentations/tcl/tcl/calc.tcl
  
  Index: calc.tcl
  ===================================================================
  RCS file: /home/cvs/tcl-site/presentations/tcl/tcl/calc.tcl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- calc.tcl	2001/12/06 11:29:03	1.1
  +++ calc.tcl	2001/12/07 20:59:25	1.2
  @@ -1,13 +1,13 @@
  -label .result -text "Result"
  -entry .input 
  +label .result -textvariable Result -anchor e
  +entry .input -textvariable Input
   
  -grid .result -sticky news
  -grid .input -sticky news
  +pack .result -fill both -expand 1
  +pack .input -fill both -expand 1
   
   bind .input <Return> {
  -    if {[catch {
  -	.result configure -text [expr [.input get]]
  -    } err]} {
  -	.result configure -text $err
  +    if { [catch {
  +	set Result [expr $Input]
  +    } err] } {
  +	set Result $err
       }
   }