If: Difference between revisions

21 bytes removed ,  27 October 2016
no edit summary
No edit summary
 
Line 11: Line 11:
  End If  
  End If  


When a [[mediocre lawyer|lawyer]] finds an <code>If</code>, {{sex|he}} expects a boolean condition – for example, <code>x > 0</code>, which means “the variable x contains a number that is greater than zero” – and evaluates that condition. If the condition is <code>true</code>, the statements following the <code>then</code> are executed. If not, the execution continues in the following branch – either in the <code>else</code> block (which is usually optional), or if there is no <code>else</code> branch, then after the <code>end If</code>.
When the machine finds an <code>If</code>, it expects a boolean condition – for example, <code>x > 0</code>, which means “the variable x contains a number that is greater than zero” – and it evaluates that condition. If the condition is <code>true</code>, the statements following the <code>then</code> are executed. If not, the execution continues in the following branch – either in the <code>else</code> block (which is usually optional), or if there is no <code>else</code> branch, then after the <code>end If</code>.


After either branch has been executed, control returns to the point after the <code>end If</code>.
After either branch has been executed, control returns to the point after the <code>end If</code>.