generated docs added

This commit is contained in:
n00b
2024-10-24 23:25:02 -04:00
parent b14019f9a9
commit 6edb1bc09d
939 changed files with 88629 additions and 8 deletions

View File

@@ -2,7 +2,7 @@
#header CONDITIONS
RC BASIC uses the same conventions of other programming languages to control the flow of the program. There are two main ways of getting your program to decide on its next course of action. The most common way is with the <b>IF</b> statement block.
#code
If 5 > 6 Then
Print "THIS WILL NOT PRINT"
ElseIf 5 < 6 Then
@@ -10,11 +10,12 @@ ElseIf 5 < 6 Then
Else
Print "THIS ALSO WILL NOT PRINT"
End If
#/code
The above example does different comparisons and will output text to a console depending on which condition is true.
The next method of control flow is the <b>SELECT</b> statement block.
#code
Select Case 5
Case 6
Print THIS WILL NOT PRINT"
@@ -25,8 +26,10 @@ Default
' Default is optional and can be excluded if you don't need it
Print "THIS WILL NOT PRINT"
End Select
#/code
The above example will compare each case in the block to the <b>SELECT CASE</b>. If the case is equal to the select case then the code in that case will be executed. You can also add multiple values to compare to each <b>CASE</b>.
#code
Select Case 5
Case 6
Print THIS WILL NOT PRINT"
@@ -35,5 +38,6 @@ Case 4, 5
Default
Print "THIS WILL NOT PRINT"
End Select
#/code
The above example is mostly the same as the previous example. The difference is that in our second <b>CASE</b> we are comparing both 4 and 5. If either of them are equal to our <b>SELECT</b> argument then the code inside the <b>CASE</b> block will execute.