How Do I Print to Printer With Casio VX-4 C?
|
08-05-2022, 07:45 AM
(This post was last modified: 08-07-2022 10:35 AM by toml_12953.)
Post: #3
|
|||
|
|||
RE: How Do I Print to Printer With Casio VX-4 C?
(08-05-2022 03:21 AM)blackjetrock Wrote: I don't have a VX-4 but from a C point of view, %d prints and integer not a float so looks a bit suspicious, you'll maybe get junk, or maybe Casio have a different %d. Thanks for the reply! Casio C can't include headers like stdio.h. I did manage to print, however. Here's the program as it runs in Casio VX-4 C. It's an adaptation of the program found on page 5-5 of Learning to Program in C by Thomas Plum: Code: /* powdem - demonstrate power function 2 to the power 0 equals 1 2 to the power 1 equals 2 : : 2 to the power 9 equals 512 Some changes I had to make: 1) Casio C needs to define functions that come after main() so I had to add double pw(); in main() 2) User-defined functions can't duplicate predefined functions so I had to rename pow() to another name. I chose pw() 3) The statement extern FILE *stdprn had to be added to use a file pointer to the printer. 4) In Casio C, exit() can't take a parameter so the parameter in the book had to be removed. Tom L Cui bono? |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
How Do I Print to Printer With Casio VX-4 C? - toml_12953 - 08-04-2022, 10:15 PM
RE: How Do I Print to Printer With Casio VX-4 C? - blackjetrock - 08-05-2022, 03:21 AM
RE: How Do I Print to Printer With Casio VX-4 C? - toml_12953 - 08-05-2022 07:45 AM
RE: How Do I Print to Printer With Casio VX-4 C? - urbancamo - 10-07-2022, 02:51 PM
|
User(s) browsing this thread: 1 Guest(s)