What are the basic commands in QBasic?
QBasic is an old programming language, so the specific commands you can use will depend on the version you have installed. However, here are some basic commands that are commonly used in QBasic:
1. PRINT: This command is used to display text or the value of a variable on the screen.
2. INPUT: This command is used to get input from the user and store it in a variable.
3. GOTO: This command is used to jump to a specific line number in the program.
4. IF-THEN: This command is used for conditional branching in the program. It allows you to specify a condition, and if that condition is true, a specific set of instructions will be executed.
5. FOR-NEXT: This command is used to create a loop that will repeat a specific set of instructions a certain number of times.
6. WHILE-WEND: This command is used to create a loop that will continue to repeat a specific set of instructions as long as a certain condition is true.
7. DEF FN: This command is used to define a custom function that can be called later in the program.
8. END: This command is used to stop the program execution.
These are some of the basic commands you can use in QBasic, but there are many more that can be used to do more advanced things like file handling, graphics and more.
0 Comments