Copy Link
Add to Bookmark
Report

QuickBasicNews Issue 1: ENVIRONMENT

eZine's profile picture
Published in 
QuickBasicNews
 · 10 Jan 2020

 
…ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕª
∫ ENVIRONMENT ∫
»ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕº


The environment is the program you run when you want to edit, run,
debug, or do other things with your programming code.

To get into the environment you will have to invoke ( start ) your
QBasic or QuickBasic editor. Most QBasic users will find the QBasic
interpreter program under the DOS directory. The QuickBasic compiler
program is often under the directory QB45 ( But could be anywhere
you put it ). To start QBasic simply type in QBasic and then press
return. To start QuickBasic type in QB at the DOS prompt ( assuming
you are under the directory where QuickBasic is located ).

There are several main areas of the screen while in the environment.
At the top of the screen is the Menu Bar. Here you select such items
as Edit, View, Search, Run, and Debug. The screen looks very similar
for QBasic and QuickBasic, however QuickBasic has more options.

The main portion of the editing screen is in the middle, and is
known as the editing window. This is where you will enter your
BASIC programming code. This area functions like most text editors
as far as most of the editing keys are concerned.

At the bottom of the screen is what is known as the immediate window.
This is the area where you can enter BASIC commands and see the
results of the commands immediately without having to run the program
located in the main editing window.

If you are not familiar with working within the environment I
suggest you run the program called LEARN.COM which is on one of the
installation disks that comes with QuickBasic. This program will
take you into a training program called the QB EXPRESS which is a
tutorial on working within the QuickBasic environment. If you have
QBasic you will see a copyright screen as soon as you start QBasic
that will ask you if you want to use the Survival Guide. The
survival guide is an online help system on how to use QBasic.
It is short and to the point. If you see this survival guide question
then you have QBasic, not QuickBasic.

One of the most important features new users should be aware of
is the use of the extensive on line help available. Help is available
from the Menu bar. However, there is a shortcut to getting help that
is very easy to use. It is the F1 key. If you want help on a
particular BASIC KEYWORD simply type in the word. Place the cursor
on that word, or just to the right of it and press F1. Help on how
to use that KEYWORD will pop up immediately.

One note for QuickBasic users. There is a known bug that you can
easily avoid. When you select save from the File menu, you will be
prompted to save the file in one of two formats. It will look
something like this:

Save AS

( ) QuickBasic
Fastload and
Save

(X) Text -
Readable by
other programs

To avoid the known bug always select Text - Readable by other programs.
Although the QuickBasic Fastload and Save option usually causes no
problems, occasionally it does. The problem is that your system may
lock up.

Once you start to program, you will find that the Debugging options
can be very useful to help you with locating errors within your code.
Some errors within your code will be what is known as logical errors. These
errors generally will not return an error. For instance: Assume you are
trying to find the number of minutes in a day and you have the following
statements:

hoursinaday = 23
minutes = 60
totalminutes = minutes * hoursinaday
print totalminutes

This program would run with no errors even though the answer you
wanted would be wrong. That is because you assigned the wrong number to
hoursinaday. The program did just what you wanted it to do, multiplying
minutes times hoursinaday. It then assigns that total to totalminutes.
However when you print it, the answer is wrong. This is because there
is a problem with your logic, not with the program. Keep this in mind,
because errors in your logic can be hard to find.

← previous
next →
loading
sending ...
New to Neperos ? Sign Up for free
download Neperos App from Google Play
install Neperos as PWA

Let's discover also

Recent Articles

Recent Comments

Neperos cookies
This website uses cookies to store your preferences and improve the service. Cookies authorization will allow me and / or my partners to process personal data such as browsing behaviour.

By pressing OK you agree to the Terms of Service and acknowledge the Privacy Policy

By pressing REJECT you will be able to continue to use Neperos (like read articles or write comments) but some important cookies will not be set. This may affect certain features and functions of the platform.
OK
REJECT