Discussions related to Visual Prolog
mdosnov2016
VIP Member
Posts: 73
Joined: 19 Nov 2016 7:58

facts declaration

Unread post by mdosnov2016 »

I have the following structure according to the prolog notes:

Code: Select all

class backend       open resourceIdentifiers    domains     ...   facts   ....   predicates   end class backend

Code: Select all

implement backend     clauses   ...
in a backend.pack file:

and I receive the following error:

e154 The section 'facts' is not allowed here backend.pack

where can I position my facts declarations?

(I had them before inside the implementation and I was getting other errors)
PrologUser
User avatar
Thomas Linder Puls
VIP Member
Posts: 1398
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls »

Facts can only be declared inside an implementation. I.e. here

Code: Select all

implement backend % here you can have facts end implement backend
This means that what is know as global database/facts in Vip5x does no longer exist.

Also look at Migration from Visual Prolog 5.
Regards Thomas Linder Puls
PDC
Post Reply