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.

Newcomers DBPro Corner / Compile Problems

Author
Message
Faoladh
11
Years of Service
User Offline
Joined: 27th Jan 2013
Location: United States
Posted: 24th Jun 2014 02:48
I've written what should be a simple script that manipulates and organizes some data, then outputs the results to a text file. It looks fine (I think), it says that it compiles, but then I can't find the .exe nor can I find what should be the output file. It also does not seem to run nearly long enough for the amount of processing it should be taking. I'll attach the .dba.

Attachments

Login to view attachments
Lucas Tiridath
AGK Developer
16
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 24th Jun 2014 13:52
Hi. OK I see a few issues here. First off, this line is unnecessary, and seems to be preventing writing to the file. I imagine that this is some kind of permissions issue, but I really have no idea.


Next, your file name is bound to cause problems, because you construct your file name like so

but those strings will contain / and : characters which are invalid for file names.

However the biggest problem seems to be this.

I'm afraid that this is not valid syntax (I'm surprised the compiler doesn't complain) but the result is that NumClasses and NumLists, when are they read later, are assumed to be new variables and so return 0. That is why it is running so quickly. If you replace that with this, then it appears to work (in as much as you get a file full of data anyway, I have no idea if it's the right data!).


I hope that helps! Do let us know if you have any further problems with it .

Faoladh
11
Years of Service
User Offline
Joined: 27th Jan 2013
Location: United States
Posted: 24th Jun 2014 23:33
That was super-helpful, and now that those basic problems (where did I get the idea that was proper syntax for declaring variables?) are fixed, I am able to fix the other problems in the code. Perfect!

Login to post a reply

Server time is: 2024-11-23 14:34:12
Your offset time is: 2024-11-23 14:34:12