Am 13.10.2015 03:34 schrieb "Flávio Etrusco" <[email protected]>: > > On Mon, Oct 12, 2015 at 7:15 PM, David W Noon > <[email protected]> wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > On Mon, 12 Oct 2015 15:11:18 -0400, Wkitty42 ([email protected]) > > wrote about "Re: [fpc-devel] Fwd: While - Otherwise Statement" (in > > <[email protected]>): > > > >> 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?
The intrafunctional gotos not really. But the interfunctional ones (modeswitch nonlocalgoto in 2.7.1+) might mess with managed types ;) Regards, Sven
_______________________________________________ fpc-devel maillist - [email protected] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
