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.

Geek Culture / Repeated DBPRO syntax error habits

Author
Message
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 2nd Feb 2012 15:17
Without fail, every so often I keep on doing this: Global Array(10). I still keep missing out the Dim statement 3 times out of 10 after all this time using the language.

Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 2nd Feb 2012 15:18
I often forget to close brackets. xD

Seppuku Arts
Moderator
20
Years of Service
User Offline
Joined: 18th Aug 2004
Location: Cambridgeshire, England
Posted: 2nd Feb 2012 16:48
Yeah, I'm guilty of the brackets too. Sometimes I forget to put the 'then' in 'if then' statements and on one occasion forgot the 'if', I feel incredibly stupid because it took me forever to work out that it was what was causing my problems. Because I was using arrays the syntax highlighter just mentioned the arrays, so I sat there trying to figure out why some perfectly decent arrays weren't working.

Also forgetting to adjust my array counts, so I can sit there wondering for a few minutes why my arrays aren't working.

"Why isn't Array(12) working? Oh wait, there's only Dim Array(11) there."

However, I do tend to remember to dim my arrays before using them, so at least I'm not guilty of that.

Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 2nd Feb 2012 17:01
My main DBPro one, which I do at least twice a month, is forgetting the brackets when reading mouse position (mousex,mousey).

With C++, it's semicolons, always damn semicolons - why can't it just add the semicolon itself if I've missed it!, instead the IDE stops and points, and laughs at my ineptitude. I hope I'm not alone in this.

Health, Ammo, and bacon and eggs!
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 2nd Feb 2012 17:10
I'm actually much the opposite, Van B. I add semicolons to my DBP code

TheComet

Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 3rd Feb 2012 00:21
I forget semicolons in c++, accidentally add semicolons in DBP, put brackets around my if statements in DBP and once I've even wrote endif; in c++.

So yeah, I try not to alternate too much.

ShaunRW
DBPro Developer
17
Years of Service
User Offline
Joined: 7th Jan 2008
Location: Brisbane, Australia
Posted: 3rd Feb 2012 01:41
Accidentally spelling a variable wrong and wonder why it keeps returning 0. Use Break instead of EndCase. Always try to manipulate non-global variables inside functions.

C++, I always forget semicolons. Put Else inside the if like this:



Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 3rd Feb 2012 01:47
Quote: "So yeah, I try not to alternate too much."


That's the cause of most of my silly errors too - the semi-colons being the most common issue these days. Just occasionally a silly error compiles. That causes no end of problems because you tend to interpret what you read as you read it so an error can be missed even if you read it several times. Can't think of an example off-hand but I know there've been a few.

Declaring variables as REALs rather than FLOATs is another favourite (goes back to my FORTRAN days ).
ionstream
20
Years of Service
User Offline
Joined: 4th Jul 2004
Location: Overweb
Posted: 3rd Feb 2012 01:52
Quote: "if(value=2)"


Double equals, bro!

MrValentine
AGK Backer
14
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 3rd Feb 2012 02:37
Looks like were all guilty of the brackets... not our fault theyre so far up there out of reach

Login to post a reply

Server time is: 2025-05-19 18:29:41
Your offset time is: 2025-05-19 18:29:41