Jump to content



Photo
- - - - -

Code Didn't Work: Simple I/o Practise


  • Please log in to reply
38 replies to this topic

#1 tuxianer

tuxianer

    Casio Fan

  • Members
  • PipPip
  • 34 posts
  • Gender:Male
  • Location:Germany
  • Interests:Programming, Computer, Photography, ?C's, Electric

  • Calculators:
    CFX 9850 GB+
    FX 9860 SD

Posted 11 February 2008 - 01:11 PM

hi,
i want to discover the I/O funktions and I have written this Code:

this ist the main:
int AddIn_main(int isAppli, unsigned short OptionNum)
 {
	 unsigned int key;

	 Bdisp_AllClr_DDVRAM();
 
	 while(1){
 
		 GetKey(&key);
 
	  if (key == KEY_CHAR_1) {
 
		 PrintMini(0,0,(unsigned char*)"Taste 1",MINI_OVER);
 
		 Bdisp_AllClr_DD();
 
		 Bdisp_PutDisp_DD();
 
		 Bdisp_AllClr_VRAM();
 
	 }
 
	 Bdisp_AllClr_DD();
 
	 }
 
	 return 1;
 
 }

bt when I press Key1 nothing happens.

#2 Guest_Guest_*

Guest_Guest_*
  • Guests

Posted 11 February 2008 - 03:46 PM

GetKey(&key);
Wait for a key to be pressed.

if (key == KEY_CHAR_1) {

		 PrintMini(0,0,(unsigned char*)"Taste 1",MINI_OVER);

		 Bdisp_AllClr_DD();

		 Bdisp_PutDisp_DD();

		 Bdisp_AllClr_VRAM();

	 }
//you can also do this:
/*
	  if (key == KEY_CHAR_1) {
		 Bdisp_AllClr_VRAM();
		 PrintMini(0,0,(unsigned char*)"Taste 1",MINI_OVER);
		 Bdisp_PutDisp_DD();
	 }
*/
If that key is <span class=1' />, draw the text "Taste 1"to VRAM, clear DD, copy VRAM to DD, clear VRAM. These steps are executed on a very short time (under 2ms).
Bdisp_AllClr_DD();
Whatever key you pressed, the screen will be cleared.
So, if you pressed <span class=1' />, the text appeared in only very short time that you can not notice.
Try this:

int AddIn_main(int isAppli, unsigned short OptionNum)
{
	 unsigned int key;
	 Bdisp_AllClr_DDVRAM();
	 while(1){
	  GetKey(&key);
	  Bdisp_AllClr_DD();
	  if (key == KEY_CHAR_1) {
		 PrintMini(0,0,(unsigned char*)"Taste 1",MINI_OVER);
		 Bdisp_AllClr_DD();
		 Bdisp_PutDisp_DD();
		 Bdisp_AllClr_VRAM();
		 
	 }
	 }
	 return 1;
}


#3 tuxianer

tuxianer

    Casio Fan

  • Members
  • PipPip
  • 34 posts
  • Gender:Male
  • Location:Germany
  • Interests:Programming, Computer, Photography, ?C's, Electric

  • Calculators:
    CFX 9850 GB+
    FX 9860 SD

Posted 11 February 2008 - 04:46 PM

So it does'nt work also.

#4 kucalc

kucalc

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Gender:Male
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly

    Computer graphics

  • Calculators:
    fx-9860G / fx-7400G Plus / Algebra FX 2.0+ / fx-9770G / CFX-9850G / CFX-9850GB+ / TI-89 / TI-nSpire

Posted 11 February 2008 - 06:16 PM

int AddIn_main(int isAppli, unsigned short OptionNum)
{
	 unsigned int key;
	 Bdisp_AllClr_DDVRAM();
	 while(1){
	  GetKey(&key);
	  Bdisp_AllClr_DD();
	  if (key == KEY_CHAR_1) {
		 PrintMini(1,1,(unsigned char*)"Taste 1",MINI_OVER);
		 Bdisp_AllClr_DD();
		 Bdisp_PutDisp_DD();		 
	 }
	 }
	 return 1;
}

