'When a if case is true, it should run another if case
I'm programming with the languege xojo and I want my computer to first run an if case and if that case is true, it should run another if case. How can I do that with xojo ?
Solution 1:[1]
Below is an example of an If statement that includes the use of ElseIf and Else clauses:
Var theNumber As Double
If theNumber > 0 And theNumber < 100 Then
MessageBox("The entered number is between 0 and 100")
ElseIf theNumber == 0 Or the number == 100 Then
MessageBox("The entered number is either 0 or 100")
ElseIf theNumber < 0 Or theNumber > 100 Then
MessageBox("The entered number is either below 0 or above 100")
Else
MessageBox("Invalid input. Please try again...")
End If
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Patrick Cyubahiro |
