Thanks so much. I was able to solve my problem using Port. Ashis
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Torsten Anders Sent: Friday, February 27, 2009 1:11 PM To: Mozart users Subject: Re: Global variable (Dictionary) On Feb 27, 2009, at 4:29 PM, Raphael Collet wrote: > 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. Besides, you could put a dictionary inside the script so it becomes local. Best Torsten > > > 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 mozart- > [email protected] > http://www.mozart-oz.org/mailman/listinfo/mozart-users > > <ATT00001.txt> ________________________________________________________________________ _________ 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
