QBasic, a programming language developed by Microsoft, has several statements for various operations. Here are some common QBasic statements:
REM: Used for comments.
REM This is a comment
LET: Used for variable assignment.
LET variable = expression
INPUT: Takes input from the user.
INPUT "Enter your name: ", name$
PRINT: Displays output.
PRINT "Hello, World!"
IF...THEN...ELSE: Conditional statement.
IF condition THEN
statement1
ELSE
statement2
END IF
FOR...NEXT: Looping statement.
FOR i = 1 TO 10
PRINT i
NEXT i
DO...LOOP: General loop.
DO
statement
LOOP UNTIL condition
GOTO: Jumps to a specified line number.
GOTO line_number
GOSUB...RETURN: Subroutine call and return.
GOSUB subroutine
' ...
RETURN
DIM: Allocates space for arrays.
DIM array(10)