[eclipse-clp-users] Variable Attribute

From: Edgaonkar, Shrirang <Shrirang.Edgaonkar_at_nttdata.com>
Date: Mon, 28 Nov 2016 04:44:20 +0000
Dear clp users,



  I am using variable attribute for some logic. To isolate my problem I have mentioned the below script.



:- lib(ic).
:- lib(ic_kernel).


has_my_attribute(_{eclipse:Attr}) ?-
     nonvar(Attr),writeln(Attr).





The script does not compile and gives me an error:-

undefined variable attribute in add_attribute(_1841, Attr, eclipse)

The error is valid when the we add an attribute without the meta_attribute/2 to declare the attribute.  But in my case, has_my_attribute is a predicate declaration and should not have the error.



I wish to write a predicate to check if a variable has a particular user defined attribute or not.



Kindly help.



Thanks and Regards,

Shrirang Edgaonkar





______________________________________________________________________
Disclaimer: This email and any attachments are sent in strictest confidence
for the sole use of the addressee and may contain legally privileged,
confidential, and proprietary data. If you are not the intended recipient,
please advise the sender by replying promptly to this email and then delete
and destroy this email and any attachments without any further use, copying
or forwarding.
Received on Mon Nov 28 2016 - 05:04:35 CET

This archive was generated by hypermail 2.2.0 : Mon Nov 28 2016 - 12:13:12 CET