Steven,

The later syntax is definite possible, but we don't support it at the moment. It wasn't something I saw in the other rule engines, so I decided to be conservative with my approach. But there is no reason why that can't be passed and the following produced in the engine. Cell(value == 0, size > 0, options contains $x, row == 1 || col == 2 || block == 3)
->
Cell(value == 0, size > 0, options contains $x, row == 1 ) ||
Cell(value == 0, size > 0, options contains $x, col == 2 ) ||
Cell(value == 0, size > 0, options contains $x, block == 3)

Make a jira request and I will look into this for 3.1. It's trivial to add, but I'm concerned the impact this might have on users who don't understand what this generates.

Mark


Steven Williams wrote:
I guess I should be using:

Cell(row == 1) || Cell(col == 2)

but if I am also matching on many other columns this becomes a little
unwieldy:

Cell(value == 0, size > 0, options contains $x, row == 1) || Cell(value ==
0, size > 0, options contains $x, col == 2) || Cell(value == 0, size > 0,
options contains $x, block == 3)

I would find this is easier to read:
Cell(value == 0, size > 0, options contains $x, row == 1 || col == 2 ||
block == 3)

Steve

---------- Forwarded message ----------
From: Steven Williams <[EMAIL PROTECTED]>
Date: Apr 18, 2006 11:57 PM
Subject: Or constraints
To: [email protected]

I was wondering if there was a way to do ORs across columns without using
eval?

For instance, instead of doing:

Cell($r : row, $c : col)
eval($r == 1 || $c == 2)

do:

Cell(row == 1 || col == 2)

I tried the above syntax but it seems to ignore the part after the or
completely (ie. it matches on all cells in row 1 only).

thanks
Steve

--
Steven Williams

Supervising Consultant

Object Consulting
Office: 8615 4500 Mob: 0439 898 668 Fax: 8615 4501
[EMAIL PROTECTED]
www.objectconsulting.com.au

consulting | development | training | support
our experience makes the difference


--
Steven Williams

Supervising Consultant

Object Consulting
Office: 8615 4500 Mob: 0439 898 668 Fax: 8615 4501
[EMAIL PROTECTED]
www.objectconsulting.com.au

consulting | development | training | support
our experience makes the difference


Reply via email to