[SOLVED] Portable Numbers Format: PRINT Before CRASH Doesn't Work
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
You've posted too much code. You need to start by trying to hone in on the problem area - print the values of variables at different points in the code, or use a debugger to step through the code. Once you've found the code that's causing the problem, if you're still stuck, then post just enough to reproduce the problem, along with sample input and output.
As an aside, you've got some really long methods in there (PNF::execute(), for one). This really makes the code much more difficult to follow. Prefer using shorter methods. Google for "clean code" for info about this.
Surely you do not seriously expect someone else to read through 100's of lines of code to find your problem?
And whilst you may have raised a question on the other site, that is no reason to at least provide some background here and advise that you have not copied the copious amount
of code here but have provided a link for efficiency. You didn't even have the courtesy to advise what the link was to. Out of habit I do not click on links that I know nothing about.
Hence my original post.
ndc would appear to have provided some much needed pre-work for you to do before anyone here will attempt to help you.
The error was actually in my assembler I found out. It was not assembling the code correctly because it was not giving the terminating null at the end of the string for the PRINT instruction. When I added that to assemble correctly, it worked.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.