R-BASIC - The Simplest Way to Program for PC/GEOS
Download R-BASIC Files


 

IDE Download
Additional Libraries
List of all Examples
List of all Available Objects
Tutorials, Additional
Information & Files
More Examples
Description
Current Version
Version-History

 

Deutsch  Hier finden Sie eine deutsche Version dieser Seite.
 

 

R-BASIC Version 0.9.9.C - November 2019

Jump to download section

R-BASIC Concepts: Overview


R-BASIC is a new programming language for PC/GEOS. It is easy to learn and easy to use, even for beginners. On the other hand, it is powerful enough for enhanced projects. R-BASIC requires a PC/GEOS version of GeoWorks 2.01 (or later). Recommended is one of the actual BreadBox Ensemble versions.

Why a BASIC?

  1. Simple synatx. R-BASIC combines the easy to learn BASIC syntax with a powefull command set to allow you to build professional projects.
  2. Compatibilty. There are lot of "old", but interesting programs, which are waiting to be ported to R-BASIC.
  3. You may refrer to almost every BASIC textbook to learn the basics about how to program with (R-)BASIC. Details may differ, but the concepts how to program are the same.

Is R-BASIC object oriented?

Yes, it is. You have access to the powerful PC/GEOS object system. See here for available object classes.
On the other hand, R-BASIC provides a "classic" mode which emulates an old-style home computer. This makes porting old programs easier and may be a good starting point for beginners.

How does R-BASIC work?

After writing your code, you have to "compile" the code. This step checks the syntax an creates a sequence of tokens, which can be "interpreted" by the executer. This is the same procedure as used by, for example, the java programming language. When compiling was ok, you may run the program or create an R-App. R-Apps are stand-alone programs which consists of the compiled code and a laucher which calls the executer. From users point of view, R-Apps look like "normal" programs, written with the PC/GEOS SDK.

How can I get help?

R-BASIC Concepts: Overview

 


Notes about the current version:
All implemented functions are tested carefully. If you find any problems, like crashes, unexpected behavior and cryptic error messages, let me know, please. Help to make that program better and more stable. All BASIC programs, written with this version will be run in the next versions too. In the rare case, that you find any problem with that, I will support you, if you want.

Bugfix for all R-BASIC programs
Version November 2019, 119 kB
If you are not an R-BASIC programmer but have R-BASIC programs (R-Apps) installed, especially before November 2019, it is strongly recommended to download and install this fix. The file fixes a problem with the output of numbers. In rare cases the displayed value was incorrect.

Important information: After you have installed the fix once, you can safely install more R-BASIC programs, even earlier versions without this fix. The Uni-Installer performs version control and never overwrites newer versions with older ones.

If you are unsure whether you need this fix, please download it. Version control ensures that you do not overwrite a newer version.

For R-BASIC programmers, the fix is included in the newest R-BASIC version.

Changes and news on this page. Added in version 0.9.9.A (March 2019) This table lists downloads from this page, that has been added or changed with this Version of R-BASIC. You should donwload it all to stay up to date.

The package already contains the number output bugfix. You should update all installer packages of programs that use number output for numbers less than 1!


 

Download R-BASIC
Version 0.9.9.C
November 2019

   
 •R-BASIC IDE (1,3 MB)
 •Examples (2,8 MB)

   
 •Documentation (2,3 MB)

   
 •Images (17 kB)
unchanged since version 0.9.9 (09/2018)  


Recommended packages  
Perhaps required:
 

 


Objects


Description of all available object classes


