{$REGION '中文字'}
這裡打的東西
在原始碼內都可以用 + - 號隱藏起來
{$ENDREGION}
{$IFDEF ANDROID}
// Android-specific code here
{$ENDIF}
{$IFDEF IOS}
// IOS specific code here
{$ENDIF}
{$IFDEF MACOS}
// OS X specific code here
{$ENDIF}
{$IFDEF MSWINDOWS}
ShowMessage('Windows');
{$ENDIF}
{$IFDEF LINUX}
ShowMessage('Linux');
{$ENDIF}
{$IFDEF DEBUG}
ShowMessage('调试模式');
{$ENDIF}
{$IFDEF RELEASE}
ShowMessage('发布模式');
{$ENDIF}
{$IFDEF FMX}
,FMX.Forms, FMX.dialogs
{$ELSE}
,VCL.Forms, dialogs
{$ENDIF}
Delphi 版本
// Delphi 5
{$IFDEF VER130}
{$DEFINE DELPHI5}
{$DEFINE DELPHI5ORABOVE}
{$DEFINE MSWINDOWS}
{$ENDIF}
//Delphi 6
{$IFDEF VER140}
{$DEFINE DELPHI5ORABOVE}
{$DEFINE DELPHI6ORABOVE}
{$DEFINE DELPHI6}
{$ENDIF}
//Delphi 7
{$IFDEF VER150}
{$DEFINE DELPHI5ORABOVE}
{$DEFINE DELPHI6ORABOVE}
{$DEFINE DELPHI7ORABOVE}
{$DEFINE DELPHI7}
{$ENDIF}
//Delphi 8
{$IFDEF VER160}
{$DEFINE DELPHI5ORABOVE}
{$DEFINE DELPHI6ORABOVE}
{$DEFINE DELPHI7ORABOVE}
{$DEFINE DELPHI8ORABOVE}
{$DEFINE DELPHI8}
{$DEFINE DOTNET}
{$DEFINE MSWINDOWS}
{$ENDIF}
//Delphi 9 (2005)
{$IFDEF VER170}
{$DEFINE DELPHI5ORABOVE}
{$DEFINE DELPHI6ORABOVE}
{$DEFINE DELPHI7ORABOVE}
{$DEFINE DELPHI8ORABOVE}
{$DEFINE DELPHI9ORABOVE}
{$DEFINE DELPHI9}
{. $DEFINE DOTNET}
{$DEFINE MSWINDOWS}
{$ENDIF}
//Delphi 10 (2006) & 11 (2007)
{$IFDEF VER180}
{$DEFINE DELPHI5ORABOVE}
{$DEFINE DELPHI6ORABOVE}
{$DEFINE DELPHI7ORABOVE}
{$DEFINE DELPHI8ORABOVE}
{$DEFINE DELPHI9ORABOVE}
{$DEFINE DELPHI10ORABOVE}
{$DEFINE DELPHI2006ORABOVE}
//Delphi 10 (2006)
{$IFNDEF VER185}
{$DEFINE DELPHI10}
{$DEFINE DELPHI2006}
//Delphi 11 (2007)
{$ELSE}
{$DEFINE DELPHI11ORABOVE}
{$DEFINE DELPHI11}
{$DEFINE DELPHI2007ORABOVE}
{$DEFINE DELPHI2007}
{$ENDIF}
{. $DEFINE DOTNET}
{$DEFINE MSWINDOWS}
{$ENDIF}
//Delphi 12 (2009)
{$IFDEF VER200}
{$DEFINE DELPHI5ORABOVE}
{$DEFINE DELPHI6ORABOVE}
{$DEFINE DELPHI7ORABOVE}
{$DEFINE DELPHI8ORABOVE}
{$DEFINE DELPHI9ORABOVE}
{$DEFINE DELPHI10ORABOVE}
{$DEFINE DELPHI2006ORABOVE}
{$DEFINE DELPHI11ORABOVE}
{$DEFINE DELPHI12ORABOVE}
{$DEFINE DELPHI12}
{$DEFINE DELPHI2007ORABOVE}
{$DEFINE DELPHI2009ORABOVE}
{$DEFINE DELPHI2009}
{. $DEFINE DOTNET}
{$DEFINE MSWINDOWS}
{$DEFINE GENERICS}
{$ENDIF}
//Delphi 14 (2010)
{$IFDEF VER210}
{$DEFINE DELPHI5ORABOVE}
{$DEFINE DELPHI6ORABOVE}
{$DEFINE DELPHI7ORABOVE}
{$DEFINE DELPHI8ORABOVE}
{$DEFINE DELPHI9ORABOVE}
{$DEFINE DELPHI10ORABOVE}
{$DEFINE DELPHI2006ORABOVE}
{$DEFINE DELPHI11ORABOVE}
{$DEFINE DELPHI12ORABOVE}
{$DEFINE DELPHI13ORABOVE}
{$DEFINE DELPHI13}
{$DEFINE DELPHI14}
{$DEFINE DELPHI2007ORABOVE}
{$DEFINE DELPHI2009ORABOVE}
{$DEFINE DELPHI2010ORABOVE}
{$DEFINE DELPHI2010}
{. $DEFINE DOTNET}
{$DEFINE MSWINDOWS}
{$DEFINE GENERICS}
{$ENDIF}
//Delphi 15 (XE)
{$IFDEF VER220}
{$DEFINE DELPHI5ORABOVE}
{$DEFINE DELPHI6ORABOVE}
{$DEFINE DELPHI7ORABOVE}
{$DEFINE DELPHI8ORABOVE}
{$DEFINE DELPHI9ORABOVE}
{$DEFINE DELPHI10ORABOVE}
{$DEFINE DELPHI2006ORABOVE}
{$DEFINE DELPHI11ORABOVE}
{$DEFINE DELPHI12ORABOVE}
{$DEFINE DELPHI13ORABOVE}
{$DEFINE DELPHI2007ORABOVE}
{$DEFINE DELPHI2009ORABOVE}
{$DEFINE DELPHI2010ORABOVE}
{$DEFINE DELPHIXEORABOVE}
{$DEFINE DELPHIXE}
{$DEFINE MSWINDOWS}
{$DEFINE GENERICS}
{$ENDIF}
// Free Pascal
{$IFDEF FPC}
{$DEFINE DELPHI5ORABOVE}
{$DEFINE DELPHI6ORABOVE}
{$DEFINE DELPHI7ORABOVE}
{$MODE DELPHI}{$H+}
{$ASMMODE intel}
// FPC includes this unit with the compiler
{$define USE_BASE64_UNIT}
{$ENDIF}
{$IFDEF FPC}
{$DEFINE DUNIT2ORFPC}
{$ENDIF}
{$IFDEF DUNIT2}
{$DEFINE DUNIT2ORFPC}
{$ENDIF}
delphi 7
{$IFDEF VER150}
{$ENDIF}
XE10 Seattle
{$IFDEF VER300}
{$ENDIF}
http://forum.lazarus.freepascal.org/index.php?topic=23381.0
http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Compiler_Versions
留言列表