Try changing PrintMini(0,0,... to PrintMini(1,1). Point 0,0 does not exist on the pixel screen. Also you cleared the VRAM right after you drew something onto it.

#5 tuxianer

tuxianer

    Casio Fan

  • Members
  • PipPip
  • 34 posts
  • Gender:Male
  • Location:Germany
  • Interests:Programming, Computer, Photography, ?C's, Electric

  • Calculators:
    CFX 9850 GB+
    FX 9860 SD

Posted 11 February 2008 - 06:43 PM

ok i will try it.
I use this tutorial: http://www.casiocalc...amp;#entry42808

there are also point 0,0 in the manual ist the display also descriped from 0 to 127 and I think with the Command Bdisp_PutDisp_DD(); I load the Ram to the DD...so why the screen will be cleared when I clear the ram? The data should be already in the DD. My Code should be do this:

Write data into ram-->clear DD-->put data to DD-->clear ram

#6 Fez

Fez

    Casio Freak

  • Members
  • PipPipPipPip
  • 162 posts
  • Gender:Male
  • Location:Australia

  • Calculators:
    Casio fx-9860G AU

Posted 12 February 2008 - 12:18 PM

I use the co ords 0, and 0 all the time and it works for me.

try this

int AddIn_main(int isAppli, unsigned short OptionNum)
{
int getkey;
	Bdisp_AllClr_DDVRAM();
	GetKey(&getkey);
	if(getkey == KEY_CHAR_1){
		PrintMini(0, 0, (unsigned char*)"Taste 1", MINI_OVER);
		Bdisp_PutDisp_DD();
		GetKey(&getkey);
	}
}
This should wait for a button, and if it is 1, it will write taste 1 in 0, 0. Stick it on the screen and wait for a button. So the add in halts untill and button is pushed.

#7 tuxianer

tuxianer

    Casio Fan

  • Members
  • PipPip
  • 34 posts
  • Gender:Male
  • Location:Germany
  • Interests:Programming, Computer, Photography, ?C's, Electric

  • Calculators:
    CFX 9850 GB+
    FX 9860 SD

Posted 17 February 2008 - 12:36 PM

does it wait for a key when i call getkey? So hangs the programm there until i press a key? or it only write the current key into a var? this code also doesn't work:

int AddIn_main(int isAppli, unsigned short OptionNum)
 {
	 int getkey;
 
	 Bdisp_AllClr_DD();
	 while(1){
	 GetKey(&getkey);
	 PrintMini(0,0,(unsigned char*)"Taste 1",MINI_OVER);
 
	   Bdisp_AllClr_DD();
 
	 Bdisp_PutDisp_DD();
 
	 Bdisp_AllClr_VRAM();
	 }
 
 }

without the gk it works! When you add a Sleep(3000) at the and you can see, that the sreen will be cleared when i didn't press a key. So does a call of gk clear the screen?

#8 Fez

Fez

    Casio Freak

  • Members
  • PipPipPipPip
  • 162 posts
  • Gender:Male
  • Location:Australia

  • Calculators:
    Casio fx-9860G AU

Posted 17 February 2008 - 01:17 PM

getkey does not clear the screen. But it does stop the add in and wait for a button to be pressed. As soon as a button is pressed, it sticks the button value in the variable specified and continues the add in.

#9 tuxianer

tuxianer

    Casio Fan

  • Members
  • PipPip
  • 34 posts
  • Gender:Male
  • Location:Germany
  • Interests:Programming, Computer, Photography, ?C's, Electric

  • Calculators:
    CFX 9850 GB+
    FX 9860 SD

Posted 17 February 2008 - 01:33 PM

hmm..ist there another solution which does not stop the adin? And which does not hang up the pogramm in generaly? Because when you call gk you cant't do things in the background.

#10 kucalc

kucalc

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Gender:Male
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly

    Computer graphics

  • Calculators:
    fx-9860G / fx-7400G Plus / Algebra FX 2.0+ / fx-9770G / CFX-9850G / CFX-9850GB+ / TI-89 / TI-nSpire

Posted 17 February 2008 - 03:06 PM

there are also point 0,0 in the manual ist the display also descriped from 0 to 127

Gahh, this SDK stuff is already slipping out of my head. :banghead:

Oh yeah, there is another way to detect keys without stopping your addin. Here's an example:

while (!IsKeyDown(KEY_CTRL_EXE)) {
	// You code
	// continues as long as EXE is not pressed
}


#11 tuxianer

tuxianer

    Casio Fan

  • Members
  • PipPip
  • 34 posts
  • Gender:Male
  • Location:Germany
  • Interests:Programming, Computer, Photography, ?C's, Electric

  • Calculators:
    CFX 9850 GB+
    FX 9860 SD

Posted 17 February 2008 - 03:31 PM

is there also any way to store the pressed key into a var without stopping the adin. I think this i very unintelligend and unefficient solved by casio. Is it possible to write a one function with ikeydown with the help of a pointer?

#12 kucalc

kucalc

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Gender:Male
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly

    Computer graphics

  • Calculators:
    fx-9860G / fx-7400G Plus / Algebra FX 2.0+ / fx-9770G / CFX-9850G / CFX-9850GB+ / TI-89 / TI-nSpire

Posted 17 February 2008 - 04:12 PM

There's suppose to be GetKeyWait, but I don't think there is any other way of storing the key pressed into a variable.

#13 tuxianer

tuxianer

    Casio Fan

  • Members
  • PipPip
  • 34 posts
  • Gender:Male
  • Location:Germany
  • Interests:Programming, Computer, Photography, ?C's, Electric

  • Calculators:
    CFX 9850 GB+
    FX 9860 SD

Posted 17 February 2008 - 04:42 PM

But getkeywait also break the code and i hate this way of programming, when a program wait and you can't do anything in the background.

#14 tuxianer

tuxianer

    Casio Fan

  • Members
  • PipPip
  • 34 posts
  • Gender:Male
  • Location:Germany
  • Interests:Programming, Computer, Photography, ?C's, Electric

  • Calculators:
    CFX 9850 GB+
    FX 9860 SD

Posted 17 February 2008 - 09:45 PM

so this seems to be the Solution for my Problem:

int AddIn_main(int isAppli, unsigned short OptionNum)
{
	int getkey;

	Bdisp_AllClr_DD();
	while(1){
		Bdisp_AllClr_DD();
		if (IsKeyDown(KEY_CHAR_1)) {
			 PrintMini(0,0,(unsigned char*)"Taste 1",MINI_OVER);
			  Bdisp_AllClr_DD();
			Bdisp_PutDisp_DD();
			Bdisp_AllClr_VRAM();
			Sleep(100);
		}

	}

}

But i have noticed that with the endless loop you can't get bay to the menu. Is the a solution for this problem? And whats the usage for getkeywait.


Another Question how can i mac a input? Should i do this manual a loop until exe is pressed? Or is the still a command for?

#15 kucalc

kucalc

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Gender:Male
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly

    Computer graphics

  • Calculators:
    fx-9860G / fx-7400G Plus / Algebra FX 2.0+ / fx-9770G / CFX-9850G / CFX-9850GB+ / TI-89 / TI-nSpire

Posted 18 February 2008 - 03:54 PM

You can download Revolution-FX and use the Reset_Calc() function to get back to the menu.

#16 tuxianer

tuxianer

    Casio Fan

  • Members
  • PipPip
  • 34 posts
  • Gender:Male
  • Location:Germany
  • Interests:Programming, Computer, Photography, ?C's, Electric

  • Calculators:
    CFX 9850 GB+
    FX 9860 SD

Posted 18 February 2008 - 04:25 PM

ok and what ist with the inpt? scanf didn't work.

#17 Andreas B

Andreas B

    Casio Freak

  • Members
  • PipPipPipPip
  • 160 posts
  • Gender:Male
  • Location:Norway

  • Calculators:
    fx-9860G SD

Posted 18 February 2008 - 07:24 PM

There is no stdin/stdout or stderr on the calculator.

#18 tuxianer

tuxianer

    Casio Fan

  • Members
  • PipPip
  • 34 posts
  • Gender:Male
  • Location:Germany
  • Interests:Programming, Computer, Photography, ?C's, Electric

  • Calculators:
    CFX 9850 GB+
    FX 9860 SD

Posted 18 February 2008 - 07:27 PM

so i have to programm this function by myselfe?

#19 tuxianer

tuxianer

    Casio Fan

  • Members
  • PipPip
  • 34 posts
  • Gender:Male
  • Location:Germany
  • Interests:Programming, Computer, Photography, ?C's, Electric

  • Calculators:
    CFX 9850 GB+
    FX 9860 SD

Posted 19 February 2008 - 06:28 PM

so i habe tried to write a input code:

int AddIn_main(int isAppli, unsigned short OptionNum)
{
	unsigned int complete = 0;
	unsigned int print = 0;
	char input[100];
	Sleep(1000);
		Bdisp_AllClr_DDVRAM();

	 while(1){

		while(complete==0){

			if (IsKeyDown(KEY_CHAR_0)) {
				strcat(input, "0");
				print=1;
				while(!(IsKeyUp(KEY_CHAR_0)));
			}

			else if (IsKeyDown(KEY_CHAR_1)) {
				strcat(input, "1");
				print=1;
				while(!(IsKeyUp(KEY_CHAR_1)));
			}

			else if (IsKeyDown(KEY_CHAR_2)) {
				strcat(input, "2");
				print=1;
				while(!(IsKeyUp(KEY_CHAR_2)));
			}

			if (print) {
				print=0;
				PrintMini(0,0,(unsigned char*)input,MINI_OVER);
				Bdisp_AllClr_DD();
				   Bdisp_PutDisp_DD();
				 Bdisp_AllClr_VRAM();
			}

			if (IsKeyDown(KEY_CTRL_EXE)) {
				complete=1;
			}
		}

			Bdisp_AllClr_DDVRAM();
		PrintMini(0,0,(unsigned char*)"Complete",MINI_OVER);
		 Bdisp_AllClr_DD();
		Bdisp_PutDisp_DD();
		Bdisp_AllClr_VRAM();
	}
}

is there realy no easier way?

#20 BiTwhise

BiTwhise

    Casio Overgod

  • [Legends]
  • PipPipPipPipPipPipPip
  • 627 posts
  • Gender:Male
  • Location:Guildford, Surry, UK
  • Interests:Programming, games, consoles, martial arts

  • Calculators:
    FX9700WE, CFX9970G, AFX2.0, Classpad 300

Posted 19 February 2008 - 07:59 PM

I've not done any programming on the 9860 (I assume this is your calculator), however the input code could be simplified drastically.

Keep two arrays of state for all the keys you're interested in.
One will be the current state, the other the previous.
Every iteration, you assign the current to the previous, and update the current to the new state.

Now, you can test if a key was just pressed by testing if it was up in the previous state and down in the current state. Same, but opposite, for wethere a key was just released.

That gets rid of your "while (!IsKeyUp(...))"


Next, you probably want to keep an array mapping from key to character.
If you have modifier keys, you can keep multiple character mappings per key.

Once you have that, you can simply loop over the keys of interest, test if they were just pressed (or released), read the mapping, and output it to your buffer.

You'll obvoiusly need to handle special keys, like backspace or exe, seperately.




I'm surprised there isn't any functionality like this in the SDK already though...

#21 BiTwhise

BiTwhise

    Casio Overgod

  • [Legends]
  • PipPipPipPipPipPipPip
  • 627 posts
  • Gender:Male
  • Location:Guildford, Surry, UK
  • Interests:Programming, games, consoles, martial arts

  • Calculators:
    FX9700WE, CFX9970G, AFX2.0, Classpad 300

Posted 19 February 2008 - 08:28 PM

I knocked up some Win32 console app code as proof of concept.
It demonstrates basic key mapping, using a modifier key, and escaping the input.
It's obviously far from complete. You'd need to handle backspace, tabs, and other things, but it was just knocked up in 10 minutes.

My KeyState function is equivalent to the IsKeyDown sdk function.
Now, GetAsyncKeyState already tells you whether a key was just pressed or not, but this is just to show how you can work without that.

You'd probably also want to wrap this up more nicely :)

#include <iostream>
#include <windows.h>

bool KeyState(int key)
{
	return (GetAsyncKeyState(key) & 0x8000) != 0;
}

struct Key
{
	int scanCode;   // scan code to test
	char outNormal; // normal output
	char outShift;  // shift modified output
};

int main()
{
	int const numKeys = 27;

	// Keys
	Key keys[numKeys] =
	{
		{' ', ' ', ' '},
		{'A', 'a', 'A'},
		{'B', 'b', 'B'},
		{'C', 'c', 'C'},
		{'D', 'd', 'D'},
		{'E', 'e', 'E'},
		{'F', 'f', 'F'},
		{'G', 'g', 'G'},
		{'H', 'h', 'H'},
		{'I', 'i', 'I'},
		{'J', 'j', 'J'},
		{'K', 'k', 'K'},
		{'L', 'l', 'L'},
		{'M', 'm', 'M'},
		{'N', 'n', 'N'},
		{'O', 'o', 'O'},
		{'P', 'p', 'P'},
		{'Q', 'q', 'Q'},
		{'R', 'r', 'R'},
		{'S', 's', 'S'},
		{'T', 't', 'T'},
		{'U', 'u', 'U'},
		{'V', 'v', 'V'},
		{'W', 'w', 'W'},
		{'X', 'x', 'X'},
		{'Y', 'y', 'Y'},
		{'Z', 'z', 'Z'},
	};


	// Buffers for key state
	bool state1[numKeys] = {false,};
	bool state2[numKeys] = {false,};

	// Pointers that alternate buffers
	bool* prevState = state1;
	bool* currState = state2;

	while (true)
	{
		// Switch buffers
		std::swap(prevState, currState);

		// Update current buffer
		for (int i = 0; i < numKeys; ++i)
		{
			currState[i] = KeyState(keys[i].scanCode);
		}

		// Read modifier key (SHIFT)
		bool shift = KeyState(VK_SHIFT);

		// Read key states and print
		for (int i = 0; i < numKeys; ++i)
		{
			if (currState[i] && !prevState[i])
			{
				std::cout << (shift ? keys[i].outShift : keys[i].outNormal);
				break;
			}
		}

		// Quit when ESC is pressed
		if (KeyState(VK_ESCAPE))
		{
			break;
		}
	}

	return 0;
}


#22 tuxianer

tuxianer

    Casio Fan

  • Members
  • PipPip
  • 34 posts
  • Gender:Male
  • Location:Germany
  • Interests:Programming, Computer, Photography, ?C's, Electric

  • Calculators:
    CFX 9850 GB+
    FX 9860 SD

Posted 21 February 2008 - 08:31 PM

ok i can try it...but is there raly no input function? so i think it is a good idea to include this in the Revolution-FX library or is this allready done?

#23 Andreas B

Andreas B

    Casio Freak

  • Members
  • PipPipPipPip
  • 160 posts
  • Gender:Male
  • Location:Norway

  • Calculators:
    fx-9860G SD

Posted 21 February 2008 - 11:58 PM

Why don't you check? The one in revolution-fx is blocking and inefficient.

#24 kucalc

kucalc

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Gender:Male
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly

    Computer graphics

  • Calculators:
    fx-9860G / fx-7400G Plus / Algebra FX 2.0+ / fx-9770G / CFX-9850G / CFX-9850GB+ / TI-89 / TI-nSpire

Posted 22 February 2008 - 08:51 PM

Yeah, Revolution-FX has an input function: string_input()

Try looking at the Revolution-FX documentation: http://revolution-fx...ml#string_input

Why don't you check?

That wasnt helpful. You could have pointed him towards the documentation and let him read it. That's what it's there for.

The one in revolution-fx is blocking and inefficient.

Judging from his post: http://www.casiocalc...=...ost&p=44244, what he want's is to get user input. So... what's your point? Blocking?: it's just like scanf() and inefficient?: It does what it's meant to do: get a string from the user.

#25 BiTwhise

BiTwhise

    Casio Overgod

  • [Legends]
  • PipPipPipPipPipPipPip
  • 627 posts
  • Gender:Male
  • Location:Guildford, Surry, UK
  • Interests:Programming, games, consoles, martial arts

  • Calculators:
    FX9700WE, CFX9970G, AFX2.0, Classpad 300

Posted 22 February 2008 - 09:23 PM

If you're having problems writing this kind of function yourself, and string_input does what you need, I think you should see where you get with that.

I had a quick look at the it, and you should be aware there's no buffer overflow protection in it..
kukalc, from the source file it looks like you're the author, so I'd suggest you change your API to include maximum input length. Easy to fix and such an unecessary voulnerability to have in there.

#26 Andreas B

Andreas B

    Casio Freak

  • Members
  • PipPipPipPip
  • 160 posts
  • Gender:Male
  • Location:Norway

  • Calculators:
    fx-9860G SD

Posted 22 February 2008 - 09:52 PM

That wasnt helpful. You could have pointed him towards the documentation and let him read it. That's what it's there for.

I assumed he would be able to read/find documentation himself, as he knows the website for rev-fx.

Judging from his post: http://www.casiocalc...=...ost&p=44244, what he want's is to get user input. So... what's your point? Blocking?: it's just like scanf() and inefficient?: It does what it's meant to do: get a string from the user.

It was unclear if he wanted to be able to do other stuff while reading input.
My point is, to cite myself: "[string_input] is blocking and inefficient". By 'inefficient' (in programming context), we usually mean big and/or slow. Example of better solution; http://casio.pastebin.com/f2ef7343f (does not use PrintMini, I know).

#27 tuxianer

tuxianer

    Casio Fan

  • Members
  • PipPip
  • 34 posts
  • Gender:Male
  • Location:Germany
  • Interests:Programming, Computer, Photography, ?C's, Electric

  • Calculators:
    CFX 9850 GB+
    FX 9860 SD

Posted 23 February 2008 - 05:54 PM

with wich key can i leve the input function...exe doesn't work

int AddIn_main(int isAppli, unsigned short OptionNum)
{
	unsigned int complete = 0;
	unsigned int print = 0;
	char input[100];
	Sleep(1000);
		Bdisp_AllClr_DDVRAM();

	while(1){
		string_input(1,1,input);
		Bdisp_AllClr_DDVRAM();
		PrintMini(0,0,(unsigned char*)input,MINI_OVER);
		Bdisp_AllClr_DD();
		   Bdisp_PutDisp_DD();
		 Bdisp_AllClr_VRAM();
		Sleep(1000);
		
	}
}

whe i press exe it delete the screen but there is no sleep or so...

#28 tuxianer

tuxianer

    Casio Fan

  • Members
  • PipPip
  • 34 posts
  • Gender:Male
  • Location:Germany
  • Interests:Programming, Computer, Photography, ?C's, Electric

  • Calculators:
    CFX 9850 GB+
    FX 9860 SD

Posted 24 February 2008 - 12:44 PM

Hi,
i have tried this:
struct Key
{
	int scanCode;   // scan code to test
	char outNormal; // normal output
	char outShift;  // shift modified output
};


int AddIn_main(int isAppli, unsigned short OptionNum)
{
	int const numKeys = 27;
	
	// Keys
	Key keys[numKeys] =
	{
		{KEY_CHAR_DP, ' ', ' '},
		{KEY_CHAR_XTT, 'a', 'A'},
		{KEY_CHAR_LOG, 'b', 'B'},
		{KEY_CHAR_LN, 'c', 'C'},
		{KEY_CHAR_SIN, 'd', 'D'},
		{KEY_CHAR_COS, 'e', 'E'},
		{KEY_CHAR_TAN, 'f', 'F'},
		{KEY_CHAR_FRAC, 'g', 'G'},
		{KEY_CHAR_FD, 'h', 'H'},
		{KEY_CHAR_LPAR, 'i', 'I'},
		{KEY_CHAR_RPAR, 'j', 'J'},
		{KEY_CHAR_COMMA, 'k', 'K'},
		{KEY_CHAR_STORE, 'l', 'L'},
		{KEY_CHAR_7, 'm', 'M'},
		{KEY_CHAR_8, 'n', 'N'},
		{KEY_CHAR_9, 'o', 'O'},
		{KEY_CHAR_4, 'p', 'P'},
		{KEY_CHAR_5, 'q', 'Q'},
		{KEY_CHAR_6, 'r', 'R'},
		{KEY_CHAR_MULT, 's', 'S'},
		{KEY_CHAR_DIV, 't', 'T'},
		{KEY_CHAR_1, 'u', 'U'},
		{KEY_CHAR_2, 'v', 'V'},
		{KEY_CHAR_3, 'w', 'W'},
		{KEY_CHAR_PLUS, 'x', 'X'},
		{KEY_CHAR_MINUS, 'y', 'Y'},
		{KEY_CHAR_0, 'z', 'Z'},
	};
	
	int State1[numKeys] = { 0 };
	int State2[numKeys] = { 0 };
	int Shift = 0;
	char Input[100] = {""};
	int* prevState = State1;
	int* currState = State2;
	
	while(1) {
		std::swap(prevState, currState);
		
		for (int i = 0; i < numKeys; ++i)
		{
			currState[i] = IsKeyDown(keys[i].scanCode);
		}
		
		
		else if (IsKeyDown(KEY_CTRL_SHIFT)) {
			if(Shift==0) {
				Shift=1;
			}else{
				Shift=0;
			}
			while(!(IsKeyUp(KEY_CTRL_SHIFT)));
		}
		
		
		for (int i = 0; i < numKeys; ++i)
		{
			if (currState[i] && !prevState[i])
			{
				if(Shift) {
					strcat(Input, keys[i].outShift);
				}else{
					strcat(Input, keys[i].outNormal);
				}
				break;
			}
		}
		
		if (IsKeyDown(KEY_CTRL_EXE)) {
			break;
		}
	
	
	
	}

}
and get those Errors:
) : C2500 (E) Illegal token "}"
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(68) : C2500 (E) Illegal token ","
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(71) : C2500 (E) Illegal token "int"
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(71) : C2225 (E) Undeclared name "State0"
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(71) : C2233 (E) Illegal array reference
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(71) : C2500 (E) Illegal token "{"
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(71) : C2500 (E) Illegal token "{"
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(71) : C2500 (E) Illegal token "}"
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(72) : C2500 (E) Illegal token "int"
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(72) : C2225 (E) Undeclared name "State1"
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(72) : C2233 (E) Illegal array reference
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(72) : C2500 (E) Illegal token "{"
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(72) : C2500 (E) Illegal token "{"
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(72) : C2500 (E) Illegal token "}"
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(73) : C2500 (E) Illegal token "int"
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(73) : C2225 (E) Undeclared name "Shift"
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(73) : C2220 (E) Modifiable lvalue required for "="
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(74) : C2500 (E) Illegal token "char"
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(74) : C2225 (E) Undeclared name "Input"
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(74) : C2233 (E) Illegal array reference
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(74) : C2500 (E) Illegal token "{"
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(74) : C2500 (E) Illegal token "{"
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(74) : C2500 (E) Illegal token "}"
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(75) : C2500 (E) Illegal token "int"
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(75) : C2225 (E) Undeclared name "prevState"
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(75) : C2208 (E) Pointer required for "*"
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(75) : C2225 (E) Undeclared name "state1"
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(75) : C2220 (E) Modifiable lvalue required for "="
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(76) : C2500 (E) Illegal token "int"
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(76) : C2225 (E) Undeclared name "currState"
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(76) : C2208 (E) Pointer required for "*"
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(76) : C2225 (E) Undeclared name "state2"
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(76) : C2220 (E) Modifiable lvalue required for "="
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(79) : C2500 (E) Illegal token ":"
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(81) : C2500 (E) Illegal token "int"
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(81) : C2225 (E) Undeclared name "i"
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(83) : C2233 (E) Illegal array reference
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(83) : C2233 (E) Illegal array reference
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(83) : C2203 (E) Illegal member reference for "."
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(87) : C2500 (E) Illegal token "else"
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(97) : C2500 (E) Illegal token "int"
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(99) : C2233 (E) Illegal array reference
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(99) : C2233 (E) Illegal array reference
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(102) : C2233 (E) Illegal array reference
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(102) : C2203 (E) Illegal member reference for "."
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(104) : C2233 (E) Illegal array reference
C:\Dokumente und Einstellungen\tuxianer\Eigene Dateien\CASIO\fx-9860G SDK\Eingabe\Eingabe.c(104) : C2203 (E) Illegal member reference for "."

