Re: [eclipse-users] Conditional jump out of loops

From: Andrzej Lewandowski <lewando_at_...28...>
Date: Wed, 24 Jan 2007 08:30:22 -0600
My solustion is that a) Prolog is not Java, b) In Java, program that
uses break inside a loop can be transformed into program that doesn't
use break, c) There are many languages that don't have break
functionality, and people somehow write programs using these languages,
including loops.

To the original poster: If you feel that you need "break" in the middle
of a "loop" when programming in Prolog, then most likely you are trying
to write Java program in Prolog

A.L.

> -----Original Message-----
> From: Paulo Moura [mailto:pmoura_at_...16...] 
> Sent: Wednesday, January 24, 2007 7:51 AM
> To: Andrzej Lewandowski
> Cc: Paulo Moura; 'David Tian'; 'ECLiPSe Users List'
> Subject: Re: [eclipse-users] Conditional jump out of loops
> 
> 
> 
> On 2007/01/24, at 13:38, Andrzej Lewandowski wrote:
> 
> > "Exception Is Not Goto" - this what is being said in 
> Programming 101 
> > course...
> >
> > A.L.
> 
> And given the amount of information in the original message your  
> solution is...? I would say that jumping out of a loop is an  
> exceptional event but that's just me.
> 
> Paulo
> 
> 
> >> -----Original Message-----
> >> From:
> >> eclipse-users-bounces+lewando=attglobal.net_at_...2...
> >> [mailto:eclipse-users-bounces+lewando=attglobal.net_at_...29...
> >> p.com] On Behalf Of Paulo Moura
> >> Sent: Wednesday, January 24, 2007 5:31 AM
> >> To: David Tian
> >> Cc: ECLiPSe Users List
> >> Subject: Re: [eclipse-users] Conditional jump out of loops
> >>
> >>
> >>
> >> On 2007/01/23, at 23:47, David Tian wrote:
> >>
> >>> I want to find out how to jump out of a loop in ECLiPSe and go to 
> >>> the upper level of the program. In java, there is 
> 'break'; is there 
> >>> a predicate does the
> >>> same thing in ECLiPse?
> >>
> >> Maybe you can use catch/3 at the upper level and throw/1 
> inside your 
> >> loop?
> >>
> >> Cheers,
> >>
> >> Paulo
> >>
> >>
> >> -----------------------------------------------------------------
> >> Paulo Jorge Lopes de Moura
> >> Dep. of Computer Science, University of Beira Interior 6201-001 
> >> Covilhã, Portugal
> >>
> >> Office 4.3  Ext. 3257
> >> Phone: +351 275319891 Fax: +351 275319899
> >> Email: <mailto:pmoura_at_...16...>
> >>
> >> Home page: <http://www.di.ubi.pt/~pmoura>
> >> Research: <http://logtalk.org/>
> >> -----------------------------------------------------------------
> >>
> >>
> >>
> >>
> >> _______________________________________________
> >> ECLiPSe-Users mailing list
> >> ECLiPSe-Users_at_...2... 
> >> http://www.crosscoreop.com/mailman/listinfo/ec> lipse-users
> >>
> >
> >
> 
> -----------------------------------------------------------------
> Paulo Jorge Lopes de Moura
> Dep. of Computer Science, University of Beira Interior
> 6201-001 Covilhã, Portugal
> 
> Office 4.3  Ext. 3257
> Phone: +351 275319891 Fax: +351 275319899
> Email: <mailto:pmoura_at_...16...>
> 
> Home page: <http://www.di.ubi.pt/~pmoura>
> Research: <http://logtalk.org/>
> -----------------------------------------------------------------
> 
> 
> 
> 
Received on Wed Jan 24 2007 - 14:31:01 CET

This archive was generated by hypermail 2.3.0 : Tue Apr 16 2024 - 09:13:19 CEST