.To print correctly, you must use LW_ROMA and LW_BARROWS!!! -ALS
geoBasic Reference Guide
A scaled-down version of the
@geoBasic Programming Manual
by ALS
ming Manual
by ALS
@geoBasic
The BASIC programming language for GEOS C-64/128 users.
geoBasic software (c) 1990 Berkeley Softworks.
Portions of the geoBasic manual (c) 1990 Berkeley Softworks.
Changes and enhancements to the manual (c) 1990
Magazine.
geoBasic and GEOS are trademarks of Berkeley Softworks.
IDG Communications/Petersborough, Inc. has licensed geoBasic from Berkeley Softworks.
geoBasic runs in C-64 mode (40 cols) on the C-64/128.
This manual and software are copyrighted with all rights reserved. No part of this manual or software may be copied, reproduced or translated without the prior written consent of
or Berkeley Softworks. In other words, you have absolutely no idea where you got this! :)
* Foreword : This mini-manual assumes knowledge of GEOS and the GEOS interface. All terms used in this mini-manual can be found in the GEOS User's Guide, which accompanied your GEOS system...
@The geoBasic Editor
Text and Entry Modes
The first screen you see when you start geoBasic is the editor text screen.The flashing box is the cursor, and whatever you type is placed on the screen at the cursor's position. Once you have finished a line of BASIC text, press [RETURN] to enter it. There are two modes of text entry : overstrike and insert. When you are in insert mode, the cursor will become a solid block to indicate the change in mode. The maximum size of one line of geoBasic commands is 240 characters (6 lines) as opposed to BASIC V2.0's 80 characters (2 lines).
[HOME] : To move the cursor to the top left of the screen.
[DEL] : Erases the character preceding the cursor
[C=] + [DEL] : Erase the line the cursor is on.
[CTRL] + I : Tab
[SHIFT] + [HOME/CLR] : Clear the screen.
Mouse Click on Editor Screen : Move cursor to that position
@The geoBasic Menus
geoBasic Info : Author's name and copyright information.
close : Saves your program to disk, returning you to the initial dialog box.
update : DO NOT USE! This command corrupts your geoBasic file!!! Use
RUN to save, then hit [RUN/STOP] to return to the editor.
rename : Rename your geoBasic file
print : Print a complete listing to the printer.
quit : Saves the current file, and return to the deskTop.
list : This item lists the current program on the screen. Use F5 to
start/stop/continue scrolling. To break, press [RUN/STOP]. This has
the same effect as typing LIST in the text window.
sprcol : Allows you to choose two sprite colors for each sprite.
Options
run : Runs your program. It has the same effect as typing RUN in the edit
window.
renumber : Renumber your program.The number you enter will set the first
line number, and the increment between line numbers. Renumber
ignores line numbers following GOTO and GOSUB, so it's a good idea
to use labels for branching instead.
resize : Resize changes the heap size for your program.
make appl : The turns a geoBasic program into a stand-alone executable file.
Once created, the only way to edit it again is to use geoStripper to
recreate the geoBasic source code. NOTE : geoStripper will not create
geoBasic source code for NON-GEOBASIC applications.
Utilities
menu : activate the Menu Editor
dialog : activate the Dialog Box Editor
icon : activate the Icon List Editor
bitmap : activates the Bitmap Editor
sprite : activate the Sprite Editor
@Elements of geoBasic
Line Numbers and Labels
Each line in a geoBasic program must begin with a line number.
Ex :
10 PRINT "Hello There"
20 FOR X = 1 TO 10
25 PRINT X
30 NEXT X
Labels provide a way to give a name to a line. While it is still necessary to give a line number with a label, the line can then be referenced when using GOTO or GOSUB. Labels must be the first command of the line, immediately after the line numbe
number itself. The label must be preceded by an "@" sign, and only the first six letters are significant. Labels are case-sensitive, @START is not the same as @Start. Labels may not be declared more than once. If you use a label more than once, a LABEL REDEFINED error will occur. Always delete the first occurence of a label before changing it's location. The total number of labels cannot exceed 127.
Ex :
10 @Start:PRINT "Hello"
20 FOR X = 1 TO 10
30 PRINT SIN (X)
40 NEXT X
50 GOTO @Start
Variables
A variable name can be any length, but only the first three characters are significant.
@geoBasic Commands
Terminology
ARGUMENTS, also called parameters, can include filenames, variables, line
numbers, expressions and math operations.
SQUARE BRACKETS [ ] show arguments which are optional. You may select
any (or none) of the arguments shown.
ANGLE BRACKETS <> indicate that you MUST choose one of the arguments
shown.
A VERTICAL BAR | separates items in a list of arguments.
ELLIPSIS ... A sequence of three dots means an argument may be repeated
more than once.
QUOTATION MARKS "" surround character strings, filenames, and types of
arguments. When an argument is enclosed in quotation marks,
quotation marks must be included in the command.
PARENTHESES () When arguments are enclosed in parentheses, the
parentheses must be include
PARENTHESES () When arguments are enclosed in parentheses, the
parentheses must be included in the command.
VARIABLE refers to any variable BASIC name (Y, Z$, Q%, etc.)
EXPR refers to any valid numeric expression, such as R*(4/T), etc.
STRING refers to any string constant, variable, or expression.
Command Reference
FORMAT :
ABS (<expr>)
This function returns the absolute value of an expression.
Ex :
10 X=-2:Y=3
20 PRINT X, ABS (X), Y, ABS (Y)
would print -2, 2, 3, 3
FORMAT : <expr> AND <expr>
The AND operator has two functions. As a BOOLEAN operator, and to test
the truth of two expressions.
Ex:
10 X=9 AND 7:PRINT X
20 IF X=1 AND X<10 THEN PRINT "TRUE"
This would print 1, TRUE. In binary :
9 : 1001 AND
7 : 0111
1 : 0001
When a statement evaluates to FALSE, a 0 is assigned to the result, and if the
statement evaluates to TRUE, the value of -1 is assigned to the result. Your
program can determine the numerical value that the expression evaluates to by