I take int instead of Bool, because bool also brings an error...

#29 Andreas B

Andreas B

    Casio Freak

  • Members
  • PipPipPipPip
  • 160 posts
  • Gender:Male
  • Location:Norway

  • Calculators:
    fx-9860G SD

Posted 24 February 2008 - 07:17 PM

At the line with "{KEY_CHAR_0, 'z', 'Z'},", you can not end with a comma.Ending the array with
{KEY_CHAR_0, 'z', 'Z'}
};
should work.
You may not have std::swap(), or strcat().
Check my last post for link to input code that uses GetKey(). You supply the row/column to show the input string, the buffer to get the data in, and the length of the buffer.

#30 tuxianer

tuxianer

    Casio Fan

  • Members
  • PipPip
  • 34 posts
  • Gender:Male
  • Location:Germany
  • Interests:Programming, Computer, Photography, ?C's, Electric

  • Calculators:
    CFX 9850 GB+
    FX 9860 SD

Posted 24 February 2008 - 08:16 PM

yes that ws realy an error, but the other errors are quit there...

#31 tuxianer

tuxianer

    Casio Fan

  • Members
  • PipPip
  • 34 posts
  • Gender:Male
  • Location:Germany
  • Interests:Programming, Computer, Photography, ?C's, Electric

  • Calculators:
    CFX 9850 GB+
    FX 9860 SD

