[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Trying to add facts during runtime in VC++
From: |
jfiore |
Subject: |
Re: Trying to add facts during runtime in VC++ |
Date: |
Mon, 17 Feb 2003 22:07:30 -0500 (EST) |
Lindsey Spratt said:
>
> On Monday, February 17, 2003, at 04:30 PM, Joseph N. Fiore wrote:
>
>> Now. While the C program is running, it learns from an outside
>> source, that John has a son named Joe. How do I tell GNU-Prolog from
>> the C program, the new fact? parent(john,joe).
>
> Make sure that you have declared parent/2 dynamic.
> Then I think you want to evaluate a gprolog query using the builtin
> assert/1:
>
> assert(parent(john, joe)).
>
> Lindsey Spratt
> http://homepage.mac.com/lspratt
Maybe I wasn't clear. How do an assert from a C program at runtime?
The only C source code examples I've seen are for queries with a Pl_Query.
Thanks again,
--Joe