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.8

Jump to download section


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?

 

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.

Downloads
The ZIP archive contains:
  • IDE, Examples
  • Documentation
Download R-BASIC
Version 0.9.8
(5,5 MB)
August 2017

 
Perhaps required:
System Library Upgrade:
Sound & Wav Libraries
Version 4.1 (8 kB)
 

 

Download additional libraries


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, Dokumentation, Beispiele
    You should download this ZIP archive to install the newest version of R-BASIC. It contains the following 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

    • Documentation
      This package contains the R-BASIC manual and other documents.
      • 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. The Programming Manuals has been finished.
      • 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. The Special Topics manual has been finished.
      • 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.
    • 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.
  2. Additional libraries
    These 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. Sound Libraries
    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
  • Playing WAV files and FM sounds.
  • New object classes: Canvas, Image
New examples (click here for a list of all examples):
  • Sound\WAV Demo
  • Sound\Instrument Demo
  • Sound\Morse Demo
  • Sound\Key Click Demo
  • Sound\Sound Demo
  • Sound\FM Music Demo
  • Objects\Graphics\Canvas Normal Demo
  • Objects\Graphics\Canvas Clipping Demo
  • Objects\Graphics\Canvas Buffered Demo
  • Objects\Graphics\Canvas Mouse Demo
  • Objects\Graphics\Image Object Demo
New manual chapters:
  • New: User Manual, Chapter 1: Introduction to R-BASIC
    What is R-BASIC? / Where to Start / Important Paths and Folders
  • New: User Manual, Chapter 2: The R-BASIC IDE
    The Strcuture od the IDE / The Menus
  • Expanded: Programming Manual, Chapter 2.10: Sound
  • Updated: Programming Manual, Chapter 2.8.5: Working With Graphic Strings
  • New: Appendix, Chapter G: Constants for Music and Sound
  • New: Special Topics, Chapter 19: Customize Objects
  • Objects Manual Vol. 8 has been renamed to Vol. 9. A new Vol. 8 has been inserted.
  • New: Objects Manual, Chapter 4.16: Canvas
  • New: Objects Manual, Chapter 4.17: Image

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

More Tool Images

January 2015

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.
R-BASIC Translator

Version 1.1
August 2015
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

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.

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.

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:
  • 24 new Music and Sound Commands
    • PlayWav plays a WAV file in foreground, PlayWavBG, StopWavBG and GetWavBGCount plays and manages playing multiple WAV files in background. GetWavInfo, ConvertWav deals with WAV files.
    • GetAudioConfig and DoAudioConfig deals with the RABE-Soft audio library.
    • PlayNote plays a singe note. AllocNoteHan, PlayNoteHan, StopNoteHan, FreeNoteHan deals with and manages playing a single note, referred by a handle.
    • PlayMusic plays FM music. PlayMusicBG, StopMusicBG and GetMusicBGCount plays and manages FM music in background. AllocMusicHan, PlayMusicHan, GetMusicTime, StopMusicHan, FreeMusicHan deals with and manages playing FM music, referred by a handle.
    • The commands Sound and KCSound play sound effects.
  • The instance variables/ActionHandlers privData, CustomHandler, CustomApply and CustomAction allow all objects to store and manage individual data.
  • The new object class Canvas can draw graphics in a simple way without the overhead of a BitmapContent object and its View object.
  • The new object class Image displays still pictures and animations from a file (JPG, PCX, BMP, GIF, FLI, FLC and much more) or from other sources.
  • The new command ReadGStringFormFile allows read access to GEOS background files.
Updates and bugfixes:
  • The command DrawImage now also works with GEOS background files.
  • The Pause command now works with decimal numbers too.
  • For the parameter "mode" of the routines FileReadLine$, FileWriteLine, FileInsertLine and FileReplaceLine are numeric constants available now.
  • The content of the wizzard's help text may be selected and pasted to the code windows by drag and drop.

 


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

Comments? Questions? Please contact: Rainer Bettsteller