FutureBasic Logo

<<    Index    >> FutureBasic

intval   function



Syntax
value = intval( object )

Description
This function returns the integer value of object.

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

Examples
(1)
CFStringRef string
CFArrayRef array = @[@"156",@"-45w",@"123",@"32MP"]
for string in array
   print intval(string)
next

program output:
156
-45
123
32

(2)
CFNumberRef number = @5278
print intval( number )

program output:
5278


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