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=0.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_FROM_MSSP autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a277322e4aa032bf X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-30 07:39:16 PST Path: newsfeed.google.com!newsfeed.stanford.edu!feed.textport.net!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison References: <9cjham$lu4$1@eol.dd.chalmers.se> Subject: Re: math: passing function to function Message-ID: X-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request X-Complaints-To: abuse@newsranger.com NNTP-Posting-Date: Mon, 30 Apr 2001 10:38:48 EDT Organization: http://www.newsranger.com Date: Mon, 30 Apr 2001 14:38:48 GMT Xref: newsfeed.google.com comp.lang.ada:7053 Date: 2001-04-30T14:38:48+00:00 List-Id: In article <9cjham$lu4$1@eol.dd.chalmers.se>, Staffan Dittmer says... > >I've tried using access to subprogram types to make something like >function solver(fun: access to function to solve; ...) return long_float; >which usually compiles ok, but exits raising >constraint error as soon as the code gets more involved than the >rudimentary examples given in the RM. It was probably a real live Constraint_Error. That happens. Find the source, and fix it. If things are getting confusing for you, you might want to try throuroughly testing the "fun" function before attempting to pass it to "solver". Make sure to test around the boundries of all the types you use. --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html home email - mailto:dennison@telepath.com