Once QBASIC program is loaded into the computer memory, it displays Ok prompt. Ok means it ready to accept the commands. QBASIC can be made to translate your instructions in two modes:
• Direct Mode
• Program Mode
1. Direct Mode: The accepts single line instructions from the user and the output is viewed as soon as enter key is pressed. The instructions are not stored in the memory. This mode can be used to do quick calculation. They do not have line numbers.
E.g.
Print 3+4
Print “This is the Direct mode in QBasic”
2. Program Mode: The mode is used to type a program which is stored in the memory. They have line numbers. We have to give the command to get the output.
E.g.
10 Print 3+4
20 End
RUN
Programs are built up with set of instructions or commands. Every programming language has its own
SYNTAX (rules) and COMMANDS.
No comments:
Write comments