home *** CD-ROM | disk | FTP | other *** search
/ Practical Programming in Tcl & Tk (4th Edition) / TCLBOOK4.BIN / pc / exsource.old / 8_1.tcl < prev    next >
Text File  |  2003-04-15  |  135b  |  12 lines

  1. #
  2. # Example 8-1
  3. # Using arrays.
  4. #
  5.  
  6. set arr(0) 1
  7. for {set i 1} {$i <= 10} {incr i} {
  8.     set arr($i) [expr {$i * $arr([expr {$i-1}])}]
  9. }
  10.  
  11.  
  12.