home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / Other Langs / Tickle-4.0 (tcl) / scripts / callback.tcl < prev    next >
Encoding:
Text File  |  1993-11-19  |  757 b   |  28 lines  |  [TEXT/$Tcl]

  1.  
  2. set d 25;
  3. set e 60;
  4.  
  5. puts stdout [xtclcmd callback \
  6.     { format "$d * $e = [expr "$d * $e"]" }];
  7.  
  8. puts stdout [xtclcmd -f PXTCL_callback callback \
  9.     { format "$d * $e = [expr "$d * $e"]\n" }];
  10.  
  11. puts stdout [xtclcmd -f PASCAL_callback callback \
  12.     { format "$d * $e = [expr "$d * $e"]\n" }];
  13.  
  14. puts stdout [xtclcmd -f XTCL_callback callback \
  15.     { format "$d * $e = [expr "$d * $e"]\n" }];
  16.  
  17. puts stdout [xtclcmd -f XTCL_callback callback {expr "$d * $e"}]
  18.  
  19. puts stdout [xtclcmd -f XTCL_callback callback \
  20.     { print "$d * $e = [expr "$d * $e"]\n" }];
  21.  
  22. puts stdout [xtclcmd -f XTCL_callback callback { get_directory }];
  23.  
  24. puts stdout [xtclcmd -f XTCL_callback callback \
  25.     { set a 5 ; set b 8 ; format "$a * $b = [expr "$a * $b"]\n" }];
  26.  
  27. puts stdout "Hello World!";
  28.