RE: JESS: addSlot without any default value

Santiago Almirón <[email protected]>
Newsgroups gmane.comp.java.jess
Message-ID <7659_1286109981_o93ChjJZ012497_BAY155-w1383EE1E7FCF85E3ADAEC4A76B0@phx.gbl>
Thats was a quick reply. I had a wrong idea of how the slots work. I understood now.

Thanks you.
Santiago

----------------------------------------
> From: [email protected]
> To: [email protected]
> Subject: Re: JESS: addSlot without any default value
> Date: Sat, 2 Oct 2010 21:29:18 -0400
>
> Every slot always has a default value. Slots aren't like entries in a
> map, that either exist or not; slots are like member variables in a
> Java class: they always have some value associated with them. If you
> have slots you want to store numbers in, then set the default to a
> number like new Value(0, RU.INTEGER).
>
> On Oct 2, 2010, at 7:13 PM, Santiago Almirón wrote:
>
>>
>> Hello,
>> First, excuse me for my English. My native languaje is Spanish.
>> I am writing to you because I have a little problem with Jess's API,
>> especially with addSlot from Class Deftemplate. I do not know how I
>> add a new slot without any default value. The main problem is with
>> FLOAT and INTEGER types. Because, some Facts which I work do not
>> have this slot instanced. If a give a default value, some rules will
>> be fired . I usually add SYMBOL slots in this way:
>>
>> addSlot("Name", Funcall.NIL, "SYMBOL");
>>
>> And then, when I assert a new Fact, a (Name nil) appears if I do not
>> give any value. SYMBOL type is not a problem, but FLOAT and INTEGER
>> types is a problem for me.
>>
>> I appreciate your time. Thanks in advance.
>> Best regards
>>
>> Santiago
>>
>>
>>
>>
>> --------------------------------------------------------------------
>> To unsubscribe, send the words 'unsubscribe jess-users
>> [email protected]'
>> in the BODY of a message to [email protected], NOT to the list
>> (use your own address!) List problems? Notify [email protected]
>> .
>> --------------------------------------------------------------------
>
> ---------------------------------------------------------
> Ernest Friedman-Hill
> Informatics & Decision Sciences, Sandia National Laboratories
> PO Box 969, MS 9012, Livermore, CA 94550
> http://www.jessrules.com
>
>
>
>
>
>
>
>
> --------------------------------------------------------------------
> To unsubscribe, send the words 'unsubscribe jess-users [email protected]'
> in the BODY of a message to [email protected], NOT to the list
> (use your own address!) List problems? Notify [email protected].
> --------------------------------------------------------------------
>
 		 	   		  



--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [email protected]'
in the BODY of a message to [email protected], NOT to the list
(use your own address!) List problems? Notify [email protected].
--------------------------------------------------------------------
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.