Screenshots: More Topics:
The newest version of the R-BASIC program. For full installation, you have to download the following packages:
  1. IDE, Documentation, Examples, Images
    You should download all of these ZIP archives to install the newest version of R-BASIC. It contains the following four installer packages:
    • IDE
      This package contains the integrated BASIC development environment (IDE). That includes the editor, compiler, tools to create R-App's, help files, some tools and other essential files.
      Included tools, accessible from R-BASIC menu "Extras"-"Tools"

      Wizzard Editor

      Block Graphic Editor

      Font Explorer

      Basic Salvager
        View Screenshots

      Get More Tools

    • Examples
      There are a lot of examples that deals with the BASIC commands, the objects and special topics like working with files or block graphics. Click here for a list of all examples.
    • Documentation
      This package contains the R-BASIC manual and other documents. Small editorial changes may occur.
      • User Manual: Description of the R-BASIC IDE and other topics which are not part ot the R-BASIC language itself.
      • Progamming Manual: The BASIC Language.
      • Objects Manual: A complete description of the BASIC objects, its properties and abilities.
        The Objects Manual will be expanded when new object classes are implemented.
      • Special Topics: Additional themes such as fonts, files and block graphics.
      • R-BASIC Appendix: Addtional information, tables, error codes and much more.
      • Quick Reference Objects: List of all object classes, its instance variables, methods and the associated constants.
      • Object- and Command Overview (see also here)
      Special note: If you have installed older versions of R-BASIC you may have still some "German..." files stored in your R-BASIC\Documents folder. This files may be deleted savely. All information stored in these files are translated to English and included in the English manual.
    • Images
      R-BASIC comes with a selection of images for the tool bars, the document interface and so on. This package was released with R-BASIC 0.9.9. Its content is unchanged since version R-BASIC 0.9.1, because earlier it was a part of the IDE package.

  2. Recommended packages
    This are some important additional files, often required for programming with R-BASIC.
    The other libraries are used in special situations. You may download it only if a new version of an existing library is available or if a new library is available. Currently the following libraries are available:
    • DocumentTools - Version 1.0 - Released with R-BASIC 0.9.2
    • VMFiles - Version 1.01 - Released with R-BASIC 0.9.2
    Programmers which have the PC/GEOS-SDK may download the SDK-Library-Kit. This kit allows you to expand R-BASIC by writing functions which are not planed by the original R-BASIC concept. You may find here all needed files and desciptions.

  3. Perhaps required
    If you have an older GEOS system (earlier than version 4.1) perhaps you need newer sound libraries (sound.geo and wav.geo) to make the R-BASIC sound commands work better. They will work with older libraries too, but the newer libraries will be better. Unfortunately both libraries are in use in the standard system configuration and therefore they cannot be replaced by the UniInstaller application automatically.
    Please check these libraries in your SYSTEM folder and replace it manually if they have a version number lower than 4.1. The archive contains both libraries in version 4.1. Don't forget to make a backup copy of your original libraries first.

Important news in the current version
  • Version 0.9.9.C (November 2019)
    • Expanded search tool. Search in files implemented.
    • Big bug in number output eliminated
    • New commands: KCClear and IgnoreWarning
  • Version 0.9.9.A (March 2019)
    • There are two new object classes ViewControland GenContent
    • The View class has been expanded extensive and is finished now. This includes for example extendend UI configuration options and setting different mouse pointer images.
    • The tool program "Mouse Pointer Creator" simpilifies bulding your own mouse pointer image.
    • The ESC key closes some dialogs, in particular the Wizzard dialog box.
    • The function Convert$ may now read and create HTML and UTF-8 coded strings.
New examples (click here for a list of all examples):
  • Version 0.9.9.C (November 2019)
    • Math\NumberFormat Settings
  • Version 0.9.9.A (March 2019)
    • Objects\View-Content\ViewControl Demo
    • Objects\View-Content\Mouse Pointer and Freehand Line
    • Objects\View-Content\Scale To Fit in both dimensions
    • Objects\View-Content\Linked Views
    • Objects\View-Content\Dragging Demo
    • Objects\View-Content\GenContent Demo
    • Objects\View-Content\GenContent Demo 2
New manual chapters:
  • Version 0.9.9.C (November 2019)
    • Updated: User Manual, Chapter 5.1: Command IgnoreWarning
    • Rewritten: Special Topics, Chapter 1: Number Formatting
    • Updated: Special Topics, Chapter 18.3: Command KCClear
  • Version 0.9.9.A (March 2019)
    • Updated: User Manual, Chapter 5.1: WaitForHandles description updated
    • Expanded: Programming Manual, Chapter 2.4.3: Convert$ functionality has been expanded
      Therefore, the page numbers of all following chapters of the Programming Manual (Volumes 2 to 5) has been changed.
    • Updated: Objects Manual, Chapter 4.1.3.1: Starting a Program
    • Intensive expanded: Objects Manual, Chapter 4.9.4: View
    • New: Objects Manual, Chapter 4.9.5: GenContent
    • New: Objects Manual, Chapter 4.9.6: ViewControl
    • Updated: Special Topics, Chapter 15: How to Implement a Document Interface
      Two new routines has been added. Therefore chapters 15.1, 15.3 and 15.9 has been changed.

