Hi bassmann,
The easiest way is to multiply (or AND) your conditions with an optimised variable:
Entry1:=myEntryCondition1 * opt1;
Entry2:=myEntryCondition2 * opt2;
Entry3:=myEntryCondition3 * opt3;
Exit1:=myExitCondition1 * opt4;
Exit2:=myExitCondition2 *opt5;
Exit3:=myExitCondition3 * opt6;
etc
with each of the optimised variables having values of zero or one.
Also, read up on how MS thinks of just about everything in Boolean terms as this will make your coding a bucket load easier!
e.g.
x := If(Entry1=1 AND Entry2=1 AND Entry3=1,1,0);
is more easily written (and read) as:
x := Entry1 AND Entry2 AND Entry3;
Hope this helps.
wabbit
P.S. Be careful to always keep in the back of your mind, the fine difference between optimising and curve fitting.