Friday, September 15, 2017

Q-BASIC

INTRODUCTION




    Q-basic  (Quick Beginners All purpose Symbolic Instruction Code) is an IDE and interpreter for a variety of the Q-BASIC programming language which is based on Quick BASIC. It was developed by Professor John G. Kemeny and Thomas Kurtz in 1964.Q-BASIC is very simple and easy to learn. Q-BASIC gives clear ideas to the learners about the user of logical expressions, the way of writing instructions and executions of the instructions. There are many different versions of BASIC. Q-BASIC is one of the versions of BASIC. Some other versions of BASIC are GW-BASIC, Quick BASIC, Turbo BASIC, Visual BASIC, etc. Q-BASIC is a high level programming language that allows us to write programs. Q- BASIC uses English like words and mathematical symbols to write programs. The programs written in Q-BASIC need to be converted into machine codes. Q-BASIC provides working area to write programs and Q-BASIC has its own Interpreter. Q-BASIC converts one statement of a program in 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, Q-BASIC is also called an Interpreter. Q-BASIC is also used of making games, programming or operating devices etc.


FEATURE OF Q-BASIC




    Some features of Q-BASIC are listed below: 
a) Q-BASIC does not use technical terminology (word) to write statements.
b) Q-BASIC automatically checks syntax.
c) Q-BASIC capitalizes the reserved words.
d) Q-BASIC keeps the same variable name used in a program to identical form.
e) Q-BASIC allows you to break lengthy programs into modules.
f) Q-BASIC interprets a statement of a program at a time to CPU etc.

LOADING Q-BASIC

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

  .To start Q-BASIC, follow these steps.
  1. Click the Start button.
  2. Point to All Programs and then Accessories.
  3. Select Command Prompt. It displays Command Prompt Window.
  4. To move to the root directory, at DOS prompt, type CD\ and press Enter key.
  5. At C:\> prompt, type CD Q-BASIC and press Enter key.
  6. At C:\ Q-BASIC> prompt, type Q-BASIC and press Enter key. It will display Q-BASIC Welcome Screen.
  7. Press Esc key to get Q-BASIC Editor Screen.

Q-BASIC EDITOR SCREEN

    Q-BASIC editor is the window where you write programs. The editor provides all the facilities to write programs and editing them. Q-BASIC Editor Screen has four parts:
a) Menu Bar.
b) Program Window
c) Immediate Window
d) Status Bar.

RUNNING A PROGRAM




After entering a set of instructions in the Program Window and to see the output of the program, you need to run a program. When you run a program Q-BASIC converts and directs each statement of a program at a time to the CPU. To run (execute) a program, Press  F5 key or press Alt, R, S
"Note: F5 key is used for continuing the program from the previous stop statement."

SAVING A PROGRAM

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:
  1. Press ALT + F key.
  1. Highlight Save As Option.
  1. Press Enter key. It displays Save Dialog Box.
  1. Enter File name in the File name text box.
  1. Press Enter key.

Note:
  • When you supply file name just use not more than eight characters for file name.
  • Q-BASIC automatically adds an extension as .BAS for the program file.

EXITING Q-BASIC




To exit from the Q-BASIC, follow these steps:
a) Press ALT key. It will activate menu.
b) Press F or Enter key.
c) Press X or select Exit command under File menu and press Enter key

                                        Thank you for your time!