2014-04-02 131 views
0

如何寫的東西F#條件語句

if !inBoundary then do 
printfn "no it's not within the boundary" 
+1

''用於取消引用'ref'在F#中。例如如果你有'let x = ref 1',你可以使用它:'let y =!x'; 「不」是你想要的。 –

回答

4

可以使用notbuilt-in function(和省略thendo關鍵字):

let inBoundary = false 

if not inBoundary then 
    printfn "no it's not within the boundary"