Page 1 of 1
how to implement properties using facts
Posted: 10 Apr 2021 11:30
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.
Re: how to implement properties using facts
Posted: 10 Apr 2021 17:46
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().
Re: how to implement properties using facts
Posted: 10 Apr 2021 20:48
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.
Re: how to implement properties using facts
Posted: 10 Apr 2021 20:54
by Gukalov
So why you put the propertie declaration in the CLASS?!)))
Put it in the INTERFACE...
Re: how to implement properties using facts
Posted: 11 Apr 2021 8:09
by jarnold30
aha!
Thanks very much