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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,565ee1c43df7874f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-09-10 09:20:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!news-feed1.de1.concert.net!fu-berlin.de!news.iucc.ac.il!not-for-mail From: "Ehud Lamm" Newsgroups: comp.lang.ada Subject: Re: array of operations Date: Tue, 10 Sep 2002 19:09:55 +0200 Organization: Ehud Lamm Message-ID: References: <3D7E0EB1.2070708@attbi.com> NNTP-Posting-Host: di3-24.dialin.huji.ac.il X-Trace: news.iucc.ac.il 1031674593 15398 132.64.13.24 (10 Sep 2002 16:16:33 GMT) X-Complaints-To: abuse@news.iucc.ac.il NNTP-Posting-Date: Tue, 10 Sep 2002 16:16:33 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Xref: archiver1.google.com comp.lang.ada:28804 Date: 2002-09-10T19:09:55+02:00 List-Id: "Mark Biggar" wrote in message news:3D7E0EB1.2070708@attbi.com... > marco wrote: > > Do you know if there is some way of bulding up arrays of functions and/or > > procedures?... > > Sure, Ada allows for access types to functions and procedures so you > construct an array of those. Notice that all the procedures must have the same parameter profile. There are cases where this isn't what you want. There are also nesting issues (you can't have a top level array linking to nested subroutines) [Note to language lawyers: The last sentence was not meant to be a formal definition...] So in many cases you may decide (after thinking about "access procedure" and "access function") to use a dispatching routine that is invoked with an "opcode" (operation code) and calls the appropriate routine. Ehud