title: Does IEC-61131 Structured Text allow comparison of boolean operands?
body: <p>I'm building a parser and type checker for Structured Text.  ST is a derivative of Pascal.</p>
  
  <p>It is clear that ST allows equality comparison of two declared real variables X and Y as </p>
  
  <pre><code> X = Y
  </code></pre>
  
  <p>It is also clear you can write</p>
  
  <pre><code> X &lt;&gt; Y
  </code></pre>
  
  <p>and </p>
  
  <pre><code> X &gt; Y
  </code></pre>
  
  <p>If I have two declared boolean variables A and B, is</p>
  
  <pre><code> A = B
  </code></pre>
  
  <p>legal?  Pascal would certainly say so.   The reference documents I have for ST (including an Australian version of the 2004 standard, and several vendors implementations) are unclear.</p>
  
  <p>Can I write:</p>
  
  <pre><code> A &gt; B
  </code></pre>
  
  <p>and what does it mean?</p>
  
  <p>[In the abstract, I'm interested in the same questions for comparing strings.  Brownie  points for addressing that issue too].  </p>
  
  <p>[No, I can't just try it on a real controller; I don't actually have one and the nearest one is effectively two days away from me.]</p>
  
  <p>What's the answer, and what's the reference document you consulted that shows the answer?</p>