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,a44046be0e2c612d X-Google-Attributes: gid103376,public From: Alfred Hilscher Subject: Re: Multi-dimensional Array of Functions ? Date: 2000/05/05 Message-ID: <3912D6C8.9188250B@icn.siemens.de>#1/1 X-Deja-AN: 619590145 Content-Transfer-Encoding: 7bit References: <169b2ded.062ddfc5@usw-ex0109-068.remarq.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Siemens AG Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-05-05T00:00:00+00:00 List-Id: John O'Malley wrote: > > I am a newbie to ada and I am looking for an example of an > array of functions. The project I am currently working on > has a procedure which is a gaint case statement with nested > cases that make function calls. This procedure is > unreadable and could easily be reduced by 99% by using a > multidimensional array containing pointers to functions. You want put C code to Ada ? Did you think about whether there would be a possiblilty to do it more "Ada like" ? > I know how to create an array of pointers to functions in C > and I was wondering if this is even possible in ada 83 or It should be. > 95. If it is possible, do all the functions in the array > have to be formatted the same (i.e same pass and return > parameters)? Yes. > Any help and/or examples would be appreciated. Look into the archives in Dejanews. There was a similar question a few weeks ago. > Thanks, > > John