I have been trying to learn C. so far I know what function are and how to use gfx commands, Thanks to the understanding of ICE.
But in order for me to fully understand C, I will have to learn from other sources. I also want to learn C because I want to rewrite Xenon in it.
"C is more powerful" - Cemetech users
- How does variables work when there is no store sign?
- Where and how can I use OS commands such as getkey, Etc.
- How do I use Hook or pointer in C?
I'm a bit scared to answer for fear of steering you wrong, but here it goes.
How does variables work when there is no store sign?
To give a value to a variable if it has been declared already is as simple as
x = 5; //OR
x = x + 1;
to declare a variable (before you can use it) you give it a type:
int x; //stores an integer value;
double y; //stores a real number value;
char c; //stores an ascii character (or just one byte);
you can also give the variable a value while you declare it:
int x = 0;
double y = 1.25;
char c = 'A';
Where and how can I use OS commands such as getkey, Etc.
I'm not sure you really can, but there's another C library that lets you access the keypad pretty easily, much like the gfx library makes it easy to do graphics. I don't remember what it's called...
How do I use Hook or pointer in C?
Pointers in C are pretty fun. You use the & symbol to get a variable's address in memory. This is helpful when you need a function to change the value of a non-global variable. The int* in the function means it's looking at the value at the address passed by the function call, not the address itself.
int x = 0;
void addFive(int* number)
*number += 5;
I hope this helps! and please anybody correct me about anything if it's wrong.
Thanks for the information . I will leave any question here
Is C hard to learn? I would like to learn it so I can become useful
De2290, I think you should start out with ICE then move to C
.ICE is basically C but with a different syntax.
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
» Go to Registration page
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum