#1 Re: mORMot 1 » Suggestion » 2015-10-15 07:42:03

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.

#2 Re: mORMot 1 » Suggestion » 2015-10-14 01:43:16

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;

#3 mORMot 1 » Suggestion » 2015-10-14 01:41:32

zwjchina
Replies: 3

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;

Board footer

Powered by FluxBB