dummy@e.mail (Emmanuel M. D�carie) writes: > Hello, > > I need 2 functions. > > Function 1 will take for input an integer and will return the number as a > string. > > Function 2 will reverse this action, i.e. will take a string that contains > a integer and will return an integer. > > Can anybody suggest me a way to do this, or point me to a faq. > > I'm just starting with Ada, and I can find anything on this in "Ada 95 > From the Beginning" and in "Ada 95 Problem Solving and Program Design. Think about it a bit. Function 1 requires you to build up a string piece by piece. Can you work out how to decide how many 1000s, 100s, 10s, units and so on the number contains? Then you would just need to work out how to join the characters together. Similarly the 2nd function - work out what each character means in terms of numerical value and then add them together. It's not as hard as it seems. Cheers, Chris p.s. there are some helpful functions in the back of the Ada Language Reference Manual (findable on the web if you don't have it). -- Chris Morgan Home Web Server - http://mihalis.dyn.ml.org/index.html