Incompatible Changes: None

More detailed description of the current version ...

For installation, you need the newest version of the Universal-Installer, available here.

 

   Download Libraries

These libraries are used in special situations. They will not be updated with every R-BASIC version.

DocumentTools Libray
Version 1.0
(71 kB)

July 2015
Released with R-BASIC 0.9.2
The DocumentTools library provides a lot of functions to help you working with documents. One example are the typically dialog boxes to open a file or to save it with a new name. The routines of the DocumentTools library works closely together with the DocumentGuardian object. Using the routines from the DocumentTools library makes it very easy to implement a document interface, which provides the common functionality. This is explained in detail in the "Special Topics" manual, volume 3, chapter 15.
The whole document interface code can be included into your program from a R-BASIC menu ("Extras", "Code Sequences", "Document Interface"). In this case, the DocumentTools library is required because it is used by the code, inserted from this menu.
VMFiles Libray
Version 1.0.1
(109 kB)

July 2015
Released with R-BASIC 0.9.2
The VMFiles library allows R-BASIC the access to the powerful GEOS VM files. The documents of all "big" GEOS applications, like GeoDraw, GeoWrite, and R-BASIC itself are VM files.
VM files are versatile and simple to use. An example - you want to develop your own movie database program. In this case you should use VM files. You don't need to know how many movies finally will be stored in the database before you start developing. A single command allows you to add or remove a movie title. If you like to add a movie cover image to your database, you can do this with some few commands. VM files are designed to store images, too.
The VMFiles library is required for working with VM files.

SDK Library Kit (28 kB)

Version 1.0.1
August 2017
Released with R-BASIC 0.9.8
This package conatins all necessary files and information to write libraries for R-BASIC with the PC/GEOS SDK. This allows you to add features to R-BASIC, which are usually not supported. For example, the VMFiles library and DocumentTools library are written with this kit.
This kit is complete in English. It contains detailed descriptions and examples for typical situations.
Version 1.0.1 adds a few handle and "register" types aboud sound issues to the sdklib.goh file. You may update your version 1.0 to 1.0.1 only if you wish to deal with R-BASIC sounds in your library.

 

   Tutorials, Additional Information and Files

16 color icon from JPG file
Tutorial (18 kB)

Version 1, November 2019

This short tutorial describes how to create a relatively high-quality 16-color icon when you have a JPG image as source.
Download
Mouse Pointer Creator

Screenshot

Sourcecode

This program helps you to create mouse pointer images for use with the R-BASIC command View.ReadPointerImage. Additonally, the image can be written as GOC code.
To access the program from R-BASIC Tools menu you have to place a copy of the program in the folder USERDATA\R-BASIC\Tools

This program is written in R-BASIC and will run whithout the R-BASIC IDE installed.

More Tool Images
Version 2

March 2019

This package contains a lot of small images known form toolbar objects. You may use these images to build your own tool buttons. There are images for bitmaps, colors, object tools (for example rectangle or line), text tools (for example bold text, underlined text) and a lot of other tools. As an addition, there are the images for a complete card deck included.
Files will be installed to USERDATA\R-BASIC\IMAGES and are ready for use with the CaptionImage command, the Picture-List and other related commands.
Version 2 contains additional images for tool buttons and has been released with R-BASIC 0.9.9.A.
R-BASIC Translator

Version 1.1
August 2015

Screenshot

Translation tool to translate R-BASIC Apps and libraries from or to a foreign language. The link points to the download page, which has more important information.
Creating Icons

IconMake 1.1 (31 kB)
(DOS Program)

Icon Edit 3.1 (31,4 kB)

Token PCX Tool (8,9 kB)

March 2013

ICONMAKE is a DOS program by Marcus Groeber, that converts PCX or ICO file to "Token-Dummies". That are mini GEOS programs that install its token to the token database file.

The Icon Editor is a GEOS appliaction that allows to draw icons for GEOS. It's a little painting program that supports read and write tokens from and to the token database. It also supports writing the tokens as source code for the SDK and much more.
The current version 3.1 can draw 256 color icons, but the import from and export to token database is still broken. Writing source code is fixed already.

