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,26e047a7a0709881 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.223.73 with SMTP id qs9mr18006641pbc.7.1341733437549; Sun, 08 Jul 2012 00:43:57 -0700 (PDT) Path: l9ni11158pbj.0!nntp.google.com!news2.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: How to initialize a matrix of one column only? References: Date: Sun, 08 Jul 2012 03:43:57 -0400 Message-ID: <85hatilmte.fsf@stephe-leake.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (windows-nt) Cancel-Lock: sha1:zoQPE1qol1FAO0UTWy7GY4HIQ3A= MIME-Version: 1.0 X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: 479fe4ff93a3de029e66110104 X-Received-Bytes: 1349 Content-Type: text/plain Date: 2012-07-08T03:43:57-04:00 List-Id: "Nasser M. Abbasi" writes: > Here is the code, I write > > ---------------------- > with Interfaces.Fortran; > use Interfaces.Fortran; > with lbase; > .... > N: Fortran_Integer := 3; > B: labase.Fortran_Real_Matrix ( 1..N, 1..1 ); > BEGIN > B := ((9.0) , -- here is the problem > (2.0) , > (-2.0)); There is an ambiguity in Ada syntax; a parenthesized expression looks like a one-element aggregate. To distinguish the two cases, you must use named association for one-element aggregates: B := ((1 => 9.0) , -- here is the problem (1 => 2.0) , (1 => -2.0)); -- -- Stephe