F0X
04/24/2021, 9:37 AM0xFF
and have that be converted to a signed Byte
Dominaezzz
04/24/2021, 9:40 AM0xFFU.toByte()
?Fleshgrinder
04/24/2021, 10:34 AMfun inconsistent() {
val byte = 1.toByte()
val ubyte = 1.toUByte()
val short = 1.toShort()
val ushort = 1.toUShort()
val int = 1
val uint = 1.toUInt()
val long = 1L
val ulong = 1.toULong()
val float = 1F
val alsoFloat = 1f
val double = 1.0
}
fun consistent() {
val byte = 1b
val ubyte = 1ub
val short = 1s
val ushort = 1us
val int = 1i
val uint = 1ui
val long = 1l
val ulong = 1ul
val float = 1f
val double = 1d
}
Sure, one can use the conversion functions all the time, but most people think that they are evaluated at runtime, and are thus afraid of them.Dominaezzz
04/24/2021, 10:35 AMconstexpr
ticket for this iirc.Tim Putnam
04/24/2021, 12:07 PMF0X
04/24/2021, 6:24 PMFleshgrinder
04/24/2021, 6:51 PMi(8|16|32|64|128)
+ u(8|16|32|64|128)
+ f(32|64)
Reminds me that I want to write a KEEP for Nonzero
now that we have unsigned.