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.7 required=5.0 tests=BAYES_00,DATE_IN_PAST_24_48, FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,222ed89632aabb93 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.224.59.73 with SMTP id k9mr1363438qah.4.1343313794695; Thu, 26 Jul 2012 07:43:14 -0700 (PDT) Received: by 10.66.74.40 with SMTP id q8mr1620809pav.19.1343313794597; Thu, 26 Jul 2012 07:43:14 -0700 (PDT) Path: a15ni113198934qag.0!nntp.google.com!q21no1394768qas.0!news-out.google.com!b9ni64845167pbl.0!nntp.google.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!border2.nntp.ams.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.straub-nv.de!news.swapon.de!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!usenet-fr.net!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!217.188.199.168.MISMATCH!takemy.news.telefonica.de!telefonica.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Wed, 25 Jul 2012 11:26:16 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Free AMD Core Math Library (BLAS/LAPACK) + Ada References: <41b74e89-f112-4791-883d-236080652dbf@googlegroups.com> <509991f4-bcb4-45a0-84f3-b8393db64da4@googlegroups.com> <374bd898-5683-4350-8812-e3cae186ab2b@googlegroups.com> <87k3y3jxgj.fsf@ludovic-brenta.org> <23edac82-3e0e-47f5-85b7-36473e4a44ed@googlegroups.com> <8d88395a-9e03-4880-9728-aa0489dbc62f@googlegroups.com> <4d5e7463-824c-4ac1-af47-2a4a5bf0d8e6@googlegroups.com> <27d45d4b-0924-4179-9a05-169ab10839ce@googlegroups.com> <847049f2-fe53-47b2-be81-50787c5a6290@googlegroups.com> In-Reply-To: <847049f2-fe53-47b2-be81-50787c5a6290@googlegroups.com> Message-ID: <500fbbbb$0$9512$9b4e6d93@newsspool1.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 25 Jul 2012 11:26:19 CEST NNTP-Posting-Host: 2e2aa51c.newsspool1.arcor-online.net X-Trace: DXC=AD>9h^cnTmd<6cDJZfMd_cic==]BZ:afn4Fo<]lROoRankgeX?EC@@`V59:cPRXS:fnc\616M64>jLh>_cHTX3jmoPN7[nSELFe X-Complaints-To: usenet-abuse@arcor.de Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Date: 2012-07-25T11:26:19+02:00 List-Id: On 25.07.12 10:56, Ada novice wrote: > >> How can you say that? > > I was thinking that the -gnat2012 switch should do the trick. Or was this new for loop feature added much later? > > So to what extent this -gnat2012 in GPL 2011 is effective? > >> You can simply for now, change the above LOOP to use standard Ada loop >> and not the new enhanced LOOP above, and all will be OK. Or use GNAT 2012 >> and leave the source as is. > > If I modified the for construct to say: > > for x in b'Range loop -- print solution > real_io.PUT (x'img); new_line; > end loop; > > that doesn't work: > > $ gnatmake -gnat2012 -I../ada mysolve2.adb > gcc -c -gnat2012 -I../ada mysolve2.adb > mysolve2.adb:40:21: no candidate interpretations match the actuals: > mysolve2.adb:40:21: missing argument for parameter "Item" in call to "Put" declared at a-tiflio.ads:78, instance at line 11 > mysolve2.adb:40:21: missing argument for parameter "Item" in call to "Put" declared at a-tiflio.ads:60, instance at line 11 > mysolve2.adb:40:28: expected type "Interfaces.Fortran.Real" > mysolve2.adb:40:28: found type "Standard.String" > mysolve2.adb:40:28: ==> in call to "Put" at a-tiflio.ads:67, instance at line 11 > gnatmake: "mysolve2.adb" compilation error > > So how to properly output the x vector? real_io is likely an instance for floating point types. "x in b'range" means x is of the index type of the array. 'img is a non-Ada extension of GNAT for lazy writers, intended to be used with pragma Debug. It's result is of a string type, real_io.Put needs a floating point value. "x of b" in terms of Ada 2012 means x is of the component type of b, not of the index type of b. It is what real_io.Put needs. -- -- Georg Bauhaus Y A Time Drain http://www.9toX.de