亚洲喷奶水中文字幕电影,日本aⅴ高清一区二区三区,欧美亚洲日本国产,欧美日韩亚洲中文字幕

<legend id="flx4p"><abbr id="flx4p"><thead id="flx4p"></thead></abbr></legend>

<mark id="flx4p"><thead id="flx4p"></thead></mark>

      我要投稿 投訴建議

      Lua中if語句嵌套的使用基礎(chǔ)知識(shí)

      時(shí)間:2020-12-23 12:53:21 句子 我要投稿

      Lua中if語句嵌套的使用基礎(chǔ)知識(shí)

        Lua中if語句嵌套的`使用基礎(chǔ)知識(shí)

        在Lua編程內(nèi)嵌if-else語句,這意味著可以使用一個(gè) if 或 else if 在另一個(gè)語句if或else if 語句中。

      Lua中if語句嵌套的使用基礎(chǔ)知識(shí)

        語法

        if語句的嵌套語法如下:

        代碼如下:

        if( boolean_expression 1)

        then

        --[ Executes when the boolean expression 1 is true --]

        if(boolean_expression 2)

        then

        --[ Executes when the boolean expression 2 is true --]

        end

        end

        您可以嵌套else if...else 以類似if語句的方式。

        例子:

        代碼如下:

        --[ local variable definition --]

        a = 100;

        b = 200;

        --[ check the boolean condition --]

        if( a == 100 )

        then

        --[ if condition is true then check the following --]

        if( b == 200 )

        then

        --[ if condition is true then print the following --]

        print("Value of a is 100 and b is 200" );

        end

        end

        print("Exact value of a is :", a );

        print("Exact value of b is :", b );

        當(dāng)建立和運(yùn)行上面的代碼,它會(huì)產(chǎn)生以下結(jié)果。

        代碼如下:

        Value of a is 100 and b is 200

        Exact value of a is : 100

        Exact value of b is : 200

      【Lua中if語句嵌套的使用基礎(chǔ)知識(shí)】相關(guān)文章:

      使用外貿(mào)英語語句05-20

      職場中要求加薪的英語句子06-09

      40句外貿(mào)中接待客戶的英語句子06-06

      職場中應(yīng)聘秘書英語口語句子06-02

      關(guān)于在全校師生中推廣使用普通話的決定范文01-25

      英語教學(xué)中如何把握語句規(guī)律提高寫作水平的論文11-23

      搞笑的語錄語句12-22

      新密二中專學(xué)生使用手機(jī)情況調(diào)查開題報(bào)告02-28

      化學(xué)基礎(chǔ)知識(shí)09-18

      物理基礎(chǔ)知識(shí)09-18