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.

DarkBASIC Discussion / [LOCKED] DBP - the strangest problems with vars.

Author
Message
Jambo B
14
Years of Service
User Offline
Joined: 17th Sep 2009
Location: The Pit
Posted: 9th May 2010 19:54
I've been having the most frustrating and headbanging fight today with DBP v1.074: it's been 'forgetting' variables.

It seems to have happened since my project got larger than 3500 lines. Take the code below:



Pretty simple, and worked OK. Until today, that is. Passing "cmdpass" and "cmdreturn" both give the result '6'. How can that be? I tried replacing the select..case statements with if..thens but this had the same effect.

Also, when the main prog called this function, and tried to do something with the result...



...the IntParm2 var would reset to zero at the IF statement! (it wasn't zero before the IF - I printed it!)

I'm quite an old hand at this programming lark; I know what I'm doing; and to me there seems to be some sort of corruption going on behind the scenes.

I am jumping up and down with frustration while typing this Aargh!

Does anyone have any advice on how to combat this problem? Is it a known issue? (I've searched the bug forum)... Eee, I dunno.

Thanks

James
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 10th May 2010 11:04
Quote: "It seems to have happened since my project got larger than 3500 lines."


In DBC that happened to me too when I went over 3500 lines... I solved it by splitting the program up into separate dba files and using the #include command in the main program to splice them together again.

TheComet

TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 10th May 2010 17:28
Wrong board!

TDK

Login to post a reply

Server time is: 2024-04-25 15:00:02
Your offset time is: 2024-04-25 15:00:02