hai all
   i am getting a problem in getting the Vector elements.


  i have a clip file:

         (deftemplate ask (slot paper)(slot code))
        (deffacts again (ask (paper one)(code code1))
                                (ask (paper two)(code code2))
                                (ask (paper one)(code code3))
                         (ask (paper one)(code code3)))


 in jess file ....
 // when i tried to get the elements matched with paper one in rules RHS i
am geting and ArrayIndexOutOfBounds Exception for the vector to where i want
to store .

  // here is the code
        Rete r= new Rete();
        //functios
      r.executeCommand("(defglobal ?*v* = (new Vector)) ");
        r.executeCommand("(store RESULT ?*v* )");
      r.executeCommand("(defrule urs (ask (paper one )(code ?z)) => (call
?*v* addElement ?z))
      Vector sk=new Vector();
       sk= (Vector)r.fetch("RESULT").externalAddressValue(null);
      System.out.println("Element 1 " + sk.elementAt (0));
    // here the elements are not being added and i am getting
arrayindexoutof bounds exception
//any one please help me......
// lots of thanks in advance
Dev.





---------------------------------------------------------------------
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]
---------------------------------------------------------------------

Reply via email to