<br><font size=2 face="sans-serif">Dear Tivadar,</font>
<br>
<br><font size=2 face="sans-serif">In GReAT the test case has a default
semantics that is the equivalent of a set of if blocks</font>
<br>
<br><font size=2 face="sans-serif">if(Case1) </font>
<br><font size=2 face="sans-serif">{</font>
<br><font size=2 face="sans-serif">}</font>
<br>
<br><font size=2 face="sans-serif">if(Case2)</font>
<br><font size=2 face="sans-serif">{</font>
<br><font size=2 face="sans-serif">}</font>
<br>
<br><font size=2 face="sans-serif">....</font>
<br>
<br>
<br><font size=2 face="sans-serif">The cut operator in an earlier if statement
makes the rest become else ifs</font>
<br>
<br><font size=2 face="sans-serif">Thus, if I have 3 cases 1, 2, and 3
and the second one has a cut, the equivalent pseudo code will be as follows:</font>
<br>
<br><font size=2 face="sans-serif">if(Case1)</font>
<br><font size=2 face="sans-serif">{</font>
<br><font size=2 face="sans-serif">}</font>
<br>
<br><font size=2 face="sans-serif">if(Case2)</font>
<br><font size=2 face="sans-serif">{</font>
<br><font size=2 face="sans-serif">}</font>
<br><font size=2 face="sans-serif">else</font>
<br><font size=2 face="sans-serif">{</font>
<br><font size=2 face="sans-serif"> if(Case3)</font>
<br><font size=2 face="sans-serif"> {</font>
<br><font size=2 face="sans-serif"> }</font>
<br><font size=2 face="sans-serif">{</font>
<br>
<br>
<br><font size=2 face="sans-serif">The effect you are wanting to get is
a different thing and the cut wont help you there. What you need is to
change the attribute "For All" in the case from true to false.
This attribute tells the matcher weather to look for all the matches or
the first match.</font>
<br>
<br><font size=2 face="sans-serif">Thanks,</font>
<br><font size=2 face="sans-serif">Adi</font>
<br>
<br>
<br><font size=2 face="sans-serif">-----------------------------------<br>
Aditya Agrawal<br>
Researcher<br>
IBM T. J. Watson<br>
mailto:aagrawa@us.ibm.com<br>
+1 (914) 784-6068 (TL 863)<br>
</font>
<br>
<br><font size=2><tt>great-users-bounces@list.isis.vanderbilt.edu wrote
on 05/03/2005 10:59:58 AM:<br>
<br>
> Hi,<br>
> <br>
> How does the cut operator work in a test case ?<br>
> <br>
> In the attached example, I'd like to choose a single Corridor from
<br>
> the house and run the rest of the rules on it (regardless of how <br>
> many corridors the house has).<br>
> I tried to use a test case with a cut operator, but I still get all
<br>
> the matches on the output side.<br>
> <br>
> thanks,<br>
> <br>
> Tivadar<br>
> <<Transf.xme>> <<House.xme>> <br>
> <br>
> <br>
> [attachment "Transf.xme" deleted by Aditya Agrawal/Watson/IBM]
<br>
> [attachment "House.xme" deleted by Aditya Agrawal/Watson/IBM]
<br>
> _______________________________________________<br>
> great-users mailing list<br>
> great-users@list.isis.vanderbilt.edu<br>
> http://list.isis.vanderbilt.edu/mailman/listinfo/great-users<br>
</tt></font>