From ekovach@franuniv.edu  Tue Nov 14 21:41:00 2000
Received: from mail.franuniv.edu (root@mail.franuniv.edu [206.244.99.3])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id VAA28343
	for <prolog@swi.psy.uva.nl>; Tue, 14 Nov 2000 21:40:59 +0100 (MET)
Received: from cis78vyz68 ([192.168.32.53])
	by mail.franuniv.edu (8.9.3/8.9.3) with SMTP id QAA03953
	for <prolog@swi.psy.uva.nl>; Tue, 14 Nov 2000 16:00:55 GMT
Message-ID: <000a01c04e7b$1c9a6bc0$3520a8c0@cis78vyz68.franuniv.edu>
From: "Ed Kovach" <ekovach@franuniv.edu>
To: <prolog@swi.psy.uva.nl>
Subject: problems with asserta.
Date: Tue, 14 Nov 2000 15:40:21 -0500
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3155.0
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0

Hi,

I am trying to use asserta,but  I keep getting an error.  Here is an example
of my problem.
(The code to generate the fibonacci series.)


fib(1,1).
fib(2,1).
fib(N,F) :-
     N > 2,
     N1 is N - 1, fib(N1, F1),
     N2 is N - 2, fib(N2, F2),
     F is F1 + F2,
     asserta(fib(N,F)).



The message I get is

ERROR: No permission to modify static_procedure 'fib/2'
^ Exception: (14) asserta(fib(3,2)) ?

What am I doing wrong?  Thanks for your help!

Ed Kovach ekovach@franuniv.edu




