Change Float variable to other

Moderator: Benj

Post Reply
MJU
Posts: 502
Joined: Wed Nov 07, 2007 6:51 pm
Location: Antwerp Belgium
Has thanked: 121 times
Been thanked: 108 times
Contact:

Change Float variable to other

Post by MJU »

When generated a float variable, it isn't possible anymore to change the type.
When you want to edit a Float, all the other options are greyed out.

jhill
Posts: 65
Joined: Thu Jan 31, 2019 3:46 pm
Has thanked: 11 times
Been thanked: 12 times
Contact:

Re: Change Float variable to other

Post by jhill »

Yep, this was the same in 7, not sure why?

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Change Float variable to other

Post by Benj »

Hello,

I think this has been done with a reason behind it, though i'm not sure what that reason is.

My guess is it's something to do with back when we worked with BoostC float maths were not natively supported by the compiler and needed to go via a library function. Keeping the variable as a float or not as a float allows us to better determine if the library calls are needed without having to constantly keep rechecking if the variable is still of type float.

It's a minor annoyance at times. I simply create a new variable and then use the search and replace feature to move any references to the old variable to the new one. Then delete the old variable and rename the new one.

Post Reply