comp.lang.ada
 help / color / mirror / Atom feed
From: dst17!mab@ford-wdl1.arpa  (Mark A Biggar)
Subject: Re: Don't we already have a 'Valid? (was Re: Unchecked_Conversion...)
Date: 10 Sep 93 17:06:16 GMT	[thread overview]
Message-ID: <1993Sep10.170616.22415@wdl.loral.com> (raw)

In article <26q196INNl1t@umbc4.umbc.edu> berman@umbc.edu (Mike Berman) writes:
>The prior discussion on unchecked_conversion has quite adequately
>explained why the code I excerpted operates the way it does. The result
>of the unchecked_conversion makes the program erroneous if it is not a
>valid member of the target type.
>The real question is why does the "type_mark" form of the "in" operator
>exist? Most people use "in" solely for checking ranges within a scalar
>type, but it is defined to operate on _any_ type. Since it can't be used
>to check the results of unchecked_conversions, then why is it defined
>for nonscalar types?

Well in 9x, with tagged types it is useful for asking if a classwide
variable is of a given tagged type.

>And, as the subject line suggests, why not use the already-defined
>syntax for the "in" operator _instead_ of adding the 'Valid attribute?

The complier is allowed to optimize way an "in" operator, but is specifically
forbiden to touch a 'VALID, otherwise they should act the same.

--
Mark Biggar
mab@wdl.loral.com

             reply	other threads:[~1993-09-10 17:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-09-10 17:06 Mark A Biggar [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-09-16 17:39 Don't we already have a 'Valid? (was Re: Unchecked_Conversion...) Tucker Taft
1993-09-16 16:25 cis.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!howland.
1993-09-13 13:41 Norman H. Cohen
1993-09-10 20:49 Robert I. Eachus
1993-09-10 15:07 cis.ohio-state.edu!news.sei.cmu.edu!magnesium.club.cc.cmu.edu!honeydew.sr
1993-09-10 14:00 Mike Berman
replies disabled

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