RBScript
This template must be substituted.
REALbasic icon | |
Developer(s) | REAL Software, Inc. |
---|---|
Operating system | Mac OS X, Microsoft Windows, Linux |
Type | Scripting languages |
License | Proprietary |
Website | REAL Software, Inc |
RBScript is a scripting language similar to REALbasic, which shares some basic features, like to be object oriented, support modules and almost the same datatypes (apart the ones introduced with the last REALbasic version, used mainly for compatibility with some C API). It's a reduced version of REALbasic, which implements just the basic string and number functions, mainly used to script the applications written with REALbasic, and lately used also in the REALbasic IDE (officially from the 2006r1 version).
Compared to the different scripting languages that can still be used with REALbasic (thanks to the ability it offers to call C API), RBScript can be better integrated into REALbasic applications by the possibility it has to call the methods and to use the properties of the object passed to the script parser and compiler.
RBScript cannot be used outside REALbasic applications and cannot be installed separately from an application made with REALbasic.
Example Code
Here's a sample code that asks the host program a number and returns it doubled:
Dim Value As Integer Value = Val(Input("Which number?")) Print(Str(Value*2))
It's up to the host program to decide how to implement the callback methods called from Input() and Print(): RBScript just expects the first method to return a string and accept a string parameter, and the second one to accept a string parameter. Usually, the program would prompt the user presenting the string passed from the script, and returning the user input to the hosted script.