Why does the compiler decide that 2.3 is double so this code won\'t compile:
decimal x;
x = 2.3; // Compilation error - can not convert double to decimal.
x
Because Floatingpint numbers are always a little bit diffucult in calculation and in Valuerange, they are in Immediate notation always the biggest possible type. (in your case: Double).
Non-Floating Points have some kind of the same Handling below, so they can be converted without any problem. If your value exceeds the Value-Range of a variable, it may cause an error (for example 257 for a Byte).