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,9d66743a9fdd96bd X-Google-Attributes: gid103376,public From: "Pascal LEJEUNE" Subject: question about functions Date: 2000/01/21 Message-ID: <8690q7$8tc$1@news.mgn.net>#1/1 X-Deja-AN: 575615325 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3612.1700 X-Complaints-To: usenet@news.mgn.net X-Trace: news.mgn.net 948438663 9132 194.117.219.2 (21 Jan 2000 07:11:03 GMT) Organization: Matra Grolier Network NNTP-Posting-Date: 21 Jan 2000 07:11:03 GMT Newsgroups: comp.lang.ada Date: 2000-01-21T07:11:03+00:00 List-Id: Hello everybody, Thank you for your replies !!!! What I want to do, is to give my user the possibility of operators to a type (for example C := A + B, C := A - B, C := A < B ...). This type is not very complex (a record of 4 bytes). Then, my operator is a rename of a function, for example : function "+" (A, B : in T) return T renames ADD; Finaly, my function ADD use a hardware component which do the operation with the addresses (it's an asic which needs to know on which variable the operation is done) : 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 !!! I hope i'll find a "nice" solution (ie in Ada or C), but if it is impossible, i'll use ASM ! Thank you !!! Pascal LEJEUNE