End If
Verb: endIf
Terminates a command block started by If.
Syntax
endIf
Example
A student's average is stored in a variable. The If commanhd defines that if the value is greater than 7, a message appears on the screen stating that the student can participate in a draw. Then End If terminates the command block.
defVar --name studentAverage --type Numeric --value 8 --parameter
// Check the value of "studentAverage" and inform that you can participate in the draw, because this value is greater than 7.
if --left "${studentAverage}" --operator "Greater_Than" --right 7
messageBox --title Grade --text "Congratulations! You can participate in the draw!" --icon "Information" --buttons "OK" --defaultbutton "FirstButton"
endIf
// At the end, the command block is closed.
logMessage --message "${studentAverage}" --type "Info"
// Display the value of "studentAverage" in the console.
Remarks
A command block that starts with If always ends with End If. Hence, End If cannot be used without If.