[This message was posted by Greg Malatestinic of Jordan & Jordan 
<[email protected]> to the "Algorithmic Trading" discussion forum at 
http://fixprotocol.org/discuss/31. You can reply to it on-line at 
http://fixprotocol.org/discuss/read/6e318b9a - PLEASE DO NOT REPLY BY MAIL.]


According to the FIXatdl-1.1 spec:
".. the logical operators, AND and OR, can have more than two operands. 
Furthermore, they both perform short-circuit evaluation of their operands. That 
being the case, it is important that XML parsing or binding libraries maintain 
the order of the elements as they appear; otherwise unexpected results may 
occur."

But what abuot XOR? The spec doesn;t say anything about it.

SO here is my interpetation... 
All logical operators are binary. However, there is an exception for AND and 
OR, which can have more than two operands (this was stricly for convenience 
since most programming languages allow for this). XOR must have two and only 
two operands. The operator, NOT, must have exactly one operand.

I realize that we can get a creative and let XOR have multiple interpretations 
(one and only one from a set, two and only two from a set, three but not more 
than four, etc.), but that's the programmers job, or in this case the FIXatdl 
author's job.

So I think you'll need to re-write the <Edit> to something like this:
<Edit logiOperator="OR">
 <Edit logicOperator="AND">
  <Edit operator="EX" field="Field1"/>
  <Edit operator="NX" field="Field2"/>
  <Edit operator="NX" field="field3"/>
 </Edit>
 <Edit logicOperator="AND">
  <Edit operator="NX" field="Field1"/>
  <Edit operator="EX" field="Field2"/>
  <Edit operator="NX" field="field3"/>
 </Edit>
 <Edit logicOperator="AND">
  <Edit operator="NX" field="Field1"/>
  <Edit operator="NX" field="Field2"/>
  <Edit operator="EX" field="field3"/>
 </Edit>
</Edit>

-Greg

[You can unsubscribe from this discussion group by sending a message to 
mailto:[email protected]]

-- 
You received this message because you are subscribed to the Google Groups 
"Financial Information eXchange" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fix-protocol?hl=en.

Reply via email to