Re: a bug in current_functor

Jan Wielemaker <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
On 10/28/2013 10:48 PM, Carlo Capelli wrote:
> Maybe my 'correction' is invalid, instead current_functor should fail on a
> predicate with arity 0.

It is still a bug.  Fixed.

	--- Jan


> Sorry for the noise....
>
> 2013/10/28 Carlo Capelli <[email protected]>
>
>> Hi Jan
>>
>> There could be a bug at line 391 of pl-funct.c. That line read
>>
>> if ( fd && fd->arity > 0 && (!nm || nm == fd->name) )
>>
>> but I think should be
>>
>> if ( fd && fd->arity >= 0 && (!nm || nm == fd->name) )
>>
>> This arises from this question<http://stackoverflow.com/q/19642818/874024>
>> .
>>
>> bye Carlo
>> **
>>
> -------------- next part --------------
> HTML attachment scrubbed and removed
> _______________________________________________
> SWI-Prolog mailing list
> [email protected]
> https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.