From: "Nasser M. Abbasi" <nma@12000.org>
Subject: Re: How to initialize a matrix of one column only?
Date: Sat, 07 Jul 2012 19:20:38 -0500
Date: 2012-07-07T19:20:38-05:00 [thread overview]
Message-ID: <jtajop$2kd$1@speranza.aioe.org> (raw)
In-Reply-To: jtaj2c$18k$1@speranza.aioe.org
On 7/7/2012 7:08 PM, Nasser M. Abbasi wrote:
> 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));
> ....
> --------------------------------------------
....
>
> I tried B:=(1=>9.0,2=>2.03=>-2.0);
> and B := ((9.0 ,2.0 , 3));
> but non working.
>
> What is the correct syntax to use?
>
I found it !
But it makes no sense at al to me. Here is the correct syntax
------------------
N: Fortran_Integer := 3;
B: labase.Fortran_Real_Matrix ( 1..N, 1..1 );
BEGIN
B := ((9.0, others=>0.0),
(2.0, others=>0.0),
(-2.0, others=>0.0)
);
----------------------
Why do I have to write others=>0.0 ? What others? there is
only 1 column? What Am I missing here?
--Nasser
next prev parent reply other threads:[~2012-07-08 0:20 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 [this message]
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
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