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 Professional Discussion / Strange problems with INCLUDE files

Author
Message
Scofflaw
22
Years of Service
User Offline
Joined: 23rd Jan 2003
Location: United States
Posted: 1st Feb 2003 02:31
After allot of hair pulling and trying various methods I have discovered that there is some major problems with TYPE's in DBP. Hopefully someone can help make sense of this.

Problem 1: I recently created a program that has 4 FUNCTIONS within it. All the code was stored in the main .dba file for ease of coding and testing. Next I take the functions and place them in a second file to be #INCLUDED. Here's were the hair pulling starts. I start to get errors such as "#100008: Parameter for "text width" do not match 'String' inside lms-functions.dba.
Then if I monkey around with the lines of code that utilize the Text Width commands by not using my UDT's and I start to get errors in other areas such as "#100008: Parameter for 'BOX' do not match 'Left,Top,Right,Bottom' inside lms-functions.dba. And the list goes on everytime I get temporarily work around an error.

Problem 2: This problem I believe sheds some light on problem 1. It seems that when using UDT's there is some issues with Boolean and Byte variables. Strange results appear until the variables are changed from Boolean or Byte to integer than the problems go away. There also seems to be issues using the NOT statement in conjunction with a UDT that has variables of the Boolean or Byte type within itself.

I am a VB programmer by trade so I am very well versed with UDT's. I have tried shifting my TYPE declerations from the main .dba file to the INCLUDED file along with my GLOBAL declerations and a few other things but nothing seems to be helping.

Here is an example of one of my lines of code.


I have come across a few other small problems while working on this project but I can't remember them all at the moment.

Hopefully someone can shed some light upon my dilemma.
Scofflaw
22
Years of Service
User Offline
Joined: 23rd Jan 2003
Location: United States
Posted: 1st Feb 2003 03:28
Anyone????
GuySavoie
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location:
Posted: 1st Feb 2003 03:29
First, you will want to not use the #include directive. It is there for legacy purposes.

Instead, add them through the files panel on the project manager.

In that way, the compiler should be able to report error lines better.

If you would like more assistance, please forward the offending code/project to my attention at [email protected] and I'll see if I can find the problem for you.

--- Guy

Scofflaw
22
Years of Service
User Offline
Joined: 23rd Jan 2003
Location: United States
Posted: 1st Feb 2003 05:20
Thank you Guy. I commented out the #INCLUDE statement and it worked like a charm. I guess i'm old school and using #INCLUDE instead of trusting a project manager is a habit i'll have to break.

Thanks again.

Login to post a reply

Server time is: 2025-05-17 23:43:12
Your offset time is: 2025-05-17 23:43:12