-------- Original Message -------- Subject: Re: Unreachable label Date: Mon, 11 Jun 2007 13:13:06 +0200 From: MegaBrutal megabrutal@gmail.com To: Adriaan van Os gpc@microbizz.nl References: 466D0430.70706@microbizz.nl
I don't recommend to use labels and goto statements at all. It just messes the code and tells about bad programming manners.
2007/6/11, Adriaan van Os gpc@microbizz.nl:
Any comment on http://www.freepascal.org/mantis/view.php?id=9053 and Daniël Mantione's note ?
Regards,
Adriaan van Os
Gotos have use for automatically generated code, for example the re2c Lexer generator. I made a re2p (prototype), which generates similar pascal code with goto's and it compiles into efficient code with Delpi 2005. Except that generating label definitions is a pain :^(.
Regards
Bart van den Broek.
From: Adriaan van Os gpc@microbizz.nl To: gpc@gnu.de Subject: [Fwd: Re: Unreachable label] Date: Mon, 11 Jun 2007 13:14:49 +0200
-------- Original Message -------- Subject: Re: Unreachable label Date: Mon, 11 Jun 2007 13:13:06 +0200 From: MegaBrutal megabrutal@gmail.com To: Adriaan van Os gpc@microbizz.nl References: 466D0430.70706@microbizz.nl
I don't recommend to use labels and goto statements at all. It just messes the code and tells about bad programming manners.
2007/6/11, Adriaan van Os gpc@microbizz.nl:
Any comment on http://www.freepascal.org/mantis/view.php?id=9053 and Daniël Mantione's note ?
Regards,
Adriaan van Os
_________________________________________________________________ Het meest spraakmakende nieuws vind je op www.msn.nl http://www.msn.nl
Bart van den Broek wrote:
Gotos have use for automatically generated code, for example the re2c Lexer generator.
I don't know this program, but e.g. flex doesn't generate any gotos, even tough it generates C where gotos are somewhat more common than in Pascal, but instead uses a switch (case) statement. (Actually, the flex output does contain a few gotos, but funnily in the hand-written code which is just copied into the output. So I suppose they could be replaced in this code just as well as in any other code.)
Frank