Hi Lyle, 2010/9/29 Lyle Kopnicky <[email protected]>
> Thanks, Carlos. > > It seems there a syntactic ambiguity here. When I write U.f := ..., it > could mean either that I want to put a new value in the dictionary slot f of > U, or that I want to retrieve the cell U.f and then put a new value in that > cell. Is there a way to disambiguate in the syntax? > if you want put a new value in the dictionary slot f, you must write: U.f := <new_value> But, if you want modify the value in the cell, you could write: (U.f) := <new_value> You must realize that in first case the value in the dictionary slot f will be <new_value>, while in the second case will be a cell with value <new_value>. > I realize that I could get it to work by binding, say, Uf = U.f, then write > Uf := @Uf. But I'd prefer to be able to do it without a separate binding. > Something like: > > (U.f) := @(U.f) > > doesn't seem to work either. (Although I'm not at my Oz terminal now so I > can't double-check). > > - Lyle > > > On Wed, Sep 29, 2010 at 8:23 AM, Carlos Ramirez <[email protected]> wrote: > >> Hi, >> >> putting the first time U.f := @(U.f) is posibble because the content of >> the dictionary in the label f is a cell. When you execute this line you >> change the content by the valor nil. Next, when you try execute U.f := >> @(U.f) again, the content is not a cell then you can not do @(U.f). >> >> Bye. >> >> >> > > _________________________________________________________________________________ > mozart-users mailing list > [email protected] > http://www.mozart-oz.org/mailman/listinfo/mozart-users > I hope to help you. Bye. -- Carlos RamÃrez Ingeniero de Sistemas Universidad del Valle Cali - Colombia
_________________________________________________________________________________ mozart-users mailing list [email protected] http://www.mozart-oz.org/mailman/listinfo/mozart-users
