#1 2015-10-14 01:41:32

zwjchina
Member
Registered: 2015-10-14
Posts: 3

Suggestion

function GetDelphiCompilerVersion: RawUTF8;
begin
  result :=
{$ifdef FPC}
  'Free Pascal'
  ...
{$else}
   {$ifdef VER90}  'Delphi 2'{$endif}
   ...
   {$elseif defined(VER240)} 'Delphi XE3'
   // <---- The mORMot what i got had no any code here. But i used XE8. so here will  raise an error, because there no const string defined and code become " result := ";
   {$ifend}   
{$endif}
end;

Suggest style:
function GetDelphiCompilerVersion: RawUTF8;
begin
  result :=
{$ifdef FPC}
  'Free Pascal'
  ...
{$else}
   {$ifdef VER90}  'Delphi 2'{$endif}
   ...
   {$elseif defined(VER240)} 'Delphi XE3'
   {$else} 'Delphi XE3 higher version'   
   {$ifend}   
{$endif}
end;

Offline

#2 2015-10-14 01:43:16

zwjchina
Member
Registered: 2015-10-14
Posts: 3

Re: Suggestion

Or another style:

function GetDelphiCompilerVersion: RawUTF8;
begin
  result :=
{$ifdef FPC}
  'Free Pascal'
  ...
{$else}
   'Delphi '
   {$ifdef VER90}  + '2'{$endif}
   ...
   {$elseif defined(VER240)} + 'XE3'
   {$ifend}   
{$endif}
end;

Offline

#3 2015-10-14 06:03:01

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

Re: Suggestion

Your version is deprecated.

Ensure you retrieved the latest from http://synopse.info/files/html/Synopse% … l#TITL_113

Offline

#4 2015-10-15 07:42:03

zwjchina
Member
Registered: 2015-10-14
Posts: 3

Re: Suggestion

Oh, Ver1.18. Thank you.

Synopse mORMot framework
from http://synopse.info/files/mORMot.7z;
Consider downloading the latest unstable version instead

This description is a bit confusing.

Offline

Board footer

Powered by FluxBB