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,3deb0e7ecee0ee8a X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "(see below)" Newsgroups: comp.lang.ada Subject: Re: Access to C_float wipes out float value Date: Fri, 20 Aug 2010 03:05:34 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: individual.net RXNfqTpHw94NJKeI0ULmPAyQSNBUZ+jgtgg5m6HzYhnO9t1hVQ Cancel-Lock: sha1:wK+PWAL/h4d7ZJ7tpS60VnENGx4= User-Agent: Microsoft-Entourage/12.23.0.091001 Thread-Topic: Access to C_float wipes out float value Thread-Index: ActADCx3/UdSnVX7NEyaqDZEkL/rcA== Xref: g2news1.google.com comp.lang.ada:13523 Date: 2010-08-20T03:05:34+01:00 List-Id: On 20/08/2010 02:40, in article e42a0d91-535b-4f75-8ae6-58238a51d84c@x24g2000pro.googlegroups.com, "deadlyhead" wrote: > I really want to know what's going on here. > > Maybe my problem is my dislike of C in general, and a subsequent lack > of understanding? I plan on implementing a nice thick binding as this > project progresses, so I'll be getting around this anyway. Thank you > if you can provide any insight, though. The integer variant only work co-incidentally. Your C function returns a pointer to a local variable which is invalidated as soon as the function returns. -- Bill Findlay chez blueyonder.co.uk