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,3ed9aea76d58b2ba X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-09-13 09:00:01 PST Newsgroups: comp.lang.ada Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!news.tufts.edu!uunet!dca.uu.net!ash.uu.net!world!news From: Robert A Duff Subject: Re: IEEE arithmetic Sender: news@world.std.com (Mr Usenet Himself) Message-ID: Date: Fri, 13 Sep 2002 15:59:24 GMT References: NNTP-Posting-Host: shell01.theworld.com Organization: The World Public Access UNIX, Brookline, MA X-Newsreader: Gnus v5.7/Emacs 20.7 Xref: archiver1.google.com comp.lang.ada:28939 Date: 2002-09-13T15:59:24+00:00 List-Id: Duncan Sands writes: > Note: the GNU C library has a routine for doing this, but the constants > you feed it to choose the rounding mode seem to have architecture > dependent values (macros are used to give these values common names). > One solution would be to have a way to get hold of the values given by the > macros inside of the Ada program, but I don't know how to do this. If you use the version SofCheck's AdaMagic that generates C, you can call C macros from Ada using pragma Import. Most compilers don't allow that, however. Another way to call a macro is to write a C function that calls the macro. Then use pragma Import to call the C function from Ada. That's kind of annoying if the reason it's a macro is to get inline code. But that's probably not your case -- you probably don't want to set the mode repeatedly in a tight loop. - Bob