Do you think there should be a warning?
It seems to me that it is a feature of the compiler to be able to correctly distinguish between the two.
Everything works as expected in your sample code and there could be no way that you meant for the code to do anything else.
Also if I remember correctly C# allows this, and Python as well.
sancho3 wrote:Do you think there should be a warning?
It seems to me that it is a feature of the compiler to be able to correctly distinguish between the two.
Everything works as expected in your sample code and there could be no way that you meant for the code to do anything else.
Also if I remember correctly C# allows this, and Python as well.
This is allowed as long as the UDT does not have a member procedure or member field initializer, but I do not recommend declaring two different entities with the same name.
fxm wrote:This is allowed as long as the UDT does not have a member procedure or member field initializer, but I do not recommend declaring two different entities with the same name.
Hi nimdays, you are welcome. To continue on the steps of SARG's comment, I would propose you if you re interested this tutorial of mine, written some monthes ago when I tried to explore the question of naming in FB. fxm has answered there so there are some interesting advices, at least from him ;) https://freebasic.net/forum/viewtopic.p ... t=alias%2A