I'm trying to figure out what's the real meaning behind these suffixes. In other words I'm trying to "translate" them.
+----+--------------+--------+
| | Type | Suffix |
+----+--------------+--------+
| 1 | byte | uy |
| 2 | sbyte | y |
| 3 | int16 | s |
| 4 | uint16 | us |
| 5 | int, int32 | |
| 6 | uint, uint32 | u |
| 7 | int64 | L |
| 8 | uint64 | UL |
| 9 | float | |
| 10 | float32 | f | (edited, thanks Thomas)
| 11 | decimal | M |
+----+--------------+--------+
E.g. I assume that "f" stands for f loat. But for what does e.g. "M" stand for. Why isn't "d" used for d ecimal ? For what does "uy" stand for? And so forth ...
Can anyone "translate" this ?
I can only speculate, but note that since a-f are valid hexadecimal values, they can't be used for suffixes for integral types. That's probably the reason that bYte and deciMal get the slightly less mnemonic abbreviations. Likewise, note that there are separate (very rarely used) suffices for using hexadecimal notation with floats: LF
for floats and lf
for float32s.
By these rules, all of the following are valid literals:
0xb // int, in hex
0xby // byte, in hex
0xabcdef // int, in hex
0xabcdeflf // float32, in hex
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With