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.
At the CPU level, both instructions and data are all just bytes in memory. A certain value can be interpreted as a signed integer, integer, character, floating point number, CPU instruction, etc. only depending on how it's used.
Okay, my code finally compiles, but when I post to the binary file from an html form saved to the same folder there's a popup that says, "You have chosen to open "schedule_payment" (the name of my binary) which is a: Binary File from: /home/barth/cppexperiments
Would you like to save this file?"
When I save I get another popup indicating schedule_payment was downloaded. (NO OUTPUT) My only other option is cancel. Either way, my code doesn't output html as I expect it to.
Does the program have to be a cgi-script in order to output a webpage? Otherwise, why won't my program generate the one specified?
At the CPU level, both instructions and data are all just bytes in memory. A certain value can be interpreted as a signed integer, integer, character, floating point number, CPU instruction, etc. only depending on how it's used.
My point is that there exist CPU architectures that natively deal with BCDs. I.e. the architectures have machine commands that perform operations on BCDs.
My point is that there exist CPU architectures that natively deal with BCDs. I.e. the architectures have machine commands that perform operations on BCDs.
I don't understand, what I said wasn't meant to counter your argument that some CPUs use BCD.
...
Does the program have to be a cgi-script in order to output a webpage? Otherwise, why won't my program generate the one specified?
...
You are doing it wrong methodologically. You first need to call your program stand-alone providing it with the needed inputs and verifying that it produces the required outputs.
There is absolutely no place for any kind of pop-up windows in the suggested verification scenario.
When you refer to "cpu architecture" do you mean the processor by itself (its on-board cache & registers included), or also the processor's platform to some extent (the machine's rom, busses, etc.)? Does the physical processor have built in instructions, or are they mostly or in part external?
When you refer to "cpu architecture" do you mean the processor by itself (its on-board cache & registers included), or also the processor's platform to some extent (the machine's rom, busses, etc.)? Does the physical processor have built in instructions, or are they mostly or in part external?
When you refer to "cpu architecture" do you mean the processor by itself (its on-board cache & registers included), or also the processor's platform to some extent (the machine's rom, busses, etc.)? Does the physical processor have built in instructions, or are they mostly or in part external?
No machine ROM/buses.
Physical processor does have built-in instructions, but look up on the WEB "CPU microcode".
So I should edit the program such that it doesn't depend on input from a webpage, providing all the input directly, or via a shell prompt.
You shouldn't edit the program. You should create test environment which imitates real world. E.g. if inputs are given to the program through 'argc', 'argv', give them on command line; if through environment variables, set environment variables first, etc.
I.e. you first need to understand how the program is connected to the real world - regardless of the language your program is written in.
Are they burned somewhere? Approximately how many instructions? I presume these all either send information to, or get information from, a peripheral or registers, and, or else, they perform some kind of operation on information in its registers, based on its instruction set & corresponding instructions from various programs.
Are they burned somewhere? Approximately how many instructions? I presume these all either send information to, or get information from, a peripheral or registers, and, or else, they perform some kind of operation on information in its registers, based on its instruction set & corresponding instructions from various programs.
Again, pardon my illiteracy. Are you saying there's always some way to execute your program, passing input to it in a way other than the way executed in run-time reality? So that, if input comes from an environment variable, I can set the environment variable manually and execute the program that way, or if from a call w/ arguments, I can somehow bypass executing the program its ordinary way, in such a way as to test it?
Again, pardon my illiteracy. Are you saying there's always some way to execute your program, passing input to it in a way other than the way executed in run-time reality? ...
For your kind of domain/activity - yes. Luckily, your program is single-threaded and non-real-time.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.