On 9/14/06, Beni Cherniavsky <[EMAIL PROTECTED]> wrote: > On 14/09/06, Axel Liljencrantz <[EMAIL PROTECTED]> wrote: > > On 9/14/06, Philip Ganchev <[EMAIL PROTECTED]> wrote: > > > On 9/13/06, Axel Liljencrantz <[EMAIL PROTECTED]> wrote: > > > > While this loop will execute _once_ after which time the end command > > > > will fail: > > > > > > > > for i in 1 2 3; echo $i; end (echo no) > > > > > > Why doesn't it do the same as with the ``if`` block when the end > > > condition fails, namley to fail before executing the body? > > > > Because in my opinion it would be very confusing if the end command > > executed before the contents of the loop. > > > But things like ``end (echo no)`` are useless, because the right > answer is always known and you only wish to state it clearly. If you > disallow expansions in end's argument, it could be checked as part of > the syntax checks before the command is ever run, which I think would > be much more intuitive.
You could do that, but there is honestly no reason to _ever_ write 'end (echo no)', so I don't see why you should change the language syntax to make it larger and less consistent just to disallow it. > > -- > Beni Cherniavsky <[EMAIL PROTECTED]>, who can only read email on weekends. > -- Axel ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Fish-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fish-users
