Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Bug Reports / DBPro 7.4 - What we've got here is a failure to parse

Author
Message
dark coder
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 26th Sep 2009 17:59 Edited at: 26th Sep 2009 18:29
I've gone back to DBPro to do an example for someone's plugin and wow there's so many issues remaining with the language. I thought I'd post this one as it takes the cake, and took me quite a while to spot as the compiler didn't seem to care:



As you can see, I'm able to pass array indices directly to functions which under different circumstances produces a compiler error thus it isn't normally allowed by the language. However, when you order the code like this, the compiler not only allows this but it doesn't even care what type the arrays belong to and compiles fine.

You may wonder why I'm ordering it in such a fashion and the answer is that I'm using multiple files and I declare my types and such at the top, but this is besides the point as you can clearly see the compiler does read the UDTs, at least before I attempt to assign values to the array. Now I have to have fun rearranging my include files so the compiler warns me about this, as I wrongly assumed the language supported such an obvious feature and the lack of errors led me to believe it was fine.

Login to post a reply

Server time is: 2026-06-11 09:54:37
Your offset time is: 2026-06-11 09:54:37