On Mon, Oct 12, 2015 at 7:15 PM, David W Noon
<david.w.n...@googlemail.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Mon, 12 Oct 2015 15:11:18 -0400, Wkitty42 (wkitt...@windstream.net)
> wrote about "Re: [fpc-devel] Fwd: While - Otherwise Statement" (in
> <561c05d6.4010...@windstream.net>):
>
>> On 10/12/2015 02:02 PM, Dmitry Boyarintsev wrote:
>>>
>>> The next step would probably be controlled "break", where a user
>>> would be able to specify how many nested loops needed to broken
>>> from.
>
> Hi Mark,
>
> You might have seen me write things like this in the old OS2PROG echo
> of Fidonet some 20+ years ago. ... :-)
>
> The only language I know that offers that level of control is PL/I,
> where the break statement is coded as LEAVE.  It is handled by
> labelling the loop control statement and coding the required label in
> the LEAVE statement. For example:
>
>    loop_1: DO i = 1 TO m;
>       loop_2 : DO j = 1 TO n;
>          loop_3: DO k = 1 TO p;
>            ...
>            IF some_condition THEH
>               LEAVE loop_3;[...]

If I'm not missing something, Java implements 'break' just like this.
I'd like such enhancement, but right now is there any reason to avoid
'goto' besides the bad karma?

Regards,
Flávio
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to