From ekovach@franuniv.edu  Tue Nov 14 22:07:08 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 WAA00629
	for <prolog@swi.psy.uva.nl>; Tue, 14 Nov 2000 22:07:06 +0100 (MET)
Received: from cis78vyz68 ([192.168.32.53])
	by mail.franuniv.edu (8.9.3/8.9.3) with SMTP id QAA04080;
	Tue, 14 Nov 2000 16:27:00 GMT
Message-ID: <001b01c04e7e$c168f1a0$3520a8c0@cis78vyz68.franuniv.edu>
From: "Ed Kovach" <ekovach@franuniv.edu>
To: "Douglas Miles" <dmiles@teknowledge.com>, <prolog@swi.psy.uva.nl>
Subject: Re: problems with asserta.
Date: Tue, 14 Nov 2000 16:05:47 -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

Doug,

Thanks!  When I tried using dynamic. I didn't use the :- before it!

Ed
-----Original Message-----
From: Douglas Miles <dmiles@teknowledge.com>
To: Ed Kovach <ekovach@franuniv.edu>; prolog@swi.psy.uva.nl
<prolog@swi.psy.uva.nl>
Date: Tuesday, November 14, 2000 4:09 PM
Subject: RE: problems with asserta.


>Ed,
>
>:-dynamic(fib/2).
>
> 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)).
>
>-Douglas
>
>> -----Original Message-----
>> From: Ed Kovach [mailto:ekovach@franuniv.edu]
>> Sent: Tuesday, November 14, 2000 12:40 PM
>> To: prolog@swi.psy.uva.nl
>> Subject: problems with asserta.
>>
>>
>> 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
>>
>>
>>
>>
>>
>> ----------------
>> * To UNSUBSCRIBE, please use the HTML form at
>>
>>     http://www.swi.psy.uva.nl/projects/SWI-Prolog/index.html#mailinglist
>>
>> or send mail to prolog-request@swi.psy.uva.nl using the Subject:
>> "unsubscribe"
>> (without the quotes) and *no* message body.
>>
>> ** An ARCHIVE of this list is maintained at
>>
>>     http://www.swi.psy.uva.nl/projects/SWI-Prolog/mailinglist/archive/
>>
>>
>>
>

