Problem with glkGetInt

I am trying to use the glkGetInt function provided with KPCUSTKEYPAD.LIB with an OP7200. This function displays an onscreen keypad for entering an integer. I have two problems

When compiling I get a warning “line 374 : WARNING SCREEN.LIB : Demotion of value may lose digits.” Line 374 is the line that has the glkGetInt function in the code below.

When running my program, it says the value entered is out of range no matter what I use.

My code is below:

	static int done;
	static int RetInt;
	const static int Minimum = 0;
	const static int Maximum = 65535;
	const static int NbrDigits = 5;
	RetInt = NetworkParameters.port;

	done = FALSE;
	while (!done)
			keyProcess();			// scan for key presses
			waitfor(DelayMs(20));		// key debounce period
			waitfor (glkGetInt(&RetInt, Minimum, Maximum, NbrDigits, &Glk14x16, &Glk10x12, "ENTER NEW PORT NUMBER
			NetworkParameters.port = RetInt;
			done = TRUE;

I am new to programming with the rabbit, so I suspect I am doing something wrong but I have used the glkGetString functions and had no problems.

Any help would be much appreciated.

Ints are signed 16bit values with a range of -32768 to +32767. The value 65535 is probably being interpreted as -1 so you are giving a min of 0 and a max of -1 as your limits.


That was it, thanks!