I need help creating a simple input routine that allows users to letters for a warmup.
so I decided to create a function.

char get_input(const char text, const int x, const y);
// example: get_input("Day: ", 0, 0);
// returns: monday

I have the basic display worked out. but I need a way to detect the key number. I know I can map out each key to its ASCII Char but ... I wanted it optimized.

how do I create optimized code in C. so I don't have to map out each and every key to its char?
There’s an example for this in the documentation, which uses the values returned by os_GetCSC to access a char stored in a string, and append it to a temporary string used for the input. Here is the link to the description for the os_GetCSC function in the documentation, and the example of how to use this to make an input routine.
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
Page 1 of 1
» All times are GMT - 5 Hours
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