[rules-users] rule with array
Wolfgang Laun
wolfgang.laun at gmail.com
Thu Feb 16 02:36:25 EST 2012
On 15/02/2012, shawn <youngxiao121 at hotmail.com> wrote:
> I found someone idea. It's kind of like split array.
> when
> Request( $sPath : getSubjectPath() ) // get two dimensional array
> then
> for( int i = 0; i < $sPath.length; i++ ) {
>
> insert( $sPath[i]);
>
> }
> But I don't know how to find the facts that are inserted through for loop.
>
This is almost certainly not a good idea. Apart from not being able to
write a pattern for int[] you'd have to deal with the inserted arrays,
and the efficiency isn't improved by this at all. If you don't see a
triple nested loop in your code then this doesn't mean that it isn't
there.
It seems to me that the type of Request could be improved upon.
-W
More information about the rules-users
mailing list