if / then語(yǔ)句由布爾表達(dá)式后跟一個(gè)或多個(gè)語(yǔ)句組成。
句法 F#中的if / then構(gòu)造具有以下語(yǔ)法 -
(* simple if *)
if expr then
expr
流程圖 例子
F# programming language provides the following types of decision making statements.
當(dāng)編譯和執(zhí)行程序時(shí),將產(chǎn)生以下輸出
a is less than 20
Value of a is: 10
更多建議: