<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 3 ,通過字符串插值,不再需要手動連接字符串的各部分。一個特定的標識符,通過美元符號 $ 在一個單引號括起來的字符串中,像連接標識符一樣被執行: > With Haxe 3 it is no longer necessary to manually concatenate parts of a string due to the introduction of String Interpolation. Special identi?ers, denoted by the dollar sign $ within a String enclosed by single-quote ’ characters, are evaluated as if they were concatenated identi?ers: ~~~ var x = 12; // The value of x is 12 trace(’The value of x is $x’); ~~~ 此外,可以包括完整的表達式到字符串中,通過使用 ${expr} ,expr 是任何有效的Haxe 表達式: > Furthermore, it is possible to include whole expressions in the string by using ${expr}, with expr being any valid Haxe expression: ~~~ var x = 12; // The sum of 12 and 3 is 15 trace(’The sum of $x and 3 is ${x + 3}’); ~~~ 字符串插值是一個編譯時功能,不會對運行時性能產生影響。上面的例子和手動連接是等效的,和手動連接編譯器生成相同的內容: > String interpolation is a compile-time feature and has no impact on the runtime. The above example is equivalent to manual concatenation, which is exactly what the compiler generates: ~~~ trace("The sum of " + x + " and 3 is " + (x + 3)); ~~~ 當然,使用單引號括起來的字符串即使沒有任何插值仍然是有效的,但是注意美元符號因為它會觸發插值。如果一個實際的美元符號被使用,可以使用 $$ 雙美元符號代替。 > Of course the use of single-quote enclosed strings without any interpolation remains valid, but care has to be taken regarding the $ character as it triggers interpolation. If an actual dollar-sign should be used in the string, $$ can be used. **Haxe3之前的字符串插值** >[warning] **花絮**: Haxe3之前的字符串插值 從Haxe 2.09之后字符串插值就作為一個Haxe功能被引入。在那之前,必須使用宏 Std.format,跟新的字符串插值語法相比,即慢而且不夠靈活。 >[warning] **Trivia**: String Interpolation before Haxe 3 String Interpolation has been a Haxe feature since version 2.09. Back then, the macro Std.format had to be used, being both slower and less comfortable than the new string interpolation syntax.
                  <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>

                              哎呀哎呀视频在线观看