Join Slack
Powered by
What's the best way to instantiate a constant ULon...
# announcements
k
kevin.cianfarini
07/30/2020, 3:29 AM
What's the best way to instantiate a constant ULong/UInt value that's out of Long/Int range?
String.toULong
?
i
ilya.gorbunov
07/30/2020, 4:08 AM
Use unsigned numeric literals, e.g.
0xffff_ffff_ffff_ffffUL
instead of
0x.....L.toULong()
🙂 1
➕ 1
k
kevin.cianfarini
07/30/2020, 4:56 AM
🤦♂️ how did I not know that was a thing. Thank you!
c
Cédric
07/31/2020, 12:44 AM
Please a link to understand kotlin numeric literals.
k
kevin.cianfarini
07/31/2020, 12:45 AM
https://kotlinlang.org/docs/reference/basic-types.html#literals
➕ 1
22
Views
Open in Slack
Previous
Next