Hi Raphael,
2010/10/3 Raphael Bauduin <[email protected]>
> Hi,
>
> When evaluatin the code at the end of this message, I get 2 illegal
> arity errors:
>
> %********************** static analysis error *******************
> %**
> %** illegal arity in application
> %**
> %** Arity found: 2
> %** Expected: 3
> %** Application (names): {GEIOAcc2 L Acc}
> %** Application (values): {<P/3> L<optimized> Acc<optimized>}
>
> and
>
> %** Arity found: 2
> %** Expected: 3
> %** Application (names): {Append Acc _}
> %** Application (values): {<P/3 Append> Acc<optimized> [Info<optimized>]}
>
> The code itself is below.
>
> Anyone willing to point me to the obvious thing I must be missing? The
> arity of GEIOAcc and Append are respected I think.
>
> Thanks!
>
> Raph
>
>
> declare GetElementsInOrder in
> fun {GetElementsInOrder Tree}
> fun {GEIOAcc Tree Acc}
> case Tree of nil then Acc
> [] tree(info:Info left:L right:R) then
> {GEIOAcc L Acc} % 1st error message
> {Append Acc [Info]} % 2nd error message
> {GEIOAcc R Acc}
> end
> end
> in
> {GEIOAcc Tree nil}
> end
>
>
The error is that functions Append and GEIOAcc return values (because are
functions}. You should append the results of the first GEIOAcc, of the
Append and the second GEIOAcc.
I hope to help you. Bye.
>
> --
> Web database: http://www.myowndb.com
> Free Software Developers Meeting: http://www.fosdem.org
>
> _________________________________________________________________________________
> 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