Path: blob/master/payloads/examples/Conditions/Conditions-example1.txt
2968 views
REM The flow control statement IF will determine whether or not to execute its block of code based on the evaluation of an expression. One way to interpret an IF statement is to read it as "IF this condition is true, THEN do this".12REM The IF statement consists of these parts3REM - The IF keyword4REM - The condition, or expression that evaluates to TRUE or FALSE5REM - In most cases, the expression is surrounded by parenthesis ( )6REM - The THEN keyword7REM - One or more newlines containing the block of code to execute8REM - The END_IF keyword910REM Example IF THEN1112$FOO = 4213$BAR = 13371415IF ( $FOO < $BAR ) THEN16STRING 42 is less than 133717END_IF1819REM The expression "Is 42 less than 1337" is evaluated and determined to be TRUE.20REM Because the IF condition is TRUE, the code between the keywords THEN and END_IF are executed.21REM The string "42 is less than 1337" is typed.2223