[fpc-pascal] Re: using exceptions

Lukasz Sokol el.es.cr at gmail.com
Wed Jan 4 15:11:38 CET 2012


On 04/01/2012 12:49, Bernd wrote:
> 2012/1/3 Lars <noreply at z505.com>:
> 
>> But that just a goto statement going to the except label.. Exceptions in a
>> way are actually forcing you to write your code in  a GOTO way.
> 
> I would see Exceptions as being more like the fabled COMEFROM, the
> legendary counterpart of the GOTO.

http://en.wikipedia.org/wiki/COMEFROM

this is not a fabled or legendary construct... it actually does exist.

but I see exceptions rather like a 'trap' redirecting to fixed area ?

in quasi-linux-kernel-c:

if (unlikely(error(expression)) then goto except_area;

wrapping _every_ expression between try...except, (or try...finally too)
(try...except only having a check: if no error, skip the except_area)

(by my thoughts and imaginations only)

L.




More information about the fpc-pascal mailing list