https://pasteboard.co/HJDzL9T.png
This makes me think Excel downgrades a long into an integer.
I already addressed this misunderstanding.
In post #4, you wrote: ``dim x as Long, it will retype it to integer``.
In post #6, I explained:
``You mistakenly think that operand type passes (or should pass) from left to right. [....] that is simp[l]y not how it works``.
The type of the left-hand side of an assignment does not influence the type of the right-hand side (expression).
Moreover, in the right-hand expression, the type of subexpressions on the left does not influence the type of subexpressions on the right, subject to operator precedence.
Again, I already explained that in post #6 with a concrete example, to wit: 1& + 30000*2.
You can continue to ignore the explanation. Or you can recognize that since the explanation matches VBA's behavior, it is probably correct.
as I recall, even C or Java [....] doesn't need a special character after the number in a multiplication if you've declared the variable properly.
Your example deals with
constants, not variables. We are talking about the implicit and explicit type of
constants and
constant expressions per se.
English does not need (nor does it have) a gender-specific article ("the") before nouns. But German requires that we use the correct gender ("der", "die" or "das").
The point is: each language -- natural or programming -- has its own rules. In post#6, I explained VBA's rules as they relate to your example.
So the rules for VBA might indeed be different from C, Java and any other programming language. So what?!
-----
BTW, original C does indeed behave like VBA in this respect, according to my first-edition copy of "The C Programming Language" by Kernighan and Ritchie.
I programmed in C professionally for 20 years. But it has been 20 years since then; I've forgotten the details. "Use it, or lose it." Sigh.
Unless indicated otherwise, subexpressions with just type char, short and int operands are converted to type int for evaluation.
Constants can be treated as type long either by their magnitude (i.e. greater than 32767 or less than -32768) or by appending "L" (e.g. 123L).
IIRC, type long long constants can be indicated by appending "LL" (e.g. 123LL). Type long long was introduced into the language much later.
Also, in C, the type of the left-hand side of an assignment does not influence the type of the right-hand side. For example, if x is type int:
x = 2.4 * 3
results in 7 stored into x, not 6 if 2.4 were converted to type int first (it is not !).
Your question has been asked and answered, as far as I'm concerned. You're "beating a dead horse".