On 2021-03-24 10:56 a.m., Bart Schaefer wrote:
> On Wed, Mar 24, 2021 at 10:20 AM Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
>> Why are answers dumbed down like that?
> Every subexpression is considered independently, so float conversion
> doesn't take place until the assignment is evaluated. The type of the
> lvalue does not propagate across every rvalue.
So it's procedural rather than deliberate/designed. It's not hard to
still I'd vote to correct it -- one of those things where a look ahead
sorta say that if the lvalue is float, then all subsequent arithmetic
float. Or not worth the trouble, it's easy enough to work around.
The behavior of zsh in this regard is consistent with C and all languages inspired by it (C++, Java, C# and many, many others). This is really working as intended.