method number.double.from
Convert and object to type double
Contract
Return typewob
Parameter keyDefault valueType
a_wobreq
Water Contract
<method number.double.from
  a_wob=req/>

See also: from, is_a, is_type_for, double



This method attempts to convert the given Water object into a double-precision numerical value.

a wob
Parameter keyDefault valueType
a_wobreq

a wob
a_wob=number.double
Values of type number.double are converted to themselves.

number.double.<from 123.4567 />
123.4567
a wob
a_wob=number.integer
Values of type integer are converted to their corresponding double value.
number.double.<from 1233465 />
1233465.0
a wob
a_wob=string
Values of type string are converted if their value can be parsed into a corresponding double.

number.double.<from "123.4567" />
123.4567

Values expressed in scientific notation may be converted to double by expressing them as a string.

number.double.<from "1.0E3" />
1000.0
<try if_error="Cannot convert"
number.double.<from "ABCDEFG" />
/>
"Cannot convert"