FutureBasic Logo

<<    Index    >> FutureBasic

dblval   function



Syntax
value = dblval( object )

Description
dblval returns the floating-point value of the object as a double.

Although object is commonly a CFString or CFNumber, it can be any object that responds to Objective-C's doubleValue method.

Examples
(1)
CFStringRef string
CFArrayRef array = @[@"1.56",@"-4.5w",@"123",@"32MP"]
for string in array
   print dblval(string)
next

program output:
1.56
-4.5
123
32

(2)
CFNumberRef number = @52.78
print dblval( number )

program output:
52.78

See also
intval; val&; mki; cvi; str; hex; oct; bin; uns$; Appendix C - Data Types and Data Representation