I don't understand at all this program.. It seems to intend to make a point about something, I guess... but then, there is a logic error I think in the Quadruple function..
I'm new to Ada and I can't go past this example..

https://learn.adacore.com/courses/intro-to-ada/chapters/subprograms.html#function-calls