Token PCX Tool is a small tool from SDK that can read 8 bit per pixel PCX files and create an icon in the token database file from that pcx file. The pcx file must have the icon images at mandatory positions. Details are explained in the readme.txt file. A demo pcx file is also included.

More Tools (15.6 kB)

Nov. 2010
More Tools for R-BASIC. Accessible from R-BASIC under "Extras"-"Tools"
- BuilderBase (from BreadBox)
- HDBConv (Hex-Dec-Bin-Converter, John Howard)

More Examples

Brick Puzzle Source (250 kB)

Version 2.0
März 2019

Screenshot (program)

Source code and icon editor file of the game "Brick Puzzle".
The code shows, among other things, how to use the mouse, especially for dragging of objects (outlines) across the screen, how to write text to a graphic without flickering and how to play background music. The score will be automatically saved to a file and loaded again when restarting. Special emphasis was placed on the documentation and struturierung of the code, so that not only advanced users can profit from it.

Level: Beginner with experience

You may download the compiled program (R-App) here.

Beetle Catch Source (101 kB)

Version 2.0
March 2019

Screenshot (program)

Source code and icon editor file of the game "Beetle Catch".
In the original, the game is a KC-85 program. In the archive there is the unported original code as well as two versions of the R-BASIC program. The first version shows how you can port a classic BASIC program (no matter which source system) to R-BASIC. In the second version the classic BASIC relics such as line numbers and GOSUB commands are removed and replaced by subroutines and functions. This code is much clearer.

Level: Beginner with experience

You may download the compiled program (R-App) here.

Orbit Source (104 kB)

Version 2.0
March 2019

Screenshot (program)

Source code and icon editor file of the game "Orbit".
In the original, the game is a KC-85 program. The code shows how to port a classic BASIC program (no matter which system) to R-BASIC. Included in the archive is the original, unported code.

Level: beginner with experience

You may download the compiled program (R-App) here .

Mouse Pointer Creator Source (81 kB)

Version 1.0
November 2018

Screenshot (program)

Source code and Iconeditor file for the tool "Mouse Pointer Creator". This example shows how to edit a graphic with the mouse, uses its own mouse pointer image and can save the pointer image in a data file.

There are tow parts: the program code itself and the code for the document interface. It is possible to understand and use the program code istself without dealing with the document interface code.

Level:
Part 1: Edit and export mouse pointer images: Advanced
Part 2: Document interface: Expert

The compiled program (R-App) may be downloaded here.

FileLister Source (31 kB)

Version 1.0
August 2014
Sourcecode and icon editor file of the FileLister Application. This example shows how to scan a file tree by having a routine to call itself (recoursive programming), how to write text to a file and how to create a HTML file.
Level: Advanced
The compiled program (R-App) may be found here.
2048 Game Sourcecode (82,7 kB)

Version 1.0
August 2014
Source code of the cultic 2048 game. It shows some basic techniques like working whith structures, OnStartup- and OnExit handlers as well as saving data in a file.
The compiled program (R-App) may be found here.
Level: Advanced
Cool Code (14,9 kB)
März 2013
A very simple example. Uses the block graphic mode to create an random labyrinth.
Requires R-BASIC 0.8.7 or higher, because the block font file (ALIEN.RBF) must contain the characters, used in this example.
Level: Beginner
Rätsel by Jörg Polzfuß (30,3 kB)
March 2012
A little numer puzzle, written by Jörg Polzfuß on the meeting in Syhra, Gemany in 2011. This very simple example is a good starting point for experiments with the UI and the geometry manager.
Level: Beginner
Release Saver Example (59,6 kB)
March 2012
This complex example demonstrates how to use a lot of file commands. This includes searching for files and error handling in different situations. Core point is the copy of files and whole folders, including its sub folders. I use this program so save different stages of R-BASIC developement.
Level: Professional

 

Available Object Classes

Application


The Application object is invisible.

This object connects your program to the GEOS system. It is the top parent for all other generic objects in your program. Every BASIC program must have exactly one Application object. Usually, the direct child of the Application is a Primary object.
Primary

Objects of class Primary are the main windows of your program. They have a system menu in the left upper corner, a minimize button a maximize button and a help button in the right upper corner. Usually, R-BASIC programs have exactly one Primary object.
Button

  

