REALbasic was created by Andrew Barry. It was originally called CrossBasic due to its ability to compile the same programming code for Mac OS and Java (although the integrated development environment was Mac only). In 1997 CrossBasic was purchased by FYI Software which renamed it REALbasic as well as renaming the company REAL Software. At this time they dropped the Java target, later replacing it with a Windows target and database support. The IDE is now available for Microsoft Windows, Mac OS X, and 32-bit x86 Linux and can compile applications for Windows (Windows 2000 and higher), Mac OS X (PowerPC, Intel, and Universal Binary) and 32-bit x86 Linux.
Language features
Although REALbasic (RB) uses the word "basic" in its description as a variant of the BASIC programming language, RB is not compliant with the ANSI Standard for the BASIC programming language. For example, the ANSI Standard source code of simple demo programs in TrueBASIC will not compile in RB without complete rewrite. RB also does not support the standard matrix math operations "MAT" that make ANSI BASIC a helpful tool for the teaching of introductory programming concepts.
The framework functionality can also be extended by creating plugins using the provided by REAL Software. Plugins are created using C/C++ with a variety of supported compilers, including Xcode, Microsoft Visual Studio and gcc. Plugins can support any platform REALbasic supports, but are not required to support all platforms.
File format
The source file format contains window and control placement data and is proprietary, although XML import and export are supported. All source code can be contained in one project file, but it is also possible to have classes/modules in separate files in the same way as most other languages or dialects can. REALbasic compiles directly to machine language for each platform that it supports. REALbasic 2006 Release 3 and newer also supports a human-readable version control format which allows easy collaboration with tools such as Subversion or CVS.
Current editions of IDE
A typical GUI building session in REALbasic's IDE
There are three versions of the IDE:
REAL Studio has all features of the Professional edition plus other features for full-time programmers.
The professional edition can compile programs for Mac OS X (PowerPC Carbon Mach-O, i386 Carbon Mach-O and Universal Binary), Linux and Windows from the same source code file; it can also access databases (REAL Server,MySQL,Oracle, PostgreSQL, ODBC, etc.) including the built-in single-user REAL SQL Database engine based on SQLite; it compiles console applications, has a code profiler, can remote debug and has numerous other features.
The personal edition only compiles programs for the platform that the IDE is running on (either Windows, Linux or Mac), and does not allow access to databases other than the built-in REAL SQL Database.
IDE features
Both versions of the IDE permit building the application's graphical user interface by dragging the controls from a toolbar to their parent window. Layout of the controls is helped by the IDE, which permits aligning them (both horizontally and vertically) and which gives information about the distance between controls or between a control and the window borders.
The IDE gives the programmer access to scripting features via RBScript, which allows control of the IDE for automating tasks such as running regression tests or doing nightly builds. The scripts can be either global or project-specific.
REALbasic supports incremental compilation, whereby the compiler needs to recompile only those parts of a project which have been modified. For instance, if only the body of a method is modified, then only the project item containing that method need be recompiled.
Example code
This is an example of operator overloading for a hypothetical Complex class which permits to sum a real to a complex number, and to sum two complex numbers: Function Operator_Add (rhs As Single) As Complex Dim ret As New Complex ret.Real = Self.Real + rhs ret.Imaginary = Self.Imaginary Return ret End Function
Function Operator_Add (rhs As Complex) As Complex Dim ret As New Complex ret.Real = Self.Real + rhs.Real ret.Imaginary = Self.Imaginary + rhs.Imaginary Return ret End Function
The same function can be defined to accept Doubledatatype values. This code shows how to use the Complex class to sum a real with a complex number: Dim First As New Complex (0, 1) Dim Second As New Complex (1, 1) Dim Sum As Complex Sum = First + 5.0 + Second // Sum will be (6, 2)