From: Jeremy Henty Date: 2002-07-14T02:20:00+09:00 Subject: Re: for ... else ... end In article <3D2F06C2.7080603@path.berkeley.edu>, Joel VanderWerf wrote: > Marcin 'Qrczak' Kowalczyk wrote: >> Thu, 11 Jul 2002 08:31:22 +0900, Yukihiro Matsumoto pisze: > .. >>>Besides, I'm not sure whether YACC allows multiple block syntax. >> >> >> I guess it would like them: if "optional block" is recognizable >> after plain args, it should also be recognizable after a block >> already occurred. > > Tcl handles it somehow: > > if { $x > 0 } { puts positive } { puts nonpositive } But in Tcl, those "blocks" are syntactically just strings. The "if" command chooses to treat its arguments as code, but that happens after the command is parsed. Tcl doesn't have any kind of block syntax at all; it has string syntax, and some of its commands treat strings as code. Regards, Jeremy Henty