• Delphi 的编译指令(4): 编译指令全表(未完)


    指令及默认值 可选值 范围 注释 举例
    {$A8}
    {$ALIGN8}
    {$A+},{$A-},
    {$A1},{$A2},{$A4},{$A8};
    {$ALIGN ON},{$ALIGN OFF},
    {$ALIGN 1},{$ALIGN 2},
    {$ALIGN 4},{$ALIGN 8}
    Local
    {$APPTYPE GUI} {$APPTYPE GUI},
    {$APPTYPE CONSOLE}
    Global
    {$B-}
    {$BOOLEVAL OFF}
    {$B+},{$B-};
    {$BOOLEVAL ON},
    {$BOOLEVAL OFF}
    Local
    {$C+}
    {$ASSERTIONS ON}
    {$C+},{$C-};
    {$ASSERTIONS ON},
    {$ASSERTIONS OFF}
    Local
    {$D+}
    {$DEBUGINFO ON}
    {$D+},{$D-}
    {$DEBUGINFO ON},
    {$DEBUGINFO OFF}
    Global
    {$DENYPACKAGEUNIT OFF} {$DENYPACKAGEUNIT ON}, Local
    {$DESCRIPTION 'text'} Global
    {$DESIGNONLY OFF} {$DESIGNONLY ON},
    {$DESIGNONLY OFF}
    Local
    {$E-} {$E+},{$E-}  
    {$E extension}
    {$EXTENSION extension}
     
    {$EXTERNALSYM identifier}
    {$F-} {$F+},{$F-}  
    {$FINITEFLOAT ON} {$FINITEFLOAT ON},
    {$FINITEFLOAT OFF}
    Global
    {$G+}
    {$IMPORTEDDATA ON}
    {$G+},{$G-};
    {$IMPORTEDDATA ON},
    {$IMPORTEDDATA OFF}
    Local
    {$H+}
    {$LONGSTRINGS ON}
    {$H+},{$H-}
    {$LONGSTRINGS ON},
    {$LONGSTRINGS OFF}
    Local
    {$HINTS ON} {$HINTS ON},
    {$HINTS OFF}
    Local
    {$HPPEMIT 'string'}
    {$I filename}
    {$INCLUDE filename}
      Local
    {$I+}
    {$IOCHECKS ON}
    {$I+},{$I-};
    {$IOCHECKS ON},
    {$IOCHECKS OFF}
    Local    
    {$IMAGEBASE $00400000} {$IMAGEBASE number} Global
    {$IMPLICITBUILD ON},{$IMPLICITBUILD OFF} {$IMPLICITBUILD ON} Global
    {$J-}
    {$WRITEABLECONST OFF}
    {$J+},{$J-}
    {$WRITEABLECONST ON},
    {$WRITEABLECONST OFF}
    Local
    {$K-} {$K+},{$K-}
    {$L+}
    {$LOCALSYMBOLS ON}
    {$L+},{$L-}
    {$LOCALSYMBOLS ON},
    {$LOCALSYMBOLS OFF}
    Global
    {$L filename}
    {$LINK filename}
      Local    
    $LIBPREFIX 'lib' or $SOPREFIX 'bpl' 
    $LIBSUFFIX ' '
    $LIBVERSION ' '
    $LIBPREFIX 'string'
    $LIBSUFFIX 'string'
    $LIBVERSION 'string'
    Global    
    {$M-}
    {$TYPEINFO OFF}
    {$M+},{$M-}
    {$TYPEINFO ON},
    {$TYPEINFO OFF}
    Local
    {$M 16384,1048576} {$M minstacksize,maxstacksize};
    {$MINSTACKSIZE number}
    {$MAXSTACKSIZE number}
         
    {$M 1048576} {$M reservedbytes}
    {$RESOURCERESERVE reservedbytes}
    Global Linux  
    {$MESSAGE HINT|WARN|ERROR|FATAL 'text string'}   Local    
    {$METHODINFO OFF} {$METHODINFO ON},
    {$METHODINFO OFF}
         
    {$N+} {$N+},{$N-}
    {$NODEFINE identifier}        
    {$NOINCLUDE filename}        
    {$O+}
    {$OPTIMIZATION ON}
    {$O+},{$O-};
    {$OPTIMIZATION ON},
    {$OPTIMIZATION OFF}
    Local
    {$ObjExportAll Off} {$ObjExportAll On},
    {$ObjExportAll Off}
    Global
    {$P+}
    {$OPENSTRINGS ON}
    {$P+},{$P-}
    {$OPENSTRINGS ON},
    {$OPENSTRINGS OFF}
    Local
    {$POINTERMATH OFF} {$POINTERMATH ON},
    {$POINTERMATH OFF}
    Local    
    {$Q-}
    {$OVERFLOWCHECKS OFF}
    {$Q+},{$Q-}
    {$OVERFLOWCHECKS ON},
    {$OVERFLOWCHECKS OFF}
    Local
    {$R filename}
    {$RESOURCE filename}
    {$R *.xxx}
    {$R filename.res filename.rc}
           
    {$R-}
    {$RANGECHECKS OFF}
    {$R+},{$R-}
    {$RANGECHECKS ON},
    {$RANGECHECKS OFF}
    Local
    {$REALCOMPATIBILITY OFF} {$REALCOMPATIBILITY ON},
    {$REALCOMPATIBILITY OFF}
    Local    
    {$RUNONLY OFF} {$RUNONLY ON},
    {$RUNONLY OFF}
    Local    
    {$S-} {$S+},{$S-}
    {$SetPEFlags <integer expression>}
    {$SetPEOptFlags <integer expression>}
      Local    
    {$T-}
    {$TYPEDADDRESS OFF}
    {$T+},{$T-}
    {$TYPEDADDRESS ON},
    {$TYPEDADDRESS OFF}
    Global
    {$U-}
    {$SAFEDIVIDE OFF}
    {$U+},{$U-}
    {$SAFEDIVIDE ON},
    {$SAFEDIVIDE OFF}
    Local
    {$V+}
    {$VARSTRINGCHECKS ON}
    {$V+},{$V-}
    {$VARSTRINGCHECKS ON},
    {$VARSTRINGCHECKS OFF}
    Local
    {$W-}
    {$STACKFRAMES OFF}
    {$W+},{$W-}
    {$STACKFRAMES ON},
    {$STACKFRAMES OFF}
    Local
    {$WARN ON} {$WARN identifier ON},
    {$WARN identifier OFF}
    Local    
    {$WARNINGS ON} {$WARNINGS ON},
    {$WARNINGS OFF}
    Local    
    {$WEAKPACKAGEUNIT OFF} {$WEAKPACKAGEUNIT ON},
    {$WEAKPACKAGEUNIT OFF}
    Local    
    {$X+}
    {$EXTENDEDSYNTAX ON}
    {$X+},{$X-};
    {$EXTENDEDSYNTAX ON},
    {$EXTENDEDSYNTAX OFF}
    Global
    {$YD}
    {$DEFINITIONINFO ON} 
    {$Y+},{$Y-},{$YD};
    {$REFERENCEINFO ON},
    {$REFERENCEINFO OFF};
    {DEFINITIONINFO ON},
    {DEFINITIONINFO OFF}
    Global
    {$Z1}
    {$MINENUMSIZE 1}
    {$Z1},{$Z2},{$Z4};
    {$MINENUMSIZE 1},
    {$MINENUMSIZE 2},
    {$MINENUMSIZE 4}
    Local
    $DEFINE
    $UNDEF

    $IFDEF
    $ELSE
    $ENDIF

    {$IF DEFINED(...)}
    {$IFEND}

    {$IF NOT DEFINED(...)}
    {$IFEND}

    {$IF DEFINED(...) OR DEFINED(...)}
    {$IFEND}

    {$IF DEFINED(...) AND DEFINED(...)}
    {$IFEND}

    {$IF System.Const >= Number}
    {$IFEND}

    {$IFOPT ...}
    {$ELSE}
    {$ENDIF}
           
             
    {$region 'text'} ... {$endregion}


    Delphi 2009、2010 减小文件尺寸的方法:
    //在 dpr 文件中加入:
    {$WEAKLINKRTTI ON}
    {$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])}
    
  • 相关阅读:
    oracle中varchar2和nvarchar2的区别
    Hbuilder与夜神连接
    BUILD 2015: Visual Studio对GitHub的支持
    Visual Studio Developer Assistant 3月新功能展示
    Visual Studio 发布新版API智能提示
    微软发布手机版 Sample Browser。7000多示例代码一手掌握
    微软 PowerShell Script Explorer 满血复活,正式发布
    IBM的“认知计算时代”
    最新 Windows 10 应用项目模板发布
    Windows 10四大版本区别详解:家庭版, 专业版, 企业版和教育版
  • 原文地址:https://www.cnblogs.com/del/p/1358274.html
Copyright © 2020-2023  润新知