Data type auto convert

In Pac Control, the standard has always been the data type is automatically converted when moving from integer to float and back. Now it seems like I may have come across this before, but why does this statement not autoconvert?
Vfd_Speed_Rpm = Vfd_Read_nTable[5] / 100;
I am taking an integer element, dividing it by 100 and placing the result in a float. In practice, it does not autoconvert and the value ends up the same value as is in element 5.
Obviously if I put the value in a temp float var, and then divide it, it will probably work which is what I’ll do next, but the example should work, why not?

I tried the same code and it seems to work as I would expect.
It’s doing the math properly and rounding to the nearest integer.
This is expected though, because an integer divided by an integer will result in an integer.
If I use 100.0, it does what you are looking for.

Ok, DU…

Must be earlier than I thought, thanks Dan…

1 Like