Search found 18 matches

by jarnold30
21 Apr 2021 17:49
Forum: Visual Prolog
Topic: Vis Prolog 10: problem with isSome
Replies: 0
Views: 5

Vis Prolog 10: problem with isSome

Hi folks
I have recently upgraded my project to VP10.
I am getting an error in the default generated code from the ‘main’ class.

If ErrorMessage = isSome(CP:parse()) then

It complains with error c279.

Any ideas what I should do about this?
by jarnold30
11 Apr 2021 8:09
Forum: Visual Prolog
Topic: how to implement properties using facts
Replies: 4
Views: 261

Re: how to implement properties using facts

aha!
Thanks very much
by jarnold30
10 Apr 2021 20:48
Forum: Visual Prolog
Topic: how to implement properties using facts
Replies: 4
Views: 261

Re: how to implement properties using facts

OK, I know it works if I convert the fact to a class fact. But I want an object property not a class property.
by jarnold30
10 Apr 2021 11:30
Forum: Visual Prolog
Topic: how to implement properties using facts
Replies: 4
Views: 261

how to implement properties using facts

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:

Code: Select all

facts     preConditions : setM{cond}.
But I'm getting an error e264.
by jarnold30
6 Apr 2021 16:08
Forum: Visual Prolog
Topic: subset between sets
Replies: 2
Views: 148

Re: subset between sets

thanks
by jarnold30
5 Apr 2021 15:11
Forum: Visual Prolog
Topic: subset between sets
Replies: 2
Views: 148

subset between sets

hi, is there any way, given 2 lists or sets, to check if one is a subset of the other?
by jarnold30
5 Apr 2021 13:28
Forum: Visual Prolog
Topic: How to check existence of an object
Replies: 5
Views: 193

Re: How to check existence of an object

I learn something every day :-)
by jarnold30
5 Apr 2021 8:58
Forum: Visual Prolog
Topic: How to check existence of an object
Replies: 5
Views: 193

Re: How to check existence of an object

Thanks.

But what does the nothing(This) line do?
by jarnold30
4 Apr 2021 9:48
Forum: Visual Prolog
Topic: How to check existence of an object
Replies: 5
Views: 193

How to check existence of an object

Hi, this is probably a stupid noobie question, but here goes... In ordinary prolog, I can declare that something exists using a statement like fred("jim"). And then I can use fred("jim") in a predicate to check that this object exists. But if I create an object Jim = fred::new(&q...
by jarnold30
4 Apr 2021 9:41
Forum: Visual Prolog
Topic: introspection
Replies: 8
Views: 436

Re: introspection

OK, so if I have an object "jim" declared to be of class "fred", I can say

typeLibrary::typeLibraryOf(jim).name()

to get the class name, "fred"?
by jarnold30
28 Mar 2021 10:35
Forum: Visual Prolog
Topic: introspection
Replies: 8
Views: 436

Re: introspection

Hi, I'm still having trouble with this. What's a type library? Is this documented anywhere?
by jarnold30
26 Mar 2021 16:48
Forum: Visual Prolog
Topic: introspection
Replies: 8
Views: 436

Re: introspection

OK, thanks
by jarnold30
24 Mar 2021 15:03
Forum: Visual Prolog
Topic: introspection
Replies: 8
Views: 436

Re: introspection

I mean, is there a way I can ask an object what type it is?
by jarnold30
20 Mar 2021 15:02
Forum: Visual Prolog
Topic: introspection
Replies: 8
Views: 436

introspection

Hi, I'm trying to find out how to do introspection.
E.g. for something that is a supertype, how do I find out what subtype it was created as ?

Thanks
by jarnold30
16 Mar 2021 13:52
Forum: Visual Prolog
Topic: Implementing a property using a fact
Replies: 2
Views: 250

Re: Implementing a property using a fact

that worked, thanks