comp.lang.ada
 help / color / mirror / Atom feed
From: rieachus@comcast.net
Subject: Re: Using Access Types for a simple solution
Date: Mon, 25 Jul 2016 14:39:04 -0700 (PDT)
Date: 2016-07-25T14:39:04-07:00	[thread overview]
Message-ID: <8388d572-b06f-45fe-aebe-78ce150a05cd@googlegroups.com> (raw)
In-Reply-To: <57963014$0$20650$e4fe514c@news.kpn.nl>

On Monday, July 25, 2016 at 11:28:22 AM UTC-4, ldries46 wrote:
> Thanks Dimitri,
> 
> I did not realise that the aliased not before the array comes but before the 
> box.
> The suggestion you did I tried before but the code became to complicated to 
> be still readable.
> May be this not the best way to tackle my problem but is is better readable 
> and therefore better maintainable

I first read this hours ago, then left it to simmer while I went to a doctor's appointment.  I am sure solving your programming problem in Ada is easy.  What you need to learn first though is how to think about problems to be solved in Ada.

It has been over 25 years since I tripped over the most important rule of software engineering (not programming!) in Ada.  Model the problem space, not the solution.  There may be lots of programs needed in a given problem space, and you quickly learn that requirements change rapidly, even after they have been frozen. ;-(

All I know so far is that you have a collection of records (called Boxes) and it may make sense to address them by row and column, or by pointer (access value in Ada).  What activities make sense for your Boxes?  Creation? modifying contents? sort? on what key? print? write to a file?  Have them chase each other around the screen?

There are other possibilities.  The Ada standard library has lots of different types of collections depending on what you need to do with them.  It may be that a two-dimensional array is what the requirements assume. (But you know what I think about requirement documents.) 


  reply	other threads:[~2016-07-25 21:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-25 13:35 Using Access Types for a simple solution ldries46
2016-07-25 14:28 ` Dmitry A. Kazakov
2016-07-25 15:27 ` ldries46
2016-07-25 21:39   ` rieachus [this message]
2016-07-26 18:16 ` Aurele
replies disabled

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