title: error in if-statement, requires scalar logical expression
body: <p>Within a subroutine I try to create a statement, however it will only work if I enter a number directly, as soon as I replace the number with a variable, it will give the error:</p>
  
  <pre><code>||Error: IF clause  requires a scalar LOGICAL expression|
  </code></pre>
  
  <p>In this example var is a real number between 0 and 1.</p>
  
  <pre><code>    if ( var%type3 &lt; 0.5) then
              test = 1
      end if
  </code></pre>
  
  <p>where the <code>type3</code> component is declared as</p>
  
  <pre><code>    real, dimension(1,1) :: type3
  </code></pre>
  
  <p>Does someone maybe know what we are doing wrong. Because the error does not give us any clues which part of the statement is wrong.</p>