home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.whtech.com
/
ftp.whtech.com.tar
/
ftp.whtech.com
/
club100
/
ref
/
ba01.do
< prev
next >
Wrap
Text File
|
2006-10-19
|
5KB
|
104 lines
Title: FUNDAMENTALS
REAL BASIC STUFF TO KNOW
To enter the BASIC interpreter/editor, place your highlighter on the word
BASIC and hit ENTER.
To get out of the BASIC interpreter/editor hit the F8 function key, or enter
the word MENU and hit ENTER.
If you start a program (programs are files with .BA extensions), you may stop
the programs operations by holding down on your SHIFT key and tapping the
BREAK key. You may, in some cases, be able to restart the program, from the
point you stopped it, by entering the word CONT and hitting ENTER. Results
differ from program to program.
You may pause the operations of a program by tapping your PAUSE key. You may
restart it again by tapping the PAUSE key again, i.e. PAUSE off, PAUSE on.
You may start a program from the beginning by entering the word RUN and
hitting ENTER, or tap your F4 function key, or, if the program appears in the
main menu as a file with a .BA extension, simply move your highlighter over
that file and hit enter.
You may start a program in the middle by entering RUN linenumber and hitting
ENTER. Linenumber means the number of the line you wish to start from.
However, programs started in the middle will be unable to use any information
normally created up to that point. This last sentence, and, indeed, the act
of starting programs in the middle, is an advanced issue, better left for
another time.
EDITING FUNDAMENTALS
A BASIC interpreter is actually two programs in one, an editor, and a code
translator. The editor is usually implemented as a line editor. A line
editor does not allow for full screen movement and editing in the same manner
as a full-function word processing editor. The editor function of BASIC on
most computers is line mode. Newer BASIC editor, like Microsoft QuickBASIC,
function more like word processing.
Line mode restricts editing to one line at a time. If, while entering a line
of code, you need to make a change at the beginning of that line, you must
back-space out all prior characters, in order to get the cursor to the point
where you wish to make the change. If you had hit ENTER, given the above
example, you would either have to totally reenter that line of code, in it's
correct form, or go into the edit mode. Different versions of BASIC provide
different editing modes.
The BASIC editor on Tandy laptops (Models 100, 102 and 200) function in the
same manner as other installations (line mode) with the added convenience of
the integration of TEXT, the built-in word processing program. Thus, editing
BASIC code on a Tandy laptop is very easy. If the line is short, you may
choose to reenter it. Otherwise, the process is as follows:
TO EDIT AN ENTIRE PROGRAM
1) Enter the word EDIT and hit ENTER.
2) Make changes as desired.
3) Tap the F8 function key.
TO EDIT ONE LINE
1) Enter the word EDIT linenumber and hit ENTER. Linenumber means the number
of the line you wish to edit, e.g. EDIT 10, EDIT 234.
2) Make changes as desired.
3) Tap the F8 function key.
TO EDIT A GROUP OF LINES
1) Enter the word EDIT linenumber-linenumber and hit ENTER. Linenumber-
linenumber means from-to, or any combination, e.g. EDIT 70-100, EDIT -60,
EDIT 60-. When you leave out either the from or to linenumber, the editor
will give you either from the beginning up to and including the number, or
from the linenumber to and including the last line of code (note the last
two examples).
2) Make changes as desired.
3) Tap the F8 function key.
Editing may also be done within a .DO file. During the creation of a program
you may want to be more fluid with your coding thoughts, rather then starting
in the line mode. Open a .DO file and rough out a program design, then enter
some line numbers. Once it's ready for testing go through the following
sequence.
LOADING A .DO FILE INTO BASIC
1) Go into BASIC.
2) Enter LOAD"filename.do" and hit ENTER. Filename means the name of the .DO
file holding your BASIC code. You could actually leave out the .do in the
above example but it's best to make these instructions formal.
3) Wait for the wait indicator to stop and the OK to return.
SAVING PROGRAMS
After you create a program in BASIC, it stays in the BASIC interpreter until
it's either dumped with the command NEW or saved to a separate RAM file.
Saving is as easy as: SAVE"filename". Filenames are alpha/numeric, max 6
characters. The .BA extension may be left off. It is automatically created
by the BASIC interpreter. You may save a program to an ASCII file with the
command: SAVE"filename.DO" The .DO takes precedents over the automatic .BA
extension. Thus, a .DO file is created, instead of the tokenized .BA file.
<EOF>