<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                Haxe允許通過使用 #if 、#elseif 和 #else 進行條件編譯,并檢查編譯器標記。 > Haxe allows conditional compilation by using #if, #elseif and #else and checking for compiler ?ags. >[warning] 定義:編譯器標記 一個編譯器標記是一個配置值,可以改變編譯過程。可以調用命令行使用 -D key=value 或者 只有 -D key的形式對標記進行設置,只有key的時候值默認為 1 。編譯器也設置了一些內部標記在不同的編譯步驟之間傳遞信息。 >[warning] **De?nition**: Compiler Flag > A compiler ?ag is a con?gurable value which may in?uence the compilation process. Such a ?ag can be set by invoking the command line with -D key=value or just -D key, in which case the value defaults to "1". The compiler also sets several ?ags internally to pass information between different compilation steps. 這個例子展示了條件編譯的用法: > This example demonstrates usage of conditional compilation: ~~~ class Main { public static function main(){ #if !debug trace("ok"); #elseif (debug_level > 3) trace(3); #else trace("debug level too low"); #end } } ~~~ 不使用任何標記編譯只保留 trace("ok"); 這行。另一個分支在解析文件時被丟棄。這些其他的分支必須包含有效的Haxe語法,但是代碼不會執行類型檢查。 > Compiling this without any ?ags will leave only the trace("ok"); line in the body of the main method. The other branches are discarded while parsing the ?le. These other branches must still contain valid Haxe syntax, but the code is not type-checked. \#if 之后的條件和 \#elseif之后的條件允許如下的表達式: > The conditions after #if and #elseif allow the following expressions: * 任何標識符被編譯器標記替換為同名的。注意 -D -some-flag 指示標記 some-flag,somin_flag被定義。 * String,Int和Float常量值被直接使用。 * 布爾操作符 &&, || ,和 ! 如同預期那樣工作,然而整個表達式必須被完全放在括號中。 * 操作符 ==,!=,>, >=,<,<=可以用來對比值。 * 括號可以用來像往常一樣組織表達式。 > * Any identi?er is replaced by the value of the compiler ?ag by the same name. Note that -D some-flag from command line leads to the ?ags some-flag and some_flag to be de?ned. > * The values of String, Int and Float constants are used directly. > * The boolean operators && (and), || (or) and ! (not) work as expected, however the full expression must be completely contained by parentheses. > * The operators ==, !=, >, >=, <, <= can be used to compare values. > * Parentheses () can be used to group expressions as usual. Haxe解析器不解析 some-flag為一個字符串令牌,而是將她讀為一個減法二院操作符 some - flag 。這種情況,下劃線的版本 some_flag 就有使用的必要了。 > The Haxe parser does not parse some-flag as a single token and instead reads it as a subtraction binary operator some - flag. In cases like this the underscore version some_flag has to be used. **內建編譯器標記** 一個所有內部定義的詳盡列表可以通過在Haxe編譯器 調用 --help-defines 參數來獲得。Haxe編譯器在每次編譯允許多個 -D 標記。 > **Built-in Compiler Flags** An exhaustive list of all built-in de?nes can be obtained by invoking the Haxe Compiler with the --help-defines argument. The Haxe Compiler allows multiple -D ?ags per compilation. 也可以查看編譯器標記列表(第7.1節)。 > See also the Compiler Flags list (7.1).
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看