comp.lang.ada
 help / color / mirror / Atom feed
From: stt@henning.camb.inmet.com (Tucker Taft)
Subject: Re: Freezing points
Date: 1996/02/18
Date: 1996-02-18T00:00:00+00:00	[thread overview]
Message-ID: <DMzIA8.92J.0.-s@inmet.camb.inmet.com> (raw)
In-Reply-To: leschkes.824503590@ferret

Scott Leschke (leschkes@ferret.cig.mot.com) wrote:

: Could somebody out there simply and clearly enumerate all the items that
: constitute a freezing point for me.

Although I admit RM95 13.14, Freezing Rules, is not my favorite part of 
the reference manual (big <grin>), it does enumerate the freezing 
points, starting at paragraph 3:

 1) The *end* of a declarative_part, protected_body, or declaration of
    a library package/generic package.

 2) A *body* causes freezing of everything declared before it in the
    same declarative part.

 3) Each name, expression, or range causes freezing when appearing within:

     a) generic instantation (including default actuals that 
        are used implicitly)

     b) object_declaration (that is not a deferred constant)

 4) A record extension freezes its parent type

 5) A static expression causes freezing of its type, etc., where it occurs

 6) A non-static expression causes freezing where it occurs, unless
    it is part of a default expression/name; defaults don't cause freezing 
    until they are "used."

: For example, from messing with GNAT it appears that a numeric subtype
: definition with a range constraint constitutes a freezing point.
: ...
: I'm assume this is all perfectly correct from an LRM standpoint but the
: freezing point stuff has me a bit confused.

A range constraint contains two expressions (in general).
Expressions cause freezing, unless they are non-static default expressions.
Hence, a range constraint freezes the type of the range (see 13.14(12))..

: Scott Leschke..................................ph: 708-632-2786
: Motorola, Inc.................................fax: 708-632-3145
: Cellular Infrastructure Group...............email: leschkes@cig.mot.com

-Tucker Taft   stt@inmet.com   http://www.inmet.com/~stt/
Intermetrics, Inc.  Cambridge, MA  USA




       reply	other threads:[~1996-02-18  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <leschkes.824503590@ferret>
1996-02-18  0:00 ` Tucker Taft [this message]
1996-02-18  0:00   ` Freezing points 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