[m-users.] Free and Ground in the same error line?

Sean Charles (emacstheviking) objitsu at gmail.com
Sat Oct 28 21:49:13 AEDT 2023


Thank you Zoltan, that helps my brain dealing with my mistake a little more  :D


> On 28 Oct 2023, at 11:42, Zoltan Somogyi <zoltan.somogyi at runbox.com> wrote:
> 
> 
> On 2023-10-28 21:36 +11:00 AEDT, "Volker Wysk" <post at volker-wysk.de> wrote:
>> You don't have an "else" for your second "if".
> 
> That is clearly the source of the error in Sean's program, but there is
> another issue here. The Mercury reference manual lists if-then-else
> as a DCG goal type, but does NOT list if-then without else as a DCG goal type.
> On the other hand, the DCG goal parser in the compiler does accept
> else-less if-then DCG goals. This seems to be either an oversight in the parser,
> or, more likely, a hangover from the ancient past. Either way, it seems to be
> the cause of the lack of a direct error message for situations like this.
> 
> Zoltan.



More information about the users mailing list