Thats was a quick reply. I had a wrong idea of how the slots work. I understood 
now.

Thanks you.
Santiago

----------------------------------------
> From: ejfr...@sandia.gov
> To: jess-users@sandia.gov
> 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
>> y...@address.com'
>> in the BODY of a message to majord...@sandia.gov, NOT to the list
>> (use your own address!) List problems? Notify owner-jess-us...@sandia.gov
>> .
>> --------------------------------------------------------------------
>
> ---------------------------------------------------------
> 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 y...@address.com'
> in the BODY of a message to majord...@sandia.gov, NOT to the list
> (use your own address!) List problems? Notify owner-jess-us...@sandia.gov.
> --------------------------------------------------------------------
>
                                          



--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.
--------------------------------------------------------------------

Reply via email to