First off, sorry for creating so many topics.
Anyway, I'm trying to make a console for my program to help with debugging and whatnot.
I have two ideas for holding the data being displayed:
1) I make an array that holds the last only a certain number of messages I send to the console.
2) Make a log file that records all of the messages. This is the slower method, but the ability to see every single message is good.
Which way do you believe is the better way to do things?
Also, has anyone found any tutorials that discuss things like making a console? I haven't been able to find one yet.
Thanks.
Dave
Making a console for my program
Im thinking that youre goin' a bit farther than you need to here Dave. I rarely use debug files unless its a really massive program that must be 100% bug-less and perfect in every way. Im sensing your making a game here right? What Id do is just break everything up into subs, I mean everything. Create a global variable called ErrorRet$(0). In every sub have a check for EVERY possible thing that could go wrong, like maybe the "DrawSprite" command got an invalid memory location to blit from. Use ErrorRet$ like a stack, the last error generated gets slapped on(in other words make it a dynamic array). And if you do this for everything,(though there would be a slight program speed decrease as goes for any other debuggin tool), your program will be sooooo easy to debug, it works like magic for me. You can break the program and check all possible errors contained in "ErrorRet$"(these error messages should also have a tag identifying where they came from). People will probably slam me for telling you this(I must be saying SOMETHING wrong here), but try it and do what works for you. It really depends on the person, this is just what works fore me.
C:\DOS
C:\DOS\RUN
RUN\DOS\RUN
C:\DOS\RUN
RUN\DOS\RUN