Re: New to Ada, noticing something strange.



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
.



Relevant Pages

  • Re: Free FAT16 Filesystem
    ... being an honourable reason. ... Dave, I made every effort 3 weeks ago to have you understand that if you ... >>Murray did not mention Keil in his correspondence to you. ... >>both your compiler AND under Keil's, ...
    (comp.arch.embedded)
  • compiler and metadata, request opinions...
    ... a lot of the upper/middle compiler machinery is still lacking (such as ... embed the metadata directly into the object modules (the reason being that ... request for a particular piece of information is embedded in a symbol (sort ... it will be loaded into an in-memory version of the database. ...
    (comp.compilers)
  • misc: compiler and metadata...
    ... a lot of the upper/middle compiler machinery is still lacking (such as ... embed the metadata directly into the object modules (the reason being that ... request for a particular piece of information is embedded in a symbol (sort ... it will be loaded into an in-memory version of the database. ...
    (comp.lang.misc)
  • Re: "Sorting" assignment
    ... issue on some ancient compiler doesn't make a lot of sense. ... to his on a few commonly used platforms and compilers, ...  Be sure and call the swap ... reason to find algorithms which operate independent of it. ...
    (comp.programming)
  • Re: IMPLICIT NONE (F2k8+/-)
    ... >convention that has served Fortran for 50 years, is itself, no good ... >reason for change. ... >done, using implicit typing. ... The IBM 1130 compiler could do ...
    (comp.lang.fortran)