From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,dc9636dd2392f5bd,start X-Google-Attributes: gid103376,public From: "Amgarp" Subject: Problem with function return Date: 2000/04/02 Message-ID: <38e7a0c8$0$17676@businessnews.de.uu.net>#1/1 X-Deja-AN: 605745993 X-Trace: businessnews.de.uu.net 954704072 17676 193.155.170.164 Organization: Customer of UUNET Deutschland GmbH Newsgroups: comp.lang.ada X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Date: 2000-04-02T00:00:00+00:00 List-Id: Hi, please help me with the following Problem: Main programm: type color is (red,gree,blue); col:color; col:=some_function(parameter); Now, "some_function" returns of course a color type, but when the parameter is bad(e.g. an empty string), an exception will be raised. What should the function return then? Without a return statement in the e-handler there'll be a Programm_Error. Is there a way to prevent the line "col:=some_function(parameter);" to be evaluated, or should it just return "some"(but of course wrong) value? Thanks!