Discussions related to Visual Prolog
jarnold30
Posts: 19
Joined: 9 Aug 2020 15:30

Implementing a property using a fact

Unread post by jarnold30 »

Hi folks
In the Language reference, it states that "the property can be implemented as a fact variable with the same name as the property".

I've tried this but I get an error
error c264 : No implementation for the property 'slot::aDiagram (i)' in the class 'slot'

Why doesn't it work?
User avatar
Thomas Linder Puls
VIP Member
Posts: 1398
Joined: 28 Feb 2000 0:01

Re: Implementing a property using a fact

Unread post by Thomas Linder Puls »

I guess that you didn't declare the fact variable in the implementation:

Code: Select all

implement slot ... class facts     aDiagram : ... ... end implement slot
Regards Thomas Linder Puls
PDC
jarnold30
Posts: 19
Joined: 9 Aug 2020 15:30

Re: Implementing a property using a fact

Unread post by jarnold30 »

that worked, thanks
Post Reply