Raphael thanks for your answer. In my code I define and initialize variables Fer and Dim in outside the loop, after solving the problem of N-Qeens I update Fer and there it had to return to solve the same problem but with the new value of Fer, nevertheless this is what I can't do.
 
Greetings!!

[EMAIL PROTECTED] escribió:
Send mozart-users mailing list submissions to
[email protected]

To subscribe or unsubscribe via the World Wide Web, visit
https://www.ps.uni-sb.de/mailman/listinfo/mozart-users
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]

You can reach the person managing the list at
[EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of mozart-users digest..."


Today's Topics:

1. Re: Re: iterations (Mary Aranda Cabezas)
2. Re: iterations (Raphael Collet)
3. Call For Papers - Submission deadline (10/13/2006) is fast
approaching - (CISSE2006 online)


----------------------------------------------------------------------

Message: 1
Date: Wed, 4 Oct 2006 04:40:49 +0200 (CEST)
From: Mary Aranda Cabezas <[EMAIL PROTECTED]>
Subject: Re: Re: iterations
To: Gustavo Gutierrez <[EMAIL PROTECTED]>
Cc: Mozart Oz <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"

Gustavo...Thank!!
I understand what you say to me, nevertheless "Algoritmo" is not a method, is an object of a Class X... "Buscar" is the method of this Class. This is left to something as well as the following thing:

functor
...

define

class Y
...
end

class X
...
meth init()
...
end
meth buscar(T)
...
end

{For 1 Num 1
proc{$ I}
Generador = case Seleccionado of queens then
{Queens Argumentos.ene}
end
Algoritmo = {New X init ({Space.new Generador})}
{ConstruirAsig Fer A B Dim I}
{Algoritmo buscar(T)}
{Actualizar Fer Dim}
end}
end




Gustavo Gutierrez <[EMAIL PROTECTED]>escribió:
Dear Mary,

On 10/3/06, Mary Aranda Cabezas wrote:
> In my previous email I request aid to them to solve more of once a
> same problem. Still I'm trying to do it but I've not been able,
> nevertheless I believe that the problem peresenta in the line
> that shows:
>
> {Algoritmo buscar(T)}
>
> This line calls to "buscar " method , which inside has defined a set of
> functions that are called between if, then I believe that the problem
> consists of that the method does not return to the place of its call and and
> thus returning to initiate the resolution process.
> At the moment I believe that that is the problem but I've not been able to
> solve it, somebody it knows as I can return to the call place from method or
> exists some other possible solution.

Be careful,what you are doing here is passing the tuple with label
"buscar" and contents T to the method Algoritmo. If buscar is a method
you declared before maybe you defined it by using:

proc {Buscar T R}
%%do something with T and put the result in R
end

Notice the uppercase "B" at the beginning of the name. Variables and
the function/procedure names start with upper case letters. Maybe what
you need to do is:

{Algoritmo {Buscar T}}

This is quite different!. Here you are calling a procedure/function
Algoritmo with the result (evaluation) of the procedure/function
procedure/function Buscar with parameter T.


> ...
> {For 1 Num 1
> proc{$ I}
> Generador = case Seleccionado of queens then
> {Queens Argumentos.ene}
> end
> Algoritmo = {New AdapDistribute init ({Space.new Generador})}
> {ConstruirAsig Fer A B Dim I}
> {Algoritmo buscar(T)} %% Here I call to the method "buscar"
> {Actualizar Fer Dim}
> end}
>
> end
>

Just another thing, mozart provides some syntactic sugar for for-style
loops. For instance:

for X in 1..N do
{Browse X} %% or do something with loop variables.
end

I think this is a clearer syntax.


Hope this helps and do not hesitate to ask if something is not clear enough.

--
Gustavo Gutierrez



---------------------------------

LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.ps.uni-sb.de/pipermail/mozart-users/attachments/20061004/13fa3c6e/attachment-0001.htm

------------------------------

Message: 2
Date: Wed, 04 Oct 2006 09:06:53 +0200
From: Raphael Collet <[EMAIL PROTECTED]>
Subject: Re: iterations
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Mary Aranda Cabezas wrote:
>
> I want to solve a same problem several times, but every time the
> variable Fer is changing, at the moment only it solves once
> the problem and soon patch remains like waiting for something.I do the
> following thing:
>
> functor
> ...
>
> define
> ...
> ...
> ...
> ...
> {For 1 Num 1
> proc{$ I}
> Generador = case Seleccionado of queens then
> {Queens Argumentos.ene}
> end
> Algoritmo = {New AdapDistribute init ({Space.new Generador})}
> {ConstruirAsig Fer A B Dim I}
> {Algoritmo buscar(T)}
> {Actualizar Fer Dim}
> end}

There is something wrong in this loop: all variables are declared
outside it! Algoritmo will be bound to several objects, which does not
make sense in Oz: you cannot reassign a variable. You will probably
have the same problem with Fer and Dim. To me those variables should be
declared inside the procedure.

Something else is suspect. There should be an "else" clause below in
case Seleccionado does not match with queens.

Generador = case Seleccionado of queens then
{Queens Argumentos.ene}
end

Cheers,
raph



------------------------------

Message: 3
Date: Tue, 3 Oct 2006 14:50:04 -0400
From: "CISSE2006 online" <[EMAIL PROTECTED]>
Subject: Call For Papers - Submission deadline (10/13/2006) is fast
approaching -
To: [EMAIL PROTECTED]
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"

Skipped content of type multipart/alternative-------------- next part --------------
A non-text attachment was scrubbed...
Name: cfpcisse06.pdf
Type: application/pdf
Size: 59212 bytes
Desc: not available
Url : http://www.ps.uni-sb.de/pipermail/mozart-users/attachments/20061003/1a40c8c0/cfpcisse06.pdf

------------------------------

_______________________________________________
mozart-users mailing list
[email protected]
https://www.ps.uni-sb.de/mailman/listinfo/mozart-users


End of mozart-users Digest, Vol 34, Issue 5
*******************************************



LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com
_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to