comp.lang.ada
 help / color / mirror / Atom feed
* Re: Integer'Class
@ 2004-10-05  7:35 Christoph Karl Walter Grein
  0 siblings, 0 replies; 8+ messages in thread
From: Christoph Karl Walter Grein @ 2004-10-05  7:35 UTC (permalink / raw)
  To: comp.lang.ada

There are several mistakes in the post:

> The parent for simple types is 'Base. The 'Base of Integer is
> universal_integer - a compiler internal type which cannot be used directly.
> 
> Saying that, I now start to wonder what 'Base of a tagged type is...

'Base is defined for scalar subtypes only. So there is no such thing for tagged types.

Integer is the "first subtype" (constrained) of an anomymous unconstrained base type
accessible via the 'Base attribute.

The parent of all integer types is root integer, which again is anonymous. All integer
literals are of this type; they are implicitly converted to the correct target type.
You may informally think of root integer as Integer'Class.
__________________________________________________________
Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min.
weltweit telefonieren! http://freephone.web.de/?mc=021201




^ permalink raw reply	[flat|nested] 8+ messages in thread
* Integer'Class
@ 2004-10-05  0:10 Rick Santa-Cruz
  2004-10-05  0:52 ` Integer'Class Jeffrey Carter
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Rick Santa-Cruz @ 2004-10-05  0:10 UTC (permalink / raw)


Hi,

sorry for so many questions.... maybe that's easy to answer, but I don't 
find any senseful answer to that:
Why can't I use: Integer'Class, but I can derive a new class from Integer in 
writing:
type New_Int is new Integer range 1..100;

Isn't this unlogical? Or have I missunderstand something completly?

Thanks tons,
A becoming desperated Rick 





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-10-05 19:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-05  7:35 Integer'Class Christoph Karl Walter Grein
  -- strict thread matches above, loose matches on Subject: below --
2004-10-05  0:10 Integer'Class Rick Santa-Cruz
2004-10-05  0:52 ` Integer'Class Jeffrey Carter
2004-10-05  1:00   ` Integer'Class Rick Santa-Cruz
2004-10-05 19:45     ` Integer'Class Jeffrey Carter
2004-10-05  7:16 ` Integer'Class Martin Krischik
2004-10-05 19:49   ` Integer'Class Jeffrey Carter
2004-10-05  8:45 ` Integer'Class Dmitry A. Kazakov

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