Posted 26 February 2008 - 05:02 PM

or can it be an encoding error of the text?

#32 BiTwhise

BiTwhise

    Casio Overgod

  • [Legends]
  • PipPipPipPipPipPipPip
  • 627 posts
  • Gender:Male
  • Location:Guildford, Surry, UK
  • Interests:Programming, games, consoles, martial arts

  • Calculators:
    FX9700WE, CFX9970G, AFX2.0, Classpad 300

Posted 26 February 2008 - 05:30 PM

I don't quite understand what you're trying to say here.

It looks to me like you're struggling with some basic syntax and programming concepts.
If you're new to programming, the calculator SDK might not be a particularly good starting point.
Go out and do some generic C/C++ programming tutorials.
Get familiar with the process of programming - the compiler, the linker, and the debugger.
Learn to recognize common syntax errors.

A basic environment (editor + command line tools) will put you right in the trenches with the compiler and linker and force you to understand how they work.
Go with this if you want to learn and understand everything from the ground up.

A good IDE will introduce you to project structure and working with an integrated debugger.
Go with this if you want to get up and running with the tools quickly, and concentrate on the language and the operation of the software.


An embedded platform, like the calculator, will drop you right in with cross compilation, poor debugging, lack of libraries, and alot of other pain.
On the plus side, it's a finite environment - you can easilly learn almost all there is to learn about the platform. The OS and the SKD is usually quite small. This focused feeling might give you a sense of mastery and completeness.




