users-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compiler directive dynamic/1


From: Ludovic Langevine
Subject: Re: compiler directive dynamic/1
Date: Sat, 09 Oct 2004 19:46:33 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.6) Gecko/20040314 Debian/1.6-2.backports.org.2

address@hidden a écrit :

Hi!

The top-level-loop reckognizes "dynamic" but when
working with consulted code (byte-compiled), it seems
to think that dynamic/1 is a user predicate

(...)

dynamic( [have/1, here/1, turned_off/1, turned_on/1, location/2] ).


Hi!

You should write:

:- dynamic(...).

in your source file, since dynamic/1 is a compiler directive. That's the same for all the directives, e.g. 'op/3' (you change the way the code is compiled). So, just add ":-" at the beginning of the line:

:- dynamic( [have/1, here/1, turned_off/1, turned_on/1, location/2] ).

and it should work.

Bests,
Ludovic
ps: I would be very interested in your Prolog tutorial... and I am not the only one, I think. If you need some feedback on a preliminary version, do not hesitate to ask for some help on this list or on comp.lang.prolog

--
Ludovic Langevine <address@hidden>       Tel: (+33) 1 39635708
INRIA Rocquencourt - Projet CONTRAINTES              Fax: (+33) 1 39635469
Domaine de Voluceau, Rocquencourt, BP 105
78153 LE CHESNAY CEDEX - FRANCE      http://contraintes.inria.fr/~langevin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]