|
-
Jul 21st, 2005, 06:19 AM
#1
Thread Starter
Lively Member
Messy Code
I'm just about finished coding an app, but the last bit I've been working on (the report creator) I find is very messy and complicated to look at.
Is there any way that this can be tidied up to be cleaner, more efficient and easier to look at?
Messy Code
Anyone able to help me out here?
-
Jul 21st, 2005, 06:35 AM
#2
Frenzied Member
Re: Messy Code
For a start can you create your dims at the start instead of in the actual loop and just assign values to them in the loop. I think your code will be wasting memory creating dims every time the loop executes.
-
Jul 21st, 2005, 08:18 AM
#3
Thread Starter
Lively Member
Re: Messy Code
OK, and how about the loops? Is there a better way of passing that information around without doing so many loops and file readings?
-
Jul 21st, 2005, 11:03 AM
#4
Thread Starter
Lively Member
Re: Messy Code
I have now cleaned it up so well that some of it doesn't show up correctly... and I didn't make a backup either... I think I'm going to cry...
If someone can see where I messed up please feel free to point it out to me, elsewise I know what I'm doing tomorrow...
:-/
-
Jul 21st, 2005, 11:07 AM
#5
Frenzied Member
Re: Messy Code
Im going home shortly so I probably cant help you today , but which bit isnt showing up correctly can you be more specific.
-
Jul 21st, 2005, 11:21 AM
#6
Member
Re: Messy Code
can you upload your vs.net project so i can check it out?
-
Jul 22nd, 2005, 03:22 AM
#7
Thread Starter
Lively Member
Re: Messy Code
The chunk that doesn't display is this:
VB Code:
If counterFix = 0 Then
If lineAnswer(4) = 0 Then
tempStr....
Else
tempStr...
End If
End If
I'm going to try re-code it 
Unless someone can help me quickly point out the mistake I've done whilst "tidying" up....
-
Jul 22nd, 2005, 05:39 AM
#8
Thread Starter
Lively Member
Re: Messy Code
OK fixed it, had to close some files at the end of some loops, and then reset some variables to 0 and it worked fine :-/
Stupid mistakes...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|