comp.lang.ada
 help / color / mirror / Atom feed
From: "zork" <zork@nospam.com>
Subject: Re: unconstrained array type problems
Date: Thu, 22 Jul 2004 03:35:00 +1000
Date: 2004-07-22T03:35:00+10:00	[thread overview]
Message-ID: <40fea9b7@dnews.tpgi.com.au> (raw)
In-Reply-To: 87vfghl456.fsf@insalien.org


"> begin
>    Get (File, number_rows_1);
>    Get (File, number_columns_1);
>    Get (File, number_rows_2);
>    Get (File, number_columns_2);
>
>    declare
>       array1: Matrix_Type (1 .. number_rows, 1 .. number_columns);
>       array2: Matrix_Type (1 .. number_rows, 1 .. number_columns);
>    begin
>       -- read in array1
>       -- read in array2
>       -- multiply array1 by array2 (array multiplication)
>    end;
> end;

Thanks, yes that would work if the arrays each had its own data file. But
what i find difficult to grasp is that what if the data is contained in one
file:

-----
row1
column1
elements or array1
row2
column2
elements of array2
..
-----

I need to:

---
open (file)

read in dimensions of array1
create the array1
fill the array1

read in dimensions of array2
create the array2
fill the array2

close (file)

allow the arrays to interact with one another
---

I cannot see a way around this.

thanks
zork





  parent reply	other threads:[~2004-07-21 17:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-21 15:04 unconstrained array type problems zork
2004-07-21 15:09 ` Ludovic Brenta
2004-07-21 15:33   ` zork
2004-07-21 15:54     ` Marius Amado Alves
2004-07-21 16:24       ` Ludovic Brenta
2004-07-21 17:33         ` Georg Bauhaus
2004-07-21 17:35         ` zork [this message]
2004-07-21 18:30           ` tmoran
2004-07-21 23:11             ` zork
2004-07-22  7:57     ` Martin Krischik
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox