W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗值獎勵
IF<condition_1>. <statement block 1>. ELSE. <statement block 2>. ENDIF.
Report YH_SEP_15. Data Title_1(20) TYPE C. Title_1 = 'Tutorials'. IF Title_1 = 'Tutorial'. write 'This is IF Statement'. ELSE. write 'This is ELSE Statement'. ENDIF.
上面的代碼產(chǎn)生以下輸出
This is ELSE Statement.
IF<condition_1>. <statement block 1>. ELSEIF<condition_2>. <statement block 2>. ELSEIF<condition_3>. <statement block 3>. ...... ...... ...... ...... ELSE. <statement block>. ENDIF.在上述語法中,處理塊的執(zhí)行基于與處理塊相關(guān)聯(lián)的一個或多個邏輯條件的結(jié)果。 這里 :
Report YH_SEP_15. Data Result TYPE I VALUE 65. IF Result < 0. Write / 'Result is less than zero'. ELSEIF Result < 70. Write / 'Result is less than seventy'. ELSE. Write / 'Result is greater than seventy'. ENDIF.
上面的代碼產(chǎn)生以下輸出
Result is less than seventy.
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: