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.

2010/9/29 Lyle Kopnicky <[email protected]>

> Hi folks,
>
> I was getting an error in a program, and I've distilled it down to a tiny
> program to reproduce it:
>
> declare U
> U={Record.toDictionary o(f:{NewCell nil})}
> U.f := @(U.f)
> U.f := @(U.f)
>
> When this code is run, it produces the error:
>
> %*************************** type error *************************
> %**
> %** Expected type: cell, dict#key, array#index
> %** At argument:   1
> %** In statement:  {Value.catAccess nil _<optimized>}
> %**
> %** Call Stack:
> %** toplevel abstraction in line 1, column 0, PC = 47979348
> %**--------------------------------------------------------------
>
> I'm mystified by this error. If I comment out one of the two identical
> assignment lines, it works fine. But doing it twice in a row produces the
> error. Each time it should be extracting the nil and putting it back into
> the cell. I don't know what Value.catAccess is, so it's not a very helpful
> error.
>
> Any help would be greatly appreciated!
>
> Thanks,
> Lyle
>
>
> _________________________________________________________________________________
> mozart-users mailing list
> [email protected]
> http://www.mozart-oz.org/mailman/listinfo/mozart-users
>



-- 
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

Reply via email to