#1 2019-12-01 20:07:59

tbo
Member
Registered: 2015-04-20
Posts: 353

Unit mORMotService does not compile, Delphi XE, mORMot 1.18.5480

Hallo!

Delphi XE
mORMot 1.18.5480

System.Pos() is defined as:
function Pos(const SubStr, Str: ShortString): Integer;
function Pos(const SubStr, Str: UnicodeString): Integer; overload;
function Pos(const SubStr, Str: WideString): Integer; overload;
function Pos(const SubStr, Str: RawByteString): Integer; overload;

Unit mORMotService: function RunCommand() in  line 1499, 1505 does not compile.

In Delphi XE function PosEx() is defined in Unit StrUtils.

With best regards
Thomas

Offline

#2 2019-12-02 10:36:58

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,672
Website

Re: Unit mORMotService does not compile, Delphi XE, mORMot 1.18.5480

Oups... I missed that: it compiled with Delphi 6, 7, 2007 and XE4 and later...

We don't like to add StrUtils dependency.
I have modified the code to use plain Pos() - please check https://synopse.info/fossil/info/1cbafda9cf

(and also introduced PosExString for the future, in similar cases)

Offline

#3 2019-12-03 09:42:17

tbo
Member
Registered: 2015-04-20
Posts: 353

Re: Unit mORMotService does not compile, Delphi XE, mORMot 1.18.5480

Hallo!

Works fine in Delphi XE. Thanks a lot Arnaud.

With best regards
Thomas

Offline

Board footer

Powered by FluxBB