Posted to tcl by Guest86 at Mon Nov 24 12:03:21 GMT 2025view raw

  1. namespace im tcl::mathop::*
  2.  
  3. proc P x {
  4. puts $x
  5. set f [string range $x 1 end-1]
  6. puts $f
  7.  
  8. #try 1
  9. #return $x
  10.  
  11. #try 2
  12. #return [$f]
  13. }
  14.  
  15.  
  16. lmap x {
  17. "[+ -4 5]"
  18. "[/ [+ 4 [* 2 5]] [+ 1 [* 3 2]]]"
  19. } {
  20. puts $x:
  21. puts [P $x]
  22. }
  23.  

Add a comment

Please note that this site uses the meta tags nofollow,noindex for all pages that contain comments.
Items are closed for new comments after 1 week