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

Re: Pascal for IIgs...



Mike Westerfield <MikeW50@aol.com> wrote:

> The use of named labels for C's goto statement is nice. What's nice about
> Pascal is the fact that they actually work for the one undeniably reasonable
> purpose you need a goto statement for: error handling. C's goto statement is
> limited to the current subroutine. Pascal's is not! I can jump from a
> subroutine to any externally nested subroutine, or right back to the main
> program. It's difficult to implement, but one of the coolest features of
> Pascal.

C can do this in a slightly messy but more powerful fashion using
setjmp() and longjmp(), of course.

-- 
David Empson
dempson@actrix.gen.nz
Snail mail: P.O. Box 27-103, Wellington, New Zealand