RE: "continue/next" for "loop"
From: amado.alves (amado.alves_at_netcabo.pt)
Date: 11/03/03
- Next message: Preben Randhol: "Re: "continue/next" for "loop""
- Previous message: Lutz Donnerhacke: "Re: "continue/next" for "loop""
- Maybe in reply to: Lutz Donnerhacke: ""continue/next" for "loop""
- Next in thread: Dmytry Lavrov: "Re: "continue/next" for "loop""
- Reply: Dmytry Lavrov: "Re: "continue/next" for "loop""
- Reply: Gautier Write-only: "Re: "continue/next" for "loop""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 3 Nov 2003 15:44:43 -0000 To: <comp.lang.ada@ada-france.org>
"Sometimes I use exceptions..."
I remember some people are against using exceptions for control flow. I think this even appears in some coding standards.
So, as other have said, the goto might be appropriate.
Yet another way is to structure the code more, i.e. put the crucial sequences of statements inside (local) procedures, and then call the procedures at the appropriate points.
Of course you may have to parametrize the procedures to pass the values of the loop control variables.
Come to think of it, this is probably how I do it most of the times. I seem to remember having really long procedure names...
- Next message: Preben Randhol: "Re: "continue/next" for "loop""
- Previous message: Lutz Donnerhacke: "Re: "continue/next" for "loop""
- Maybe in reply to: Lutz Donnerhacke: ""continue/next" for "loop""
- Next in thread: Dmytry Lavrov: "Re: "continue/next" for "loop""
- Reply: Dmytry Lavrov: "Re: "continue/next" for "loop""
- Reply: Gautier Write-only: "Re: "continue/next" for "loop""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|