| 1 | <h2>Comments</h2> |
| 2 | <pre><code>!foobar |
| 3 | REM foobar |
| 4 | 'foobar</code></pre> |
| 5 | |
| 6 | <h2>Example</h2> |
| 7 | <pre><code>Public Function findValue(ByVal arr() As Double, |
| 8 | ByVal searchValue As Double) As Double |
| 9 | Dim i As Integer = 0 |
| 10 | While i <= UBound(arr) AndAlso arr(i) <> searchValue |
| 11 | ' If i is greater than UBound(arr), searchValue is not checked. |
| 12 | i += 1 |
| 13 | End While |
| 14 | If i > UBound(arr) Then i = -1 |
| 15 | Return i |
| 16 | End Function</code></pre> |