LMD ScriptPack Guide


Unsupported Delphi Features


Though LMD-ScriptPack supports the rich subset of Delphi language constructs, there are still some unsupported constructs (this is to some extent stipulated by limitations of scripting languages), which are described in the table below.

 

Unsupported features

 

Untyped constants:

 

const
  S = 5 + 3  Integer(7) * sin(0.21);

 

This problem can be fixed; LMD-ScriptPack Import Wizard provides additional field in the detail view, where you can assign a type for constant manually.

Overloaded procedures, functions or methods with equal number of parameters:

 

procedure A(X: Integer); overload;
procedure A(X: Double); overload;

 

Note that overloaded procedures, functions or methods with different number of parameters are supported. So, for example, following overload methods group will be initially reported by LMD-ScriptPack Import Wizard as not supported:

 

procedure A(X: Integer); overload;
procedure A(X: Double); overload;
procedure A(X: Double; Y: Double); overload;

 

But, it can be partially supported by unchecking, for example, the first procedure. This is because, remaining two procedures has different number of parameters.

Untyped const, var and out parameters:

 

procedure A(const X);
procedure B(var X);
procedure C(out X);

Variant open array parameters:

 

procedure A(X: array of const);

Procedural types declared without of object keywords:

 

type
  TMyProcPtr = procedure(x: Integer);

Pointer types:

 

type
  TMyIntPtr   = ^Integer;
  TMyPointPtr = ^TPoint;

File types:

 

type
  TMyCharFile = file of Char;

Arrays:

 

type
  TMyArray  = array[0..100] of Float;
  TMyDynArr = array of Integer;

Interface types:

 

type
  IMyInterface = interface
    procedure A;
    procedure B;
  end;

Implicit unnamed types:

 

type
  TMySet = set of (msElem1, msElem2);

 

Here the (msElem1, msElem2) is an unnamed enumeration type. This code can be changed to fix the problem:

 

type
  TMyEnum = (msElem1, msElem2);
  TMySet  = set of TMyEnum;