Skip to main content
QBASIC notes
Introduction of QBASIC
QBASIC is a high level programming language. The full form of QBASIC is Quick Beginner's All-purpose Symbolic Instruction code. It is simple and easy to learn. In 1964, John G.kemeny and Thomas E-kurtz designed the original BASIC language at Dartmouth college.Bill Gates and Paul Allen developed the programming language.
Features of Qbasic
1) It is a user friendly language.
2) It user simple syntax to write program.
3) It provides windows based platform.
4) Debugging can be easily done.
Character sets of Qbasic
1) Alphabets
A to Z or a to z
2) Numbers
0 to 9
3) special symbols
? ; : $ ! # etc.
Operators
Operator is a symbol which performs arithmetical and logical operations.
Such as
Addition, subtraction, Division etc.
Starting Qbasic in window 7,8,or 10
Since, the Qbasic is an old programming language, you cannot directly open this version of Qbasic like in window XP. You need to install an emulator program like Dosbox.
Use the following sets to run Qbasic using Dosbox
1) Download Dosbox from https://www.dosbox.com .
2) Intall dosbox by simply double clicking on the installation file.
3) After the installation of dosbox, its shortcut icon appears on the desktop.
4) Open the Qbasic folder and select the file QB.EXE.
5) Drag and drop on the icon of DOSBOx on your desktop.
6)QBASIC opens inside DOSBOx.
QBASIC IDE
IDE is an editor. It checks the code you write to find if there is any error. It is a menu drive interface, which provides you with a window having the following features:
1) Title Bar
It contains the current filename.
2) Menu Bar
It has 6 menus-file, Edit, View, Search, Run and Option. Each menu has a sub-menu with several options.
3) Status Bar
It shows the current line and column of curson.
QBASIC Interface
1) The file menu
The File Menu is used for different file operations such as New, Open, Save,Save As, and Exit.
1) click on file menu
Keyboard shortcut
1) press an ALT + F to select File Menu.
2) A drop-down menu appears with several options.
3) In each sub-menu, one letter is highlighted in white color. This letter (hotkey) is shortcut to select the option.
2) opening a new file
This option of file menu is used to write a new program.
click on File Menu > New
Keyboard shotcut
1) Press on ALT + F to select file menu, and press on N for New option.
3) Opening an existing file
This option of file menu is used to open a program file, which you have already created before.
Click on file menu > Open
Keyboard shortcut
1) Press on ALT + F to select File Menu, and press on O for Open option.
An open dialog box appears
Select the required filename.
Click on Ok button.
4) Saving your program
Save option in file menu allows you to save your program file in the secondary storage like hard disk.
Click on file menu > Save
Keyboard shortcut
1) press on ALT + F to select File Menu, and press on S for Save option.
A Save As dialog box appears.
Type the filename with the extension .bas.
Click on Ok button.
5) Save As Option
This option is used to save an already file with another name in same place or in other location.
6) Exit from QB64
Exit option in file menu allows you to exit from QBASIC.
Click on File Menu > Exit
Keyboard shortcut
Press on ALT + F to select File Menu, and press on X for Exit option.
7) The Run Menu
The Run Menu allows you to run or execute your QBASIC program.
Click on Run Menu > Start
Note: Before executing your program, the QB64 creates an exe (executable) file. The executable file (have extension .exe) is an independent file which you can run in any computer without QB64.
Keyboard shortcut
Press on F5 key to run your program.
8) The Help Menu
The Help Menu guides you to use a particular keyword or command in QBASIC.
Click on Help Menu > View
Keyboard shortcut
1) press on ALT + H to select Help Menu, and press on V for View option.
2) press on F1.
Note: Press on Esc key to exit from help.
Shortcut keys:
Tasks Shortcut keys
1) To select file menu ALT + F
2) To open new file ALT +F +N
3) To open an existing file ALT + F + O
4) To save your program file ALT + F + S
5) To exit from QBASIC ALT + F+ X
6) To run program F5
7) To get help ALT + H + V or F1
8) To exit from help Esc
Comments
Post a Comment