uot;</code></pre>

<p>Swift uses only simple Boolean values in conditional contexts to help avoid
accidental programming errors and to help maintain the clarity of each
control statement. Unlike in other programming languages, in Swift, integers
and strings cannot be used where a Boolean value is required.</p>

<p>For example, the following code sample does not compile, because it
attempts to use the integer <code>i</code> in a logical context:</p>

<pre><code class="language-swift">var i = 5
while i {
    