Dear Andryw,

In your example:

List = [2 3 4]
List.1 = 10

is equivalent to ask Oz to solve the equation: 2 = 10.  The error message
you get is what it means: 2 cannot be equal to 10.

You can, however, build a new list from the first one, as

NewList = 10|List.2

The statement above builds a list with 10 as first element, and the tail of
List as its tail.


Note: I recommend you to not use List as a variable name, because List is
already used to access the List module.

Cheers,
raph

2009/6/9 Andryw Marques <[email protected]>

> >* Another question:
> *>* Can I set a element of a list:
> *>*
> *>* example:
> *>*
> *>* List = [2 3 4]
> *>* List.1 = 10
> *>*
> *>* How can I set the element "2" to "10"?
> *
>
>
>
>
_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to