国产gaysexchina男同gay,japanrcep老熟妇乱子伦视频,吃奶呻吟打开双腿做受动态图,成人色网站,国产av一区二区三区最新精品

F#中if/elif/else語句

2018-12-15 09:46 更新
if / then / elif / else結(jié)構(gòu)有多個else分支。

語法

在F#編程語言中if / then / elif / else語句的語法是 

if expr then
   expr
elif expr then
   expr
elif expr then
   expr
...
else
   expr

實(shí)例

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í)行程序時,它會產(chǎn)生以下輸出 

None of the values are matching

Value of a is: 100

以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號