NR Hosting Ltd

What is the use of QBasic Programming Language?

What is the use of QBasic Programming Language?

QBASIC is a high level programming language that allows us to write programs. BASIC uses English like words and mathematical symbols to write programs. The programs written in QBASIC need to be converted into machine codes. QBASIC provides working area to write programs and QBASIC has its own Interpreter. QBASIC converts one statement of a program into machine code at a time. After the execution of the previous statement, it converts another statement of the program into machine code and so on. For this reason, QBASIC is also called an Interpreter.

QBASIC Editor checks syntax errors and capitalizes QBASIC reversed words. QBASIC Editor provides all the facilities that are required for programs. In the QBASIC Editor; you can write, edit, run and debug programs.


Some features of QBASIC are listed below:

  1. does not use technical terminology (word) to write statements.
  2. automatically checks syntax.
  3. capitalizes the reserved words.
  4. keeps the same variable name used in a program to identical form.
  5.  allows you to break lengthy programs into modules.
  6. interprets a statement of a program at a time to CPU.


QBASIC programming language consists of two files: QBASIC.EXE and QBASIC.HLP. Normally these files are found in a folder named ‘QBASIC’ which is in drive C:.

To start Q BASIC, follow these steps.

    Click the Start button.

    Point to All Programs and then Accessories.

    Select Command Prompt. It displays Command Prompt Window.

    To move to the root directory, at DOS prompt, type CD\ and press Enter key.

    At C:\> prompt, type CD QBASIC and press Enter key.

    At C:\ QBASIC> prompt, type qbasic and press Enter key. It will display QBASIC Welcome Screen.

    Press Esc key to get QBASIC Editor Screen.


Editor is the window where you write programs. The editor provides all the facilities to write programs and editing them.

Editor Screen has four parts.

  1. Menu Bar.
  2. Program Window
  3. Immediate Window
  4. Status Bar
  5. Menu Bar

The Menu Bar consists of list of commands like File, View, Search, Run, Debug, Options and Help. These menus again have some sub commands such as FILE= New, Open, Save, Save As, Print, Exit. EDIT= Cut, Copy, Paste, Clear, New Sub, New Function. VIEW= Subs, Spilt, Output Screen. SEARCH= Find, Repeat Last Find, Change. RUN= Start, Restart, Continue. DEBUG= Step, Procedure Step, Trace On, Toggle Breakpoint, Clear All Breakpoints breakpoints, Set Next Statement. OPTIONS= Display, Help Path, Syntax Checking.

  1. Program Window

The upper window which is titled as ‘Untitled’ is the window where you write programs. This window is called Program Window. To see the output of the statements written in this window, you need to press Shift + F5 key.

  1. Immediate Window

The lower window which is titled as ‘Immediate’ is known as Immediate Window where you test commands, expressions etc. As soon as you press Enter key, it displays the output on the screen.

Note: F6 function key is used to switch from Program Window to Immediate Window and vice versa.

  1. Status Bar

The status bar shows short cut keys and the location of the cursor on the screen.


After entering a set of instructions in the Program Window, you may want to see the output of the program. To see the output of the program you need to run a program. When you run a program IT converts and directs each statement of a program at a time to the CPU. To run (execute) a program

Press Shift + F5 key or press Alt, R, S.


F5 key is used for continuing the program from the previous stop statement.


You need to save a program for the future use. Sometimes you need to save incomplete program so that you can complete at next time. To save a program, follow these steps:

    Press ALT + F key.

    Highlight Save As Option.

    Press Enter key. It displays Save Dialog Box.

    Enter Filename in the Filename text box.

    Press Enter key.


    When you supply filename just use not more than eight characters for filename.

    Program automatically adds an extension as .BAS for the program file.


To write a new program you need to remove the previous program from the Program Window. To clear or remove the previous program, follow these steps.

  1. a) Press ALT key.
  2. b) Highlight New option and press Enter key. OR. Press F, N keys.


To open an existing program in the Program Window, follow these steps.

  1. Press Alt key.
  2. Press F key.
  3. Highlight Open command and press Enter key.
  4. Select a program file the list of files displayed in the Open Dialog box and press Enter key


To exit from the Program, follow these steps.

  1. Press ALT key. It will activate menu.
  2. Press F or Enter key.
  3. Press X or select Exit command under File menu and press Enter key.

Leave a Reply

Your email address will not be published.