Hi folks,

I'm studying the Remote module and am getting some unexpected errors. I've
produced this tiny example to illustrate:

functor RemoteProc
import
   OS
export
   Pid
   GetPID
define
   fun {GetPID}
      {OS.getPID}
   end
   Pid={OS.getPID}
end

RP1={New Remote.manager init}
RS1={RP1 apply(RemoteProc $)}

{Browse myPID({OS.getPID})}
%{Browse otherPID({RS1.getPID})}
{Browse otherPID(RS1.pid)}

This works, showing my PID followed by the remote process PID. But if I
uncomment the second-to-last line, it fails:

%********************** error in application ********************
%**
%** Application of non-procedure and non-object
%**
%** In statement: {<Resource> _<optimized>}
%**
%** Call Stack:
%** procedure 'GetPID' in file
"c:/Users/Lyle/devel/oz/ch11/remote_func_test.oz", line 29, column 3, PC =
45748908
%**--------------------------------------------------------------

Maybe I'm not understanding something about 'export', but I thought I should
be able to call this function from the remote functor. Can only values be
exported?

Thanks,
Lyle
_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to