A button is an active area that can be activated by mouse or by keyboard. Buttons are used for menu items or as single objects.
Group

Groups are designed to organize its children in the way that you as programmer wish. The application on the left consists of a group (red, above) and a reply bar (which really is a group too) below. The red framed group contains a text object on the left side and a (blue framed) group that contains some action buttons.
Menu

Menus are the common way for the user to access different parts of the program functionality. Menu items are the children of a menu object. Very often, these are buttons. You may create nested menus by having a menu object to be a child of another menu object, as shown in the image on the left side. You may also use dialogs to be a menu's child. The system will create a button as menu item for you, that open the dialog. Any other objects, for example groups or list objects, are allowed for menu items, too.
Dialog

Dialogs are independently-displayable interface elements used to display information or other UI objects. They are used for different purposes. Therefore, a Dialog object has a lot of features that makes dialog easy to use. On the other hand, dialogs may be configured to do advanced things.
Number

Objects of Number class allow to display or to enter a number. They are simple to use and very versatile. For example, you may configure the numer of decimal places as well as the minimum and the maximum value to display. Number objects may be configured to appear as sliders.

     
OptionGroup

The OptionGroup manages a list of Option objects. Every Option object may have the state "on" or "off".
RadioButtonGroup

The RadioButtonGroup manages a list of RadioButton objects that may be selected individually or in groups. The RadioButtonGroup is a very versatile object. It is often used when the number of list items is known and does not change while the program is running.
DynamicList

The DynamicList is a subclass of the RadioButtonGroup and therefore it inherits all its capabilities. A DynamicList is often used when the number of list items is initially unknown or may change while the program is running.
View
with a
BitmapContent

The View object class provides a "window" to graphic data (this includes text) you wish to display. The data to be drawn are provided by the views "content" object. This content object just has to know how to draw the data, that's all. The view, on the other side, handles scrolling (if necessary), scaling and clipping. It requests its content do draw itself, but the view decides which part of that drawing will appear on the screen. This is a very powerful concept.
Objects of class BitmapContent are "content" objects of a View object. They manage an editable bitmap. The object automatically creates its bitmap. You may write (draw) text or graphics to the bitmap of the BitmapContent object.

BitmapContent Objects may react on keyboard and mouse events by calling the aproriate handlers. It also may work with the Clipboard.

GenContent

Objects of GenContent class are used to show generic class objects like buttons in a scrollable View. For example the "Preferences" application uses this mechanism.

GenContent objects may have any kind of generic class objects as its children. In the image on the left side this are three Buttons, a RadioButtonGroup and a Canvas object.

ViewControl

The ViewControl object class provides the UI for the "View" menu. This UI basically controls the scale factor and some other features of controlled View objects.
When the View is configured to work with a ViewControl object all interaction between View and ViewControl takes place automatically.
Canvas

Canvas objects display a graphic by calling its OnDraw handler. They also may work in a very fast mode, called bufferd mode. Canvas objects may react on mouse events. You have to write mouse handlers for this purpose. Additionally, Canvas objects may work with the clipboard.
Image

An Image object displays a graphic which is stored in a graphics file or in the PictureList. You have nothing to do but to specify the graphic to display. The object may also play animations from a file. You may specify if the animation will run automatically or on request.

Supported graphic formats:
  • Graphic files: JPG, BMP, ICO, PCX, GIF, TGA, RLE, DIB, SCR (BreadBox SplashScreen)
  • VM files: GEOS Background files, Resource-Maker files (Bitmaps and GStrings)
  • Animations: GIF, FLC, FLI, BreadBox QuickCam Format
Memo

InputLine

The R-BASIC text objects allow simple text input, without requiring extensive support in your application. Text objects handle keyboard and mouse events automatically and will create scroll bars if they are needed. They know if the text is modified by the user and may send out messages for different events.

All Text objects can work with the clipboard.

In R-BASIC there are two text object classes available. The class Memo provides a simple text editor object. It allows word wrapping and multiple paragraphs, created when the user hits the enter key. On the other hand, the second class InputLine class is designed to accept the input of single line texts, like file names.

FileSelector

