comp.lang.ada
 help / color / mirror / Atom feed
From: Rod Chapman <rod@praxis-cs.co.uk>
Subject: Re: How do functions return unbounded arrays?
Date: 1998/06/17
Date: 1998-06-17T00:00:00+00:00	[thread overview]
Message-ID: <35879C27.634A3E0@praxis-cs.co.uk> (raw)
In-Reply-To: 6m80o6$9st$1@erlang.praxis-cs.co.uk


> They are in general forbidden in SPARK.
> However, the "&" operator is allowed on string literals as you would expect a
> compiler to handle this case statically.

Your mileage varies...

In Ada83, things which you "expect the compiler to handle statically" often
aren't.  Some compilers are better at spotting static expressions
above-and-beyond
what is strictly required by the Ada83 LRM (e.g. XD-Ada).  Some stick more
closely
to the letter of the law and generate more dynamic code for expressions even if
they
_could_ be evaluated statically (e.g. the "old" Alsys technology)

In Ada95 (and thus SPARK95), things are much better, since the definition
of "static" covers a much larger set of expressions, and the RM's implementation
advice gives you a pretty clear idea of what to expect.

For critical and real-time work, I _always_ check with the compiler vendor
and/or read the generated code for these bits of the language.
 -  Rod Chapman
   rod@praxis-cs.co.uk






  reply	other threads:[~1998-06-17  0:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-06-14  0:00 How do functions return unbounded arrays? Markus Kuhn
1998-06-14  0:00 ` Robert A Duff
1998-06-15  0:00 ` John Herro
1998-06-17  0:00   ` Matthew Heaney
     [not found]   ` <35865075.9D7DCBD@cl.cam.ac.uk>
1998-06-17  0:00     ` Matthew Heaney
1998-06-21  0:00       ` Robert Dewar
1998-06-17  0:00     ` Gavin Finnie
1998-06-17  0:00       ` Rod Chapman [this message]
1998-06-21  0:00         ` Robert Dewar
1998-06-21  0:00         ` Robert Dewar
1998-06-21  0:00       ` Robert Dewar
1998-06-18  0:00     ` Mats Weber
1998-06-21  0:00       ` Robert Dewar
1998-06-17  0:00   ` Mark D. McKinney
1998-06-21  0:00   ` Robert Dewar
replies disabled

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