Loops and IF statements
Now it's time to learn how you do Loops in BBj, and how you can create IF-statements.
Again, let's start with a short video:
BBx Clues 5: Loops and IF Statements: https://www.youtube.com/watch?v=jxSfPOuj_nk
Summary:
- IF-Statements are either multi-line:
IF something THEN
PRINT "something is true"
ELSE
PRINT "something is false"
ENDIF
- or a single line:
IF something THEN PRINT "something is true"
- BBj knows
FOR...NEXT,WHILE...WENDandREPEAT...UNTIL - The keyword to exit a loop is
BREAK - The keyword to skip to the next iteration inside a loop is
CONTINUE
Now visit this documentation page and locate the keywords. Have a look around - what else could be used for the flow structure of a program?