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)}
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}
end
Gustavo Gutierrez <[EMAIL PROTECTED]> escribió:
Dear Mary,
On 10/3/06, Mary Aranda Cabezas <[EMAIL PROTECTED]>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
_________________________________________________________________________________ mozart-users mailing list [email protected] http://www.mozart-oz.org/mailman/listinfo/mozart-users