By the way, for syntax errors, always look at the first error in your output as other errors will quite often follow from it.

#33 tuxianer

tuxianer

    Casio Fan

  • Members
  • PipPip
  • 34 posts
  • Gender:Male
  • Location:Germany
  • Interests:Programming, Computer, Photography, ?C's, Electric

  • Calculators:
    CFX 9850 GB+
    FX 9860 SD

Posted 26 February 2008 - 07:32 PM

I'am able to programm I think so. And I also wored with C scince a while. The only new thing for me is the Casio IDE. But in this case I think the is something wrong with the IDE. When I clik on the first Error there Appear a messag, that the file doesn't exist. Some Errors I got fixed but not all.

#34 2072

2072

    Casio over god

  • Admin
  • PipPipPipPipPipPipPipPip
  • 1564 posts
  • Gender:Male
  • Location:Somewherebourg
  • Interests:Alternative states of consciousness, programming, making things work the best they possibly can.

  • Calculators:
    AFX2 ROM 1.02, CFX-9940GT+, FX-180P-Plus

Posted 27 February 2008 - 02:17 AM

I don't know C++ but in C you can't initialize tables with a variable length.
so your numKeys should be a preprocessor macro:

#define numKeys 27


then the line:

Key keys[numKeys] =

should be replaced by

