Re: [eclipse-users] Error in bin packing example

From: Kish Shen <kisshen_at_cisco.com>
Date: Thu, 19 Jul 2007 20:25:03 +0100
Hi,

Lutz, Charles D wrote:
> Hi Kish,
>
> Thanks for the help. The problem is also found in lex_ord/2.
> I changed it as such:
>
>   
There were a couple of other instances of this problem in that chapter. 
Hopefully I have found all of them....

> lex_ord(bin{colour:Col1, contents:Conts1},
>         bin{colour:Col2, contents:Conts2}) :-
>         % Use '=..' to extract the contents of the bin as a list
>         Conts1 =.. [_ | Vars1],
>         Conts2 =.. [_ | Vars2],
>         lexico_le([Col1 | Vars1], [Col2 | Vars2]).
>
> Then, however, it complained that lexico_le/2 was not defined, so I
> did a help lookup and found that this is in ic_global. So that has
> to be added at the top of the file along with the import for the ic
> library.
>
> Thanks,
> Chuck
>
>   
Thanks again for this. I have added a note about lexico_le in the text 
as well.

Cheers,

Kish
Received on Thu Jul 19 2007 - 20:25:13 CEST

This archive was generated by hypermail 2.2.0 : Thu Feb 02 2012 - 02:31:58 CET