Ciao Umberto (Ciao should be international
and it is more nice... hi remember me "Heil..." !)
I do not remember the technical terms in English (and probably not even in Italian)
but the casting should be lawful (G.T. excessive adjective) in one direction and "prohibited" (warned) in the other.
I mean that a Long can contain an Int but not vice versa, if the content of long is greater than the maximum possible content for an int, this should be warned.
----------
The reason for of the immediate error reporting (VB.Net) may also relate to the fact that it is possible to perform calculations in the Immediate window.
I do not know if this is in the versions of B4A next to my (3.20) but it would be enormously helpful. I think, however, would realize that it is very complex.