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 / [6.6] Error with datatypes when using comment blocks which declare local variables of the same type

Author
Message
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 27th Jan 2008 19:54
... for lack of a better name.

Run this code:


The last value it outputs is very large. Now remove the comment block (or just about any other line) and run again. You'll notice how the output is now 0.

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 28th Jan 2008 11:24
It's always unwise to assume that all variables are correctly initialised - even if the Help files says they are.

I agree it's a bug though.
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 28th Jan 2008 11:29 Edited at: 28th Jan 2008 15:24
Suit yourself:



I assume that in DBP all variables are supposed to be initialized at zero (this is BASIC remember), as I've never noticed an uninitialized variable having a non-zero value. Assigning zero to variables as a default is inefficient and unnecessary if DBP does it for you.

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 28th Jan 2008 11:43
Now that really IS a bug - and incredibly unhelpful.

Confirm it, someone, please.
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 30th Jan 2008 06:36
Double Integers are buggy all over the place and just need to fixed in general.



The fix...




Open MMORPG: It's your game!

Login to post a reply

Server time is: 2024-05-06 06:51:55
Your offset time is: 2024-05-06 06:51:55