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-Thread: 103376,4c3f68493d9d2340 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!out01b.usenetserver.com!news.usenetserver.com!in04.usenetserver.com!news.usenetserver.com!uns-out.usenetserver.com!news.usenetserver.com!pc03.usenetserver.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Create a procedure with multiple arguments ... References: From: Stephen Leake Date: Mon, 07 Jan 2008 05:26:13 -0500 Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/22.1 (windows-nt) Cancel-Lock: sha1:96J021+QDKBcDeK6Dri9Pkx0cUw= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: b576d4781fd88e05e48ed24186 Xref: g2news1.google.com comp.lang.ada:19254 Date: 2008-01-07T05:26:13-05:00 List-Id: kug1977@web.de writes: > Hi @ all, > > I'm a beginner in Ada and have the following problem: > > - I'm using GNAT 4.3 on a MacOS X 10.4. and develop on the > OpenFirmware Interface. > - To connect to the Firmware, the IEEE 1275 define an Procedure call- > methode(), which can have up multiple arguments. IEEE 1275 define call- > method as followed: > > IN: [string] method, ihandle, stack-arg1, ..., stack-argP > OUT: catch-result, stack-result1, ..., stack-resultQ > > > In C, this is written as followed: static void *of_call(const char > *service, int nargs, int nret, ...), but how can I write such a thing > in Ada? The short answer is "you can't". You can declare several overloaded procedures, each with different arguments. -- -- Stephe