comp.lang.ada
 help / color / mirror / Atom feed
From: "Grein, Christoph" <christoph.grein@eurocopter.com>
Subject: Re: Signed integer to modular type conversion
Date: Thu, 16 May 2002 06:39:42 +0200 (MET DST)
Date: 2002-05-16T06:39:42+02:00	[thread overview]
Message-ID: <mailman.1021524187.24517.comp.lang.ada@ada.eu.org> (raw)

From: Mark Johnson <mark_h_johnson@raytheon.com>
> PS: I don't generally recommend this solution because many use it to
> excess. Try...
>   with Unchecked_Conversion;
>   function "+" is new Unchecked_Conversion(Integer, Mod_Type);
> Then your example assignment will be...
>   Y := +X;
> The abuse comes from using this method for all sorts of type
> conversions, avoiding type safety, etc.

Did you really observe much abuse? This affords so much more wording than a 
simple type conversion, so why should someone abuse it?



             reply	other threads:[~2002-05-16  4:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-16  4:39 Grein, Christoph [this message]
2002-05-16 14:13 ` Signed integer to modular type conversion Mark Johnson
  -- strict thread matches above, loose matches on Subject: below --
2002-05-15  5:43 Grein, Christoph
2002-05-15  2:53 Adam Beneschan
2002-05-15  3:34 ` Jim Rogers
2002-05-15 14:01 ` Mark Johnson
2002-05-16  0:02   ` Adam Beneschan
2002-05-16  2:26     ` Steven Deller
2002-05-16  9:53     ` Robert Dewar
2002-05-16 13:46       ` Steve Doiel
2002-05-16 14:00       ` Mark Johnson
2002-05-16 15:52       ` Adam Beneschan
2002-05-17  2:26         ` Robert Dewar
2002-05-17 16:44           ` Frank J. Lhota
2002-05-16 13:55     ` Mark Johnson
2002-05-15 19:12 ` Robert Dewar
2002-05-15 20:28 ` Adam Beneschan
replies disabled

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