title: Sequential logic and readability
body: <p>This is a abstract question, with no real code (and maybe not the best Pseudo code either) so hopefully it is meaningful enough to not get moderated to death. But it's a question that has come up for me over and over, since the project I am working on is a very linear, dependent on previous conditions, process. So...</p>
  
  <p>Given a series of logical tasks, each of which is dependent on the preceding one, I have tried two ways to structure the code.
  One depends on a <code>proceed</code> variable, like this</p>
  
  <pre><code>Proceed = True
  
  If Task1 Not Successful Then
      Proceed = False
  End If
  
  If Proceed Then 
      If Task2 Not Successful Then 
          Proceed = False
      End If
  End If
  </code></pre>
  
  <p>etc.</p>
  
  <p>But I have read in a number of places comments to the effect that this running Proceed variable approach is not ideal. So, alternatively I can have</p>
  
  <pre><code>If Task1 Succcesful Then 
      If Task2 Successful
         Then Etc
      Else
          Error Condition
      End If
  Else
      Error Condition
  End If
  </code></pre>
  
  <p>To my eye, the former is MUCH more readable, the logic is very obvious. And, when the number of task in the sequence gets large (more than 3 or really) then the nested Ifs really becomes unwieldy.
  So, my question is, what is the REASON for not using this first approach?
  And is there a better way to structure the logic in the second example to improve the readability?
  Or is there a third way that addresses both the issues (whatever they are) with the former, as well as the readability issues of the latter?
  Or is the first approach actually fine, when one really does have a sequence of sequentially dependent tasks?</p>