Re: New to Ada, noticing something strange.



mike.martelli@xxxxxxxxx wrote:
Ok, Randy sounds good here is my code.  I also tried compiling in on
Laptop with the latest GNAT compilier and I get the same results.

And as Randy said, the issue is with code that didn't look suspicious. IIUC.

function Convert2Character(strChar: String) return Character is
....
case Integer'Value(strChar) is
....
when others => return strChar(1);
....
			charDigit := Convert2Character(Integer'Image(charMap(charOp1) +
charMap(charOp2) + carry));

Here, the 'Image has a space for non-negative value (or a minus sign for negative values) in position 1.


-- Georg .



Quantcast