This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:if [2016/08/12 12:24] admin |
en:if [2020/03/02 22:43] (current) 122.160.95.11 [If / Then (Statement)] |
||
---|---|---|---|
Line 1: | Line 1: | ||
===== If / Then (Statement) ===== | ===== If / Then (Statement) ===== | ||
+ | INPUT " | ||
+ | IF M<75 THEN PRINT " | ||
+ | END IF | ||
==== Format ==== | ==== Format ==== | ||
- | **if** [[booleanexpressions|boolean_expression]]// **then** | + | **if** [[booleanexpressions|boolean_expression]] **then** |
- | **if** [[booleanexpressions|boolean_expression]]// **then** | + | **if** [[booleanexpressions|boolean_expression]] **then** [[programsyntax|statement]] **else** [[programsyntax|statement]] \\ |
+ | **if** [[booleanexpressions|boolean_expression]] **then** [[compoundstatementprogramsyntax|compound_statement]]\\ | ||
+ | **if** [[booleanexpressions|boolean_expression]] **then** | ||
---- | ---- | ||
- | **if** [[booleanexpressions|boolean_expression]]// **then**\\ | + | **if** [[booleanexpressions|boolean_expression]] **then**\\ |
- | //statement(s)//\\ | + | [[programsyntax|statement(s)]]\\ |
**end if** | **end if** | ||
---- | ---- | ||
- | **if** [[booleanexpressions|boolean_expression]]// **then**\\ | + | **if** [[booleanexpressions|boolean_expression]] **then**\\ |
- | //statement(s)//\\ | + | [[programsyntax|statement(s)]]\\ |
**else**\\ | **else**\\ | ||
- | //statement(s)//\\ | + | [[programsyntax|statement(s)]]\\ |
**end if** | **end if** | ||
==== Description ==== | ==== Description ==== | ||
- | A single line IF evaluates // | + | A single line IF evaluates // |
==== Example ==== | ==== Example ==== | ||
< | < |