tmoran@bix.com escribi� en mensaje ... >>this program i have a procedure that must do something if it's parameters >>meet a certain condition; otherwhise it must exit. > Do you mean the procedure must exit in the sense of return, or exit >in the sense of stopping the program? Your C examples suggests the >latter. Thats the idea !!! when something goes wrong display a message and stop. > You could use "pragma import" on the C "exit" procedure and just >call it, exactly as your C program does. Your code using an exception >is fine except that it catches the exception, prints the error message, >and then tries to drop out the bottom of the function without returning >any value. You probably want to add a "raise;" statement after >the Put, to re-raise the exception. Ok, thanks for the advice, remember that this are my first programas in ADA and still i'm not very familiar with the languaje. > Note also that some compilers are only half-smart and will give a >warning on the construct >[..] >because the compiler realizes that if the program takes the "else" >branch it will drop out the bottom of the function without returning >any value, but the compiler doesn't realize that some_exception will >be raised and prevent reaching the bottom of the function. It does give me a warning, but some thing do happen to some C/C++ compilers so i didn't bothered in that message Thanks Andres Tarallo