Something... else...

Miscellaneous Forums/General Discussion/Something... else...

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I've yet to try it but did poke around the site a bit. The only thing that I thought was a bit off was the fact that the automatic type conversion doesn't behave the way most languages do but instead converts the type of the object on the right to the type of the object on the left.

That just seems foolish since you might have some code which looks like this

float2 = int + float1

Are you sure about this? You're suggesting that the following two lines would store a different value in float2?

float2 = int + float1

float2 = float1 + int


It seems bizarre to convert to an int and then back to a float. Now if you said that the following two lines resulted in a different answer, I could see the logic.

float3 = float1 + float2

int = float1 + float2

I could see the floats being cast to integers before they are added. It's perhaps not ideal, but since the answer is going to be cast to an integer anyway, I could see that it might hold an advantage for the developer to make such assumptions.

But not the former.