[clean-list] array update example in language report

John van Groningen johnvg at cs.ru.nl
Thu Mar 15 17:23:14 MET 2007


lethevert wrote:
>I found a wrong example in language report 2.1.
>There are examples of array update in p.57.
>
>----
>Creating an array with the integer elements 1,3,5,7,9 using the update operator
>in combination with array and list comprehensions.
>
>{CreateArray 5 0 & [i] = 2*i+1 \\ i <- [0..4]}
>{CreateArray 5 0 & [i] = elem \\ elem <-: {1,3,5,7,9} & i <- [0..4]}
>{CreateArray 5 0 & elem \\ elem <-: {1,3,5,7,9}}
>----
>
>But I cannot compile the third example. The error message is
>
>----
>Parse error [Main.icl,10;35,field assignment]: = expected instead of \\
>----
>
>I think it is a wrong example or otherwise it is a compiler bug.
>

The example in the report is incorrect.

Kind regards,

John van Groningen


More information about the clean-list mailing list