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 / [DBP 7.61] Order of Type Declarations

Years of Service
User Offline
Joined: 6th Feb 2013
Posted: 4th May 2014 15:06
Not necessarily a bug, but certainly undesired behaviour:

Because color_type is declared after the tool_applyColor function and not before, that function seems to simply leave the color parameter out without any error/warning whatsoever.

It's not too unusual that a certain order of declarations is required, but the compiler really should tell me if it decides to just ignore a function's parameter.

(Tested in DBP 7.61, but as I couldn't find a single thread on the issue I just assumed it hasn't been discussed yet and thus probably hasn't been fixed in 7.7 either.. if that assumption happens to be wrong, sorry about that)

Green Gandalf
VIP Member
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 5th May 2014 23:32
I agree - and in any case surely it makes more sense to give an error message on the very first line in each case since the UDT is undefined at that point?

The Help file is quite specific (although I thought you could shove them into a subroutine or am I thinking of included files?):

Quote: "To create a user defined type, you must first declare it at the top of your program."

Powered by Free Banners

Login to post a reply

Server time is: 2019-06-26 14:16:28
Your offset time is: 2019-06-26 14:16:28