[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: another take on hackers and painters




   Date: Thu, 22 May 2003 15:34:39 +0200 (CEST)
   From: Jakub Travnik <J.Travnik@sh.cvut.cz>
   
   From: Vadim Nasardinov <vadimn@attbi.com>
   Date: Wed, 21 May 2003 17:06:45 -0400
   
   > Dan Sugalski wrote:
   >  > Someone sent me private mail that boiled down to "Well, should
   >  > 1 + '2 * 5' evaluate to 11, then?"
   > 
   > It does in Tcl:
   > 
   > $ tcl -c 'puts [expr 1 + "2*5"]'
   > 11
   > 
   
   Tcl does even more:
   
   tcl>puts [expr 2 * "5+1"]
   11
   tcl>puts [expr 2 "*" 5 "+" 1]
   11
   
Or, for that matter:

   tcl>puts [expr "2*" 5 "+1"]
   11
   tcl>puts [expr 2 "*5+" 1]
   11

--Guy