Object RSL

From Bauman National Library
This page was last modified on 8 June 2016, at 18:48.

multi-paradigm: object oriented, problem-oriented procedural,

Designed by Sergey Kubrin
Typing discipline dynamic
Website http://www.softlab.ru/
Major implementations
RS-Bank, InterBank, RS-Securities, RS-Payments

RSL or Object RSL (R-Style Language) - problem-oriented, interpreted, proprietary programming language, developed by R-Style Softlab for use in their software products. RSL is macrolanguage. It is free distributed and available for download to everyone.


RSL Language was established in 1994. The first additions was appeared only in 1997, and it has added the ability to connect the C ++ modules and RSL language became the object-oriented. In 1998 was added a few standard classes in the language. In 2003 support for .NET Framework module has been added.

RSL shell

RSL Shell - development environment, which includes:

  1. Text editor.
  2. Debugger.
  3. Interpreter / precompiler.
  4. Editor of console dialogs.
  5. Editor of Pervasive PSQL database structures.
  6. Editor of Visual RSL graphical reports.
  7. SDK is used to create plug-in modules using C DLM SDK language.

Code example

Sample of program of processing messages into the dialog box:

macro EvenMacro(dlg, cmd, id, key)
/* Set the focus of the input on field Dat */
 if (cmd == DLG_INIT)
 SetFocus (dlg, “Dat”)
 return CM_IGNORE; 
/* if button F3 was pressed  */
 elif (cmd == DLG_KEY)
 if (key == 317)
 dlg.Int = 500;
 dlg.Lab = “NewLabel”;
 dlg.Str =
 “It is new line”;
 UpdateFields (dlg);
/*if button Enter was pressed */
 elif ( (key == 13) and
 (id == 6 ) )
 SetFocus (dlg, 0);
 return CM_IGNORE;
/* if button Button was pressed */
 elif (cmd == DLG_BUTTON)
 /* Exit to save */
 if (trim (fldname (dlg, id)) == “~O~k”)
 return CM_SAVE;
 /*Quit without saving */
 elif (trim (fldname (dlg, id)) == “~C~ancel”)
 return CM_CANCEL;
/* Verify data entry */
 if (cmd == DLG_REMFOCUS)
 if ( (id == 1) and (dlg.Int < 100) )
 MsgBox (“The value must be greater than 100”);
 return CM_CANCEL;
 elif (cmd == DLG_SETFOCUS)
 message (“Focus installed”);
 elif (cmd == DLG_SAVE)
 if (dlg.Int < 100)
 SetFocus (dlg, 1);
 MsgBox (“Value
  must be |>100”));
 return CM_CANCEL;
 elif (cmd == DLG_DESTROY)
 message (“Dialog is destroyed”);
 return CM_DEFAULT;

Data types

Scalar types

Type Name Declaration keyword Type Code Accepted values
Integer Integer Vs INTEGER -2147483648 To 2147483647
Float Double V_DOUBLE 15 significant decimal digits
Float long DoubleL V_DOUBLEL 15 significant decimal digits (analogue Double)
A string of characters String V_STRING
Logical value Bool V_BOOL True, False
Date Date V_DATE
Time Time V_TIME
Date and time DateTime V_DTTM
Memory Address MemAddr V_MEMADDR
Link to RSL procedure ProcRef V_PROC
Link to method of RSL object MethodRef V_R2M
BCD number with 4 characters after the point Decimal V_DECIMAL 28 significant digits (analogue Numeric)
BCD float. It is used for real values ​​(sums of money, exchange rates, interest rates and so forth.) Numeric V_NUMERIC 28 significant digits
Type of monetary values Money V_MONEY 28 significant digits (analogue Numeric)
Long type of monetary values MoneyL V_MONEYL 28 significant digits (analogue Numeric)
The special value "zero value", or the "default value" SpecVal No special constants. Type code 26 OptVal or NullVal
The special value "Empty" ----- V_UNDEF Null


  1. Lexemes of DoubleL type is synonymous with Double type;
  2. Lexemes of MoneyL is synonymous with Money;
  3. Lexemes of Decimal is synonymous with Numeric;

For the internal representation of variables such as the Money type is used Numeric type. These types used in earlier versions of an RSL, were left only for the compatibility of the source code on the RSL.

Object types

Object data types are divided on specialized objects and generalized objects (GenObject). Generalized objects are created either directly by calling RSL-class constructor, or by using a standard procedure GenObject, receiving name of RSL-class as a string parameter. Constructor and procedure GenObect returns a reference to the created object . Currently, specialized objects are outdated. Into new code, it is recommended to use a generalized objects implemented to replace the specialized objects.

Type Name Declaration keyword Type Code Type of similar generic object
Link to a specialized object "database file" BtFileRef V_FILE TBfile
Link to a specialized object "structure in memory" StrucRef V_STRUC TRecHandler
Link to a specialized object "array of values" arrayRef V_ARRAY TArray
Link to specialized object "text file" TxtFileRef V_TXTFILE No
Link to a specialized object "dBase File" DbfFileRef V_DBFFILE No
Link to the generic object of RSL class Object for any object type, or < name RSL class> V_GENOBJ