Discussions related to Visual Prolog
-
jarnold30
- Posts: 19
- Joined: 9 Aug 2020 15:30
Post
by jarnold30 »
Hi, I'm trying to implement a property using a fact.
I have a line in task.cl:
Code: Select all
properties
preConditions : setM{cond}.
I have a line in task.pro:
But I'm getting an error e264.
-
Gukalov
- VIP Member
- Posts: 68
- Joined: 5 Oct 2011 15:16
Post
by Gukalov »
Unfortunately, up to now I have learnt only first 263 errors.
I have not learnt yet the error number 264 - I'm very sorry.
But:
1. The properties is in the
class, so the corresponding fact must be in
class facts section.
2. Will be not bad to set any init value.
Code: Select all
class facts
preConditions : setM{cond} := setM_redBlack::new().
-
jarnold30
- Posts: 19
- Joined: 9 Aug 2020 15:30
Post
by jarnold30 »
OK, I know it works if I convert the fact to a class fact. But I want an object property not a class property.
-
Gukalov
- VIP Member
- Posts: 68
- Joined: 5 Oct 2011 15:16
Post
by Gukalov »
So why you put the propertie declaration in the CLASS?!)))
Put it in the INTERFACE...
-
jarnold30
- Posts: 19
- Joined: 9 Aug 2020 15:30
Post
by jarnold30 »
aha!
Thanks very much