[Date Prev][Date Next] [Chronological] [Thread] [Top]

Problems using mobile agents



Hello.

I'm starting to learn Jocaml language and I have implemented the following
program which I've found in a tutorial:

let loc mobile
  do {
       let here = Ns.lookup "here" in
       go
here;
       let sqr = Ns.lookup "square" in
       let def sum (s, n) =
reply (if n = 0 then s else sum (s+sqr n, n-1)) in
       let result = sum
(0,5) in
       print_string ("q: sum 5 = "^string_of_int s^"\n");

flush stdout;
    }

When I tried to compile this program I got this message: "This expression
has type 'a metatype -> 'a but is here used with type Join.location". What
does it mean?

----------------------------
Lucio Mauro Duarte
Mestrando do PPGCC/PUCRS
lduarte@inf.pucrs.br
lmduarte@zaz.com.br
lucio.duarte@ig.com.br

"Then a hero comes along
 with the strength to carry on
 and you cast your fears aside
 and you know you can survive
 So when you feel like hope is gone
 look inside you and be strong
 And you finally see the truth:
 that a hero lies in you."