国产chinesehdxxxx野外,国产av无码专区亚洲av琪琪,播放男人添女人下边视频,成人国产精品一区二区免费看,chinese丰满人妻videos

F#中嵌套if語句

2018-12-15 09:43 更新
在F#編程中總是合法的,如果/ then或if / then / else語句,這意味著你可以在另一個(gè)if或else if語句中使用一個(gè)if或else語句。

語法

if expr then
   expr
   if expr then
      expr
   else
      expr
else
   expr

實(shí)例

let a : int32 = 100
let b : int32 = 200

(* check the boolean condition using if statement *)

if (a = 100) then
(* if condition is true then check the following *)

   if (b = 200) then
      printfn "Value of a is 100 and b is 200\n"
printfn "Exact value of a is: %d" a
printfn "Exact value of b is: %d" b

編譯和執(zhí)行程序時(shí),將產(chǎn)生以下輸出

Value of a is 100 and b is 200

Exact value of a is: 100
Exact value of b is: 200


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

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號