Ashis,

The error message says that you are trying to modify a stateful entity from
inside a computation space.  This is forbidden by the language definition,
because it breaks an essential assumption on computations spaces: they
cannot have side effects.  There is an exception to the rule, however: you
can send messages on ports.

Cheers,
raph

On Fri, Feb 27, 2009 at 4:59 PM, Maity, Ashis K <[email protected]>wrote:

> Hi everybody,
>
> How can I store data in a global variable (say in a Dictionary) in a
> functor file so that I can export that data that can be accessed from
> another functor? Specifically, I am trying something like this (seems
> like this sandbox code doesn't even compile -- though actual code does):
>
> functor
> import
> export
> define
>  Dict
>
>  Dict = {Dictionary.new}
>
>  proc{StoreInfo}
>     {Dictionary.put Dict xx yy}
>  end
> end
>
>
> The program either hangs or I get error -- "assignment of global
> variable from local space" (it appears that I can do Dictionary.get
> operation from local space). If I can not do it this way is there
> another way I can store several key-value pairs that can be accessed at
> the end of run from another(Client) Functor?
>
> Thanks so much.
>
> Ashis
>
> _________________________________________________________________________________
> 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

Reply via email to