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

Reply via email to