![]() ![]() ![]() When the operands a and b are statically known to be Float or Double or their nullable counterparts (the type is declared or inferred or is a result of a smart cast), the operations on the numbers and the range that they form follow the IEEE 754 Standard for Floating-Point Arithmetic. A for loop over a range or an array is compiled to an index-based loop that does not create an iterator object. Range instantiation and range checks: a.b, x in a.b, x !in a.b ![]() 4 in 1.6 (true) The next example shows how we can use ranges with both if/else and when statements. To check if a value contained by this range you use the in keyword. a.z will include all of the characters from a-z and a.Z will include a-z+A-Z. The operations on floating-point numbers discussed in this section are: Kotlin also allows this notation for other common ranges, such as characters. Here is the complete list of bitwise operations: ![]()
0 Comments
Leave a Reply. |