convert units of measure to float

Category:
Units of Measure
Description: convert measure unit to float.
Code:
[<Measure>]type litre
[<Measure>]type pint

let MeasureSample2() =
let a = 1.
let (b:float) = float(a)
printfn "measure unit %A" a
printfn "float value %f" b

Execution Result:
measure unit 1.0
float value 1.000000

Last edited Sep 14, 2011 at 3:15 AM by ttliu2000, version 1

Comments

No comments yet.