-----BEGIN PGP SIGNED MESSAGE-----
after consulting it, I hit:
and get as expected :
X = [isa, jm]
How should I write the file so that asking the same question I get the
X = isa ;
X = jm ;
I still want to use lists in the file.
I am using SWI-Prolog (Multi-threaded, Version 5.2.13)
How can I add knowledge in the DB using the CLI ?
for example if the user consult the file, but want to add knowledge;
- - how should he add information usable later in the same cession ?
- - how to save the whole database into a new file for later use ?
Is it possible in PROLOG to execute external file ? something like the C
call 'system' or such ...
DEMAINE Beno�t-Pierre http:/www.demaine.info/
\_o< apt-get remove ispell >o_/
There're 10 types of people: those who can count in binary and those who
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
||10/27/2004 3:12:44 AM
In article <s7KdnYW2WsA2j-LcRVnyhA@pipex.net>, DEMAINE Benoit-Pierre wrote:
> I have
> parent(mum,[ isa,jm]).
> in test_01.pl
> after consulting it, I hit:
> and get as expected :
> X = [isa, jm]
> How should I write the file so that asking the same question I get the
> answers :
> X = isa ;
> X = jm ;
> I still want to use lists in the file.
There are two ways. Runtime you get
my_parent(X, Y) :-
You can also do it compiletime, so you can write the input the way
you like and have it available to Prolog the way Prolog likes it.
term_expansion(parent(X, List), Clauses) :-
mk_parent_clauses(List, X, Clauses).
mk_parent_clauses(, _, ).
mk_parent_clauses([H|T0], X, [parent(X, H)|T]) :-
mk_parent_clauses(T0, X, T).
check the manual for term_expansion/2.
> I am using SWI-Prolog (Multi-threaded, Version 5.2.13)
> on Linux.
> How can I add knowledge in the DB using the CLI ?
> for example if the user consult the file, but want to add knowledge;
> - - how should he add information usable later in the same cession ?
> - - how to save the whole database into a new file for later use ?
See dynamic/1, assert/1 for modifying. You can just write the file
yourself, or use listing/1 and/or portray_clause/1.
> Is it possible in PROLOG to execute external file ? something like the C
> call 'system' or such ...
See shell/1. You should have been able to find that in the manualm where
there is a section 'Operating system interaction'.
10/27/2004 7:43:08 AM
(page loaded in 0.059 seconds)
Automatically populating a List of Values - Help - comp.databases ...
Hi all This is a quite newbie question. I only wish to fit a list of values, initially empty, with autoincremented numbers, whose values would...
GL_ARRAY_BUFFER_ARB vs. GL_ARRAY_BUFFER - comp.graphics.api.opengl ...
Hello, Excuse this newbie question please -- I'm reading "Opengl Distilled" which uses GL_ARRAY_BUFFER when binding the VBO, but many examples I read...
Counting comma seperated fields - comp.lang.awk
Hi, Another newbie question: I have files with comma seperated fields and I'd like to count how many fields there are on each line. All I know so far...
Newbie : Loading Textures using Cg - comp.graphics.api.opengl ...
DXT1 versus PNG` - comp.graphics.api.opengl ... (RGBA, BGRA ... Hi all, I just started to learn OpenGL - and I have a newbie question about ...
Qt - comp.graphics.api.opengl
You probably want to post to the Qt mailing list - look at http://lists ... Newbie Question: QT Opengl example is not working! - comp.graphics ... Hi there, I hope ...
glGetString problem - comp.graphics.api.opengl
Newbie Question: QT Opengl example is not working! - comp.graphics ..... to complie and run a simple example come with QT called Box, there's no problem ...
Newbie's first FPGA board ! - comp.arch.fpga
On 2007-07-13, PFC <email@example.com> wrote: > So, the question is, would experienced people be willing ... Newbie's first FPGA board ! - comp.arch.fpga Hello, I have used a ...
How to start with gdcm - comp.protocols.dicom
Hi, I am a complete newbie to gdcm. I want to use ... Post Question | Groups ... > See FAQ: [Where are the GDCM mailing lists ? ] http ...
glDrawPixels and Display lists - comp.graphics.api.opengl ...
... Post Question | Groups ... glDrawPixels and Display lists - comp.graphics.api ... Newbie : Loading Textures using Cg - comp.graphics.api ...
bvh files - comp.graphics.apps.lightwave
Hi Everyone, I'm a newbie on 3d graphics and I take opportunity to salute the whole ... Lightwave yet because first I want to learn many things. > > I just have a question ...
Hello, I should have explained in my previous post, That Tim explained that the 'exit' command isn't a reserved word, but it obviously works on some computers, but ...
Re: [Echovnc-users] Stupid newby questions - echoserver ...7/23/2012 8:01:54 AM
Re: [Echovnc-users] Stupid newby questions - echoserver performance, rdp without servermirror? Rob Hoerning Tue, 21 Apr 2009 06:54:26 -0700