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.1 required=5.0 tests=BAYES_05,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,688b25ba856f42d7 X-Google-Attributes: gid103376,public From: Philip Anderson Subject: Re: question about functions (bis) Date: 2000/01/21 Message-ID: <38883285.AB6ED64C@gecm.com>#1/1 X-Deja-AN: 575659502 Content-Transfer-Encoding: 8bit References: <8690s0$8tq$1@news.mgn.net> X-Accept-Language: en Content-Type: text/plain; charset=iso-8859-1 X-Trace: 21 Jan 2000 10:22:13 GMT, 141.196.71.191 Organization: Alenia Marconi Systems ISD MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-01-21T00:00:00+00:00 List-Id: Pascal LEJEUNE wrote: > > function ADD (A, B : in T) return T is > tmp : system.address; > begin > << find the address of the result (that's my problem !!) >> and > put it in a local variable (tmp) > > call a procedure which use directly the hardware : > proc (a'address, b'address, tmp); > end ADD; > > So, the problem is quite simple : the type T is a "numerical" type > on which it is normal to have operators ... but the hardware need > to have the address of the arguments and the address of the result !!! Can't you simply write: function ADD (A, B : in T) return T is tmp : T; begin -- call a procedure which directly uses the hardware : -- proc (a'address, b'address, tmp'address); return tmp; end ADD; -- hwyl/cheers, Philip Anderson Alenia Marconi Systems Cwmbr�n, Cymru/Wales