The term ‘decisions’ refers to the use of conditional statements to decide what to execute in your program. Conditional statements test if a given expression is ‘True’ or ‘False.’Then, statements are executed. Normally a condition uses an expression in which a comparison operator is used to compare two values or variables. KBasic supports all VB6 conditional statements and more.
The statements that control decisions and loops in KBasic are called control structures. Normally every command is executed only one time but in many cases it may be useful to run a command several times until a defined state has been reached. Loops repeat commands depending upon a condition. Some loops repeat commands while a condition is ‘True,’ other loops repeat commands while a condition is ‘False.’ There are other loops repeating a fixed number of times and some repeat for all elements of a collection.
Class : Classes are needed, when you would like use custom objects.
Module : Modules are needed, when you would like to organize large code parts
Choose : Returns one value from a list of values depending on the index.
Do...Loop Until : repeats until a condition is set
Do...Loop While : repeats statements while condition is set
Do Until...Loop : A group of statements enabling you to define a loop which will be repeated until a certain condition remains true.
Do While...Loop : A group of statements enabling you to define a loop which will be repeated until a certain condition remains true.
End : ends the execution of a program immediately
Exit Do : breaks out of a loop
Exit For : breaks out of a for loop
Exit Function : exits a function
Exit Sub : exits a sub
For Next : Defines a loop that runs for a specified number of times.
GoSub : jumps to the desired sub
GoTo : jumps to the desired label or line
If : single decision possibility
IIf : returns a value depending on an expression
Iterate Do : continues to iterate a loop if condition is set
Iterate For : continues to iterate a for loop if condition is set
On Error : jumps to desired label or line if an error occured
On...GoSub : jumps to the desired sub
On...GoTo : jumps to another line or label depending on an expression
Resume : continues execution after an error occured
Return : returns either from a gosub call or leaves the function or sub
Select Case : Multi-line conditional selection statement.
Stop : stops the running program
Switch : returns a value depending on an expression
System : exit program and returns to system
Try : TRY CATCH statement
While...End While : WHILE initiates a WHILE END WHILE loop.
While...WEnd : WHILE initiates a WHILE-WEND loop.
Some description here…
Written by AUTHOR