struct Key keys[numKeys] =


On line 61 there is an 'else' that is not related to an if....

in your for loop 'i' is declared several times in the same block... just put a "int i = 0" at the start of your AddIn_main function and remove the 'int' before the 'i' in the for loops...

there are othere errors such as the arguments of strcat those must be pointers....

I think you shoud do some C / C++ tutorials before continuing.

#35 tuxianer

tuxianer

    Casio Fan

  • Members
  • PipPip
  • 34 posts
  • Gender:Male
  • Location:Germany
  • Interests:Programming, Computer, Photography, ?C's, Electric

  • Calculators:
    CFX 9850 GB+
    FX 9860 SD

Posted 08 March 2008 - 10:17 PM

Ok i have a a working code:

int AddIn_main(int isAppli, unsigned short OptionNum)
  {
	  int Status_Alt[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
	  int Status_Neu[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
	  char Gross[] = {' ', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'};
	  char Zahlen[] = {'7', '8', '9', '4', '5', '6', 'x', '/', '1', '2', '3', '+', '-', '0'};
	  int Code[] = {KEY_CHAR_DP,KEY_CTRL_XTT,KEY_CHAR_LOG,KEY_CHAR_LN,KEY_CHAR_SIN,KEY_CHAR_COS,KEY
  _CHAR_TAN,KEY_CHAR_FRAC,KEY_CTRL_FD,KEY_CHAR_LPAR,KEY_CHAR_RPAR,KEY_CHAR_CO
MMA,K
 E
  Y_CHAR_STORE,KEY_CHAR_7,KEY_CHAR_8,KEY_CHAR_9,KEY_CHAR_4,KEY_CHAR_5,KEY_CHA
R_6,K
 E
  Y_CHAR_MULT,KEY_CHAR_DIV,KEY_CHAR_1,KEY_CHAR_2,KEY_CHAR_3,KEY_CHAR_PLUS,KEY
_CHAR
 _
  MINUS,KEY_CHAR_0};
	  int i;
	  int Alpha = 0;
	  int Stelle=0;
	  int laenge;
	  
	  int Exp;
	  Bdisp_AllClr_DDVRAM();
	  
	  while(1){
  
		  if(IsKeyDown(KEY_CTRL_ALPHA)) {
			  if(Alpha==0) {
				  Alpha=1;
			  } else {
				  Alpha=0;
			  }
			  while(!IsKeyUp(KEY_CTRL_ALPHA));
		  } 
		  for (i=0; i<27; ++i) {
			  Status_Alt[i]=Status_Neu[i];	
		  }
		  
		  for(i=0; i<27; ++i) {
			  Status_Neu[i]=IsKeyDown(Code[i]);
		  }
  
		  if(Alpha) {
			  for(i=0; i<27; ++i) {
				  if((Status_Alt[i]==0) && (Status_Neu[i]==1)) {
					  input[Stelle]=Gross[i];
					  Stelle++;	
				  }
			  }
		  }else{
			  for(i=13; i<27; ++i) {
				  if((Status_Alt[i]==0) && (Status_Neu[i]==1)) {
					  input[Stelle]=Zahlen[i-13];
					  Stelle++;
				  }
			  }
			   Nummer=atoi(Input);
			  }
  
		  }
  
		  if(IsKeyDown(KEY_CTRL_DEL) ){
			  Stelle--;
			  input[Stelle] =  ' ';
			  while(!IsKeyUp(KEY_CTRL_DEL)) {
			  }
		  }
		  
  
		  
		   PrintMini(0,0,(unsigned char*)input,MINI_OVER);
		   Bdisp_AllClr_DD();
		   Bdisp_PutDisp_DD();
		   Bdisp_AllClr_VRAM();
  
  
	  }
  
  }


#36 kucalc

kucalc

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Gender:Male
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly

    Computer graphics

  • Calculators:
    fx-9860G / fx-7400G Plus / Algebra FX 2.0+ / fx-9770G / CFX-9850G / CFX-9850GB+ / TI-89 / TI-nSpire

Posted 09 March 2008 - 12:01 AM

Cool, good job on getting it to work. :)

#37 tuxianer

tuxianer

    Casio Fan

  • Members
  • PipPip
  • 34 posts
  • Gender:Male
  • Location:Germany
  • Interests:Programming, Computer, Photography, ?C's, Electric

  • Calculators:
    CFX 9850 GB+
    FX 9860 SD

Posted 09 March 2008 - 11:06 AM

I have put it into a function code come next if you want you can add it to revolution fx.


void Input_Char (int x, int y, char * input)
 {
	 int status_old[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
	 int status_new[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
	 char big_letter[] = {' ', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'};
	 int code[] = {KEY_CHAR_DP,KEY_CTRL_XTT,KEY_CHAR_LOG,KEY_CHAR_LN,KEY_CHAR_SIN,KEY_CHAR_COS,KEY
 _CHAR_TAN,KEY_CHAR_FRAC,KEY_CTRL_FD,KEY_CHAR_LPAR,KEY_CHAR_RPAR,KEY_CHAR_COMMA,K
E
 Y_CHAR_STORE,KEY_CHAR_7,KEY_CHAR_8,KEY_CHAR_9,KEY_CHAR_4,KEY_CHAR_5,KEY_CHAR_6,K
E
 Y_CHAR_MULT,KEY_CHAR_DIV,KEY_CHAR_1,KEY_CHAR_2,KEY_CHAR_3,KEY_CHAR_PLUS,KEY_CHAR
_
 MINUS,KEY_CHAR_0};
	 int i;
	 int position=0;
	 int print;
	 
	 
	 while(!IsKeyDown(KEY_CTRL_EXE)){
 
		 if(position < 32) {
				for (i=0; i<27; ++i) {
				 status_old[i]=status_new[i];	
			 }
		 
				for(i=0; i<27; ++i) {
				 status_new[i]=IsKeyDown(code[i]);
				}
 
 
			 for(i=0; i<27; ++i) {
				 if((status_old[i]==0) && (status_new[i]==1)) {
						input[position]=big_letter[i];
					 position++; 
					 print=1;
					}
			 }
		 }
 
		 if (position>0) {
			 if(IsKeyDown(KEY_CTRL_DEL) ){
				 position--;
				 input[position] =  ' ';
				 print=1;
				 while(!IsKeyUp(KEY_CTRL_DEL));
			 }
		 }
		 
		 if(print==1) {
			 PrintMini(y,x,(unsigned char*)input,MINI_OVER);
				Bdisp_AllClr_DD();
			 Bdisp_PutDisp_DD();
			 Bdisp_AllClr_VRAM();
			 print=0;
		 }
	 }
 
 }
 
 
 
 float Input_Num (int x, int y)
 {
	 int status_old[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
	 int status_new[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
	 char numbers[] = {'.', '7', '8', '9', '4', '5', '6', 'x', '/', '1', '2', '3', '+', '-', '0'};
	 int code[] = {KEY_CHAR_DP,KEY_CHAR_7,KEY_CHAR_8,KEY_CHAR_9,KEY_CHAR_4,KEY_CHAR_5,KEY_CHAR_6,K
 EY_CHAR_MULT,KEY_CHAR_DIV,KEY_CHAR_1,KEY_CHAR_2,KEY_CHAR_3,KEY_CHAR_PLUS,KEY_CHA
R
 _MINUS,KEY_CHAR_0};
	 int i;
	 int position=0;
	 int number;
	 int print;
	 char input[] = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',  ' ', ' '};
	 
	 while(!IsKeyDown(KEY_CTRL_EXE)){
 
		 if(position < 32) {
				for (i=0; i<15; ++i) {
				 status_old[i]=status_new[i];	
			 }
		 
			 for(i=0; i<15; ++i) {
				 status_new[i]=IsKeyDown(code[i]);
			 }	
 
			 for(i=0; i<15; ++i) {
				 if((status_old[i]==0) && (status_new[i]==1)) {
						input[position]=numbers[i];
					 position++;
					 print=1;
				 }
				}
		 }
 
			 
 
		 if (position>0) {
			 if(IsKeyDown(KEY_CTRL_DEL) ){
				 position--;
				 input[position] =  ' ';
				 print=1;
				 while(!IsKeyUp(KEY_CTRL_DEL));
			 }
		 }
		 
		 
		 if(print==1) {
			 PrintMini(y,x,(unsigned char*)input,MINI_OVER);
				Bdisp_AllClr_DD();
			 Bdisp_PutDisp_DD();
			 Bdisp_AllClr_VRAM();
			 print=0;
			 number=atoi(input);
		 }
 
	 }
	 return number;
 }


#38 kucalc

kucalc

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Gender:Male
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly

    Computer graphics

  • Calculators:
    fx-9860G / fx-7400G Plus / Algebra FX 2.0+ / fx-9770G / CFX-9850G / CFX-9850GB+ / TI-89 / TI-nSpire

Posted 11 March 2008 - 01:30 PM

I have put it into a function code come next if you want you can add it to revolution fx.


Cool, I'll add it when I get the time and I'll give you proper credit. :)

#39 tuxianer

tuxianer

    Casio Fan

  • Members
  • PipPip
  • 34 posts
  • Gender:Male
  • Location:Germany
  • Interests:Programming, Computer, Photography, ?C's, Electric

  • Calculators:
    CFX 9850 GB+
    FX 9860 SD

Posted 11 March 2008 - 02:53 PM

NExt Time I will put the arrays into structs and add small letters. And i will try to return an array by the char function like i have done it with the num. I think this is also possible with structs.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users