From: Stephen Leake <stephen_leake@stephe-leake.org>
Subject: Re: How to initialize a matrix of one column only?
Date: Sun, 08 Jul 2012 03:43:57 -0400
Date: 2012-07-08T03:43:57-04:00 [thread overview]
Message-ID: <85hatilmte.fsf@stephe-leake.org> (raw)
In-Reply-To: jtaj2c$18k$1@speranza.aioe.org
"Nasser M. Abbasi" <nma@12000.org> 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
next prev parent reply other threads:[~2012-07-08 7:43 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-08 0:08 How to initialize a matrix of one column only? Nasser M. Abbasi
2012-07-08 0:20 ` Nasser M. Abbasi
2012-07-08 1:47 ` John B. Matthews
2012-07-08 2:09 ` Nasser M. Abbasi
2012-07-08 17:05 ` Brian Drummond
2012-07-13 15:19 ` Robert A Duff
2012-07-13 16:11 ` gautier_niouzes
2012-07-08 7:27 ` Simon Wright
2012-07-08 7:43 ` Stephen Leake [this message]
2012-07-08 22:56 ` Jerry
2012-07-09 9:35 ` Simon Wright
2012-07-12 4:13 ` Jerry
2012-07-12 8:50 ` Simon Wright
2012-07-13 23:15 ` Jerry
2012-07-14 9:46 ` Simon Wright
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox