W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
在F#編程語言中if / then / elif / else語句的語法是
if expr then expr elif expr then expr elif expr then expr ... else expr
let a : int32 = 100 (* check the boolean condition using if statement *) if (a = 10) then printfn "Value of a is 10\n" elif (a = 20) then printfn " Value of a is 20\n" elif (a = 30) then printfn " Value of a is 30\n" else printfn " None of the values are matching\n" printfn "Value of a is: %d" a
當(dāng)編譯和執(zhí)行程序時(shí),它會(huì)產(chǎn)生以下輸出
None of the values are matching Value of a is: 100
Copyright©2021 w3cschool編程獅|閩ICP備15016281號(hào)-3|閩公網(wǎng)安備35020302033924號(hào)
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號(hào)
聯(lián)系方式:
更多建議: