Tom Christiansen writes:
> >However, I really don't want to see 'return' become a kind of 'last'
> >for do{}. How would I return from a subroutine from within a do loop?
>
> You already can't do that (as it were) from within an eval.
Yes, but 'eval' has the semantics "run this code but don't let it play
any funny tricks on me, like dying or anything", where 'do {...} while'
has the semantics "a while loop that evaluates its condition at the
end". There's no obvious reason why 'return' should behave
differently in a 'do while' loop than it does in a 'while' loop.
However, if you want to make return behave differently in 'do {...};'
versus 'do {...} while ...;' I wouldn't object too strenuously; I just
think it would be confusing.
--
Chris Madsen http://www.trx.com [EMAIL PROTECTED]
TRX Technology Services (214) 346-4611
- Re: The distinction between "do BLOCK while CON... Peter Scott
- Re: The distinction between "do BLOCK whil... Nathan Torkington
- Re: The distinction between "do BLOCK ... Tom Christiansen
- Re: The distinction between "do BL... Bart Lateur
- Re: The distinction between "d... Tom Christiansen
- Re: The distinction between &q... Christopher J. Madsen
- Re: The distinction betwee... Jonathan Scott Duff
- Re: The distinction betwee... Christopher J. Madsen
- Re: The distinction betwee... Jonathan Scott Duff
- Re: The distinction betwee... Tom Christiansen
- Re: The distinction betwee... Christopher J. Madsen
- Re: The distinction betwee... Tom Christiansen
- Re: The distinction betwee... Christopher J. Madsen
- do BLOCK as inline sub? (w... Uri Guttman
- Re: The distinction between "do BL... Peter Scott
- Re: The distinction between "d... Christopher J. Madsen
- Re: The distinction between &q... Peter Scott
- Re: The distinction betwee... Tom Christiansen
- Re: The distinction betwee... Chaim Frenkel
- Re: The distinction betwee... Tom Christiansen
- Re: The distinction betwee... Chaim Frenkel