A file selector provides a user interface, which is recommended to select a file or a directory. The file selector sends a notification message as soon as a user clicks to an entry, so the programmer can manage the further steps. In the most cases the selected file will just be opened. The navigation to drives and sub directories handles the FileSelector by itself.

Which file will be shown in the list can be controlled for example by the file token or by a file mask.

ColorSelector

A ColorSelector provides the UI needed to select a color, a shaded value or a fill pattern.

The programmer can select which of these features are displayed to the user. By default, only the index colors are available, as shown in the picture on the left.

Display and DisplayGroup

Object of the class Display are the "windows" in which all big applications like GeoWrite or R-BASIC display its data. For this reason, Display objects contain other UI objects to display the content. In the image to the left this is a Memo object. Display objects have to be children of a DisplayGroup object.

A DisplayGroup provides the visible area for the Display objects. The image on the lefts side contains three Display in a DisplayGroup.
DisplayControl

The DisplayControl provides the UI to allow the user to interact with the DisplayGroup object. It also contains al list of all available Displays. As shown in the image on the left, a DisplayControl is usually a child of the "Window" menu.
DocumentGuardian


The DocumentGuardian object is invisible.

A lot of programs work with documents. Objects of class DocumentGuardian help the programmer to manage documents. They store important common information about a document such as the file name, the path, the file type, the token and the FILE handle of the open document file.

DocumentGuardian objects works closely together with the library "DocumentTools". For example, this library provides some dialog boxes such as "Open" and "Save as".

DocumentGuardian objects can also work with the "VMFiles" library. This library allows access to the powerfull "virtual memory" (VM) files, which are used as documents by all big GEOS applications.

PrintControl


Th PrintControl object itself is invisible. It provides the "Print" dialog box.

PrintControl: the "Print" dilaog box

If you wish to print from a R-BASIC program, you have to include a PrintControl object. The PrintControl object provides the "Print" dialog box and manages all tasks, required for printing.
PageSizeControl

When the user should be allowed to select or change the size of a document, you should include a PageSizeControl object. This object provides all UI, required to select or change the page size, the paper format or the margins.

 

News in the current version

Important News:
  • Version 0.9.9.C (November 2019)
    • Expanded search tool. Search in files implemented.
    • Big bug in number output eliminated.
    • New commands: KCClear and IgnoreWarning
    • Bugfix in KCSound command (crash at zero volume).
    • Click on the search text in the "Search result" dialog opens the "Search and replace"
    • dialog.
    • The debugger window is implemented as a Primry object. The R-BASIC IDE and the debugger window can now be minimized independently from each other.
    • Miscellaneous other minor improvements.
  • Version 0.9.9.A (March 2019)
    • There are two new object classes ViewControl and GenContent. The ViewControl provides the control UI for the view menu. The GenContent allows generic class objects to be displayed inside of a scalable and scrollable View.
    • The View class has been expanded extensive and is finished now. This includes for example
      • Extendend UI configuration
      • Support for drag scrolling (that is that the view scrolls when the mouse is dragged outside of the views bounds).
      • Scrolling and scaling by program commands
      • Setting different mouse pointer images
    • The tool program "Mouse Pointer Creator" simpilifies bulding your own mouse pointer image.
    • There is a new system structure type RectDWord which contains the coordinates of a rectangle.
    • IDE: Some dialogs (for examle the wizzards or the "Manuals" dialog) may now be closed by pressing the ESC key.
    • A little bug in the document interface code has been fixed. There are two new routines that save and restore global variables when GEOS shuts down and restarts again. See Special Topics Manual, chapter 15, for details.
    • Some other bugs related to system restart has been fixed.
    • "More Tool Images" package: Image for Redraw tool button added.
    • The function Convert$ may now read and create HTML and UTF-8 coded strings. A lot of new constants and a new system variable convertError has been added for this purpose.

 


R-BASIC Overview

Click on the images for full size view. This Overviews comes from the R-BASIC\Documents folder (GeoDraw file).

&Overview R-BASIC commands

&Overview R-BASIC Objects


 

  Back to top of page


r*bettsteller#web*de ---- If you are not a robot replace * by . (dot) and # by @
Wenn Sie kein Roboter sind ersetzen Sie * durch . (Punkt) und # durch @ (Klammeraffe)
Datenschutzerklärung | Haftungsausschluss | Impressum | Privacy Policy (English) | Disclaimer (English)