Re: New to Ada, noticing something strange.
- From: "Jeffrey R. Carter" <spam@xxxxxxxx>
- Date: Thu, 29 Sep 2005 18:39:54 GMT
mike.martelli@xxxxxxxxx wrote:
(I removed some extra white space so it would align better in the post)
You removed more than that.
I have some Put()/Put_Line() statements in AddDigits() for debugging purposes. The problem is in Convert2Character(), nothing was ever being returned by that function. I added the Put_Line(strChar) to make sure a correct value was being passed to it. Once I added that Put_Line() a value was being returned by the function and it was correct. It seems that a Put_Line() is needed for some reason or it does not do what it is supposed to do.
You don't have anything named Convert2character, nor do you have Chardigit or Carry declared anywhere, and you index a String by 1 without any reason to expect that 1 is in its range, so it's hard to tell what might be happening. I'm also not sure what you mean by nothing being returned; do you mean execution entered the function and stopped? An exception is raised?
In any case, if the only change you made was to add a Put_Line, then it appears you have a compiler bug. You didn't mention what compiler you're using, but you might want to inform your compiler vendor.
-- Jeff Carter "There's no messiah here. There's a mess all right, but no messiah." Monty Python's Life of Brian 84 .
- Follow-Ups:
- Re: New to Ada, noticing something strange.
- From: mike . martelli
- Re: New to Ada, noticing something strange.
- References:
- New to Ada, noticing something strange.
- From: mike . martelli
- New to Ada, noticing something strange.
- Prev by Date: Re: Range constraints on subprogram parameters?
- Next by Date: Re: Code completion in ada IDE's
- Previous by thread: New to Ada, noticing something strange.
- Next by thread: Re: New to Ada, noticing something strange.
- Index(es):
Relevant Pages
|