Hi,
this is an error in the source code.
In this line:
{Server2 functor import OS define D1={OS.time} end}
the "define" statement introduces a NEW variable D1. The line does not
assign to the "D1" variable in the outer scope.
(Maybe this code is from an earlier Mozart version??)
The correct way to write this is to use an "!" to suppress the declaration
of a new variable:
{Server2 functor import OS define !D1={OS.time} end}
"!" can also be useful in the patterns of case-statement or when using
unification within a variable definition
(see also
http://www.mozart-oz.org/documentation/tutorial/node5.html#control.anonymous).
Hope this helps,
Wolfgang
On Wed, Dec 14, 2011 at 11:30 AM, Khadija EL MAHRSI <
[email protected]> wrote:
> Hi,
> I've been doing some more tests and any use of D1 after the functor is
> sent to the server results in an endless wait. Instead of using {Wait D1},
> I used another variable D2 that uses D1 and the block still remains (since
> D2 waits for D1 to be bound before continuing). What could be the problem?
>
> Thanks
>
>
> 2011/12/13 Khadija EL MAHRSI <[email protected]>
>
>> Hello,
>> I've been trying to do the Agent Server example from the Mobile agents
>> part in the following link (
>> http://graubart.rz.ifi.lmu.de/programming/mozart/print/tutorial/DistributedProgramming.pdf)
>> but for some reason couldn't succeed.
>> I used the Agent Server code provided in 4.1.6 and the last code for
>> agents provided in 4.1.2. I think there is a missing line in this agent
>> code which is {AS.publishserver "/usr/staff/pvr/public_html/as2"} before
>> Server2={GetServer "http://www.info.ucl.ac.be/~pvr/as2"} (Nothing worked
>> before I added this line). I also changed both of ".../as2" into "as2" and
>> ".../agents.ozf" into "agents.ozf" for simplicity.
>> In my agent code, I added {Wait D1} to be able to see D1's value.
>> However, The program seems to block when trying to show this value. Can
>> anyone tell me why?
>>
>> Thanks
>>
>
>
>
> _________________________________________________________________________________
> mozart-users mailing list
> [email protected]
> http://www.mozart-oz.org/mailman/listinfo/mozart-users
>
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users