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,LOTS_OF_MONEY autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4204eddb984f308e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-17 15:04:52 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!news-out.cwix.com!newsfeed.cwix.com!prodigy.com!news.stealth.net!news.stealth.net!news-out.nuthinbutnews.com!propagator2-sterling!news-in-sterling.newsfeed.com!news-in.nuthinbutnews.com!intgwlon.nntp.telstra.net!news.telstra.net!news-server.bigpond.net.au!not-for-mail From: "Greg Bek" Newsgroups: comp.lang.ada References: Subject: Re: Apex 4.2 question about records X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Message-ID: Date: Sun, 17 Nov 2002 23:04:51 GMT NNTP-Posting-Host: 144.136.192.163 X-Complaints-To: news@bigpond.net.au X-Trace: news-server.bigpond.net.au 1037574291 144.136.192.163 (Mon, 18 Nov 2002 10:04:51 EST) NNTP-Posting-Date: Mon, 18 Nov 2002 10:04:51 EST Organization: BigPond Internet Services (http://www.bigpond.net.au) Xref: archiver1.google.com comp.lang.ada:31014 Date: 2002-11-17T23:04:51+00:00 List-Id: Nelson, You also asked what did the message mean. In earlier releases of Apex it was usual to pass structured types by reference, this meant that the address of the actual data was passed to the called routine. In many instances this was inefficient as temporary data had to be copied to memory, an address to that memory was then passed to the called routine which then used that address to fetch the data from memory. The nett result was a number of data moves to/from memory that are wasteful of time. In Apex 4.2 the compiler will recognise a class of data types (see the release note for details) that no longer need to be stored in memory, but will instead be stored in machine registers (probably where the values are already). This way the called subprogram doesn't have to retrieve the data from memory. This results in a significant time saving. Probably the best example would be a complex number type that is defined as a record with two floating point components. With Apex 4.2 the components are passed in registers, which usually results in a significant speed up of applications relying heavilly upon these types. The warning is there because it is possible that people have written code that assumes values of these types are passed as references and try to use them as such. A good example would be someone using packaing Machine_Code that accesses these parameters. Pragma Suppress_Warning can be used to supress the message. Once again refer to the release note. Greg Bek Rational Software "Hartmut Schaefer" wrote in message news:xUdB9.436993$DB1.4976953@news.easynews.com... > Nelson, > > you can turn this warnings off by the new "pragma suppress_warnings". This > pragma turns off the warning on a per type basis. There is no "global" way, > e.g. per view or per unit. I must admit that this might be laboringly. > > There are also 2 implementation defined parameters of pragma Convention > dealing with the method how parameters are passed: Ada_Pass_By_Copy and > Ada_Pass_By_Reference. > > Please have a look into the 4.2 release notes for a detailed description of > these new features. If you have further questions or comments don't hesitate > to contact our support. > > Hartmut Schaefer > Rational Software Germany > > dealing with the pass method of parameters: pragma > "Nelson Chandler" schrieb im Newsbeitrag > news:H4IBt8.KM5@news.boeing.com... > > Hi. I'm using Apex 4.2. When I compile and it reaches a record type, I > get > > this warning: > > > > " is passed by copy, but it was passed by reference in > releases > > prior to Apex 4.2; this may cause incompatibilities" > > > > What does this mean and why is it telling me. It seems like record types > > would be fairly common and its extreemly annoying getting this message all > > the time. > > > > Thanks, > > Nelson > > > > > >