comp.lang.ada
 help / color / mirror / Atom feed
From: "Peter C. Chapin" <pcc482719@gmail.com>
Subject: Re: Array initialization in SPARK
Date: Thu, 28 Oct 2010 07:51:15 -0700 (PDT)
Date: 2010-10-28T07:51:15-07:00	[thread overview]
Message-ID: <3c36d3ba-6748-4aa9-9304-a219b11415bb@30g2000yql.googlegroups.com> (raw)
In-Reply-To: 03b3b80e-9313-45b8-939a-7dde7780288c@y23g2000yqd.googlegroups.com

On Oct 28, 8:47 am, Phil Thornley <phil.jpthorn...@gmail.com> wrote:

> It's far better to use the accept annotation (which is there for this
> sort of situation):

Thanks for the suggestion. I can see the value of accept here.

In this case its pretty obvious that the entire output matrix is being
assigned. I have a couple of other procedures with a similar issue but
where it is much less obvious that they are setting values for all
matrix elements (they are supposed to be doing so). I can see that
while accept is a useful tool one would have to be careful about
sprinkling them around too liberally. I'll take a closer look at those
other procedures and see if a little code reorganization might be
desirable.

Thanks again!

Peter



  reply	other threads:[~2010-10-28 14:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-28 10:13 Array initialization in SPARK Peter C. Chapin
2010-10-28 12:47 ` Phil Thornley
2010-10-28 14:51   ` Peter C. Chapin [this message]
2010-10-28 15:23     ` Peter C. Chapin
2010-10-28 16:26       ` Alexander Senier
2010-10-28 16:38         ` Phil Thornley
2010-10-30  1:04           ` Phil Clayton
2010-10-30  8:10             ` AdaMagica
2010-10-30 13:11               ` Phil Clayton
  -- strict thread matches above, loose matches on Subject: below --
2009-06-15 12:01 xorque
2009-06-15 12:10 ` xorque
replies disabled

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