comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen_leake@acm.org>
To: comp.lang.ada@ada-france.org
Subject: Re: integer types and reference manual
Date: 20 Jul 2004 10:44:05 -0400
Date: 2004-07-20T10:44:05-04:00	[thread overview]
Message-ID: <mailman.30.1090334661.416.comp.lang.ada@ada-france.org> (raw)
In-Reply-To: <5f59677c.0407200541.43a6cb68@posting.google.com>

evangeli@cnam.fr (Evangelista Sami) writes:

> hello all
> 
> just two questions about this sample code :
> 
> 01   procedure Test is
> 02     type U is range 1..100;
> 03     N : constant U := 100;
> 04     type T is mod N + 10;
> 05   begin
> 06      null;
> 07   end;
> 
> 
> 1) what is the type of N + 10 ?

ARM 3.5.4 (5) says it's of "any integer type". Loosely speaking, you
can think of it as "universal integer".

> 2) in the syntax summary of the RM there is the token
> "static_expression". what is it exactly? 

To answer that precisely, you need to study the Annotated Ada
Reference manual in detail. Available at
http://www.adaic.com/standards/ada95.html, and in Emacs Info format at
http://www.adaic.com/standards/ada95.html

> an expression which value can be computed at the compilation time?

That's close enough for most purposes. The compiler will give you an
error when you hit a corner case where it's not "close enough".

-- 
-- Stephe




  reply	other threads:[~2004-07-20 14:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-20 13:41 integer types and reference manual Evangelista Sami
2004-07-20 14:44 ` Stephen Leake [this message]
2004-07-20 18:53 ` Jeffrey Carter
replies disabled

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