comp.lang.ada
 help / color / mirror / Atom feed
* Re: if X in 1..35000 versus Boolean
@ 2002-07-14 20:22 Gautier direct_replies_not_read
  2002-07-15 11:36 ` Jan Prazak
  0 siblings, 1 reply; 37+ messages in thread
From: Gautier direct_replies_not_read @ 2002-07-14 20:22 UTC (permalink / raw)


Jan Prazak:

> >> type num : (1, 2, 3, 4);

>Maybe it's not the right syntax in Ada, because I haven't tested it,
>but this would work in Pascal and it should be quite similar in Ada
>(I am still reading my first Ada tutorial).

Did you test your Pascal assumptions ?...
At least I get under Turbo Pascal 6 and Delphi 6, for

program test; type t1234 = (1,2,3,4); begin end.
                            ^
Identifier expected.
____________________________________________________________
Gautier  --  http://www.mysunrise.ch/users/gdm/index.htm#Ada

NB: For a direct answer, address on the Web site!

_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com




^ permalink raw reply	[flat|nested] 37+ messages in thread
* if X in 1..35000 versus Boolean
@ 2002-07-13 19:10 Jan Prazak
  2002-07-13 16:27 ` Frank J. Lhota
                   ` (4 more replies)
  0 siblings, 5 replies; 37+ messages in thread
From: Jan Prazak @ 2002-07-13 19:10 UTC (permalink / raw)


Hello,

I have a simple question:

does the compiler (I am using GNAT) "see", that

	if X in 1..35000 then

is the same as

	if (X >= 1) and (X <= 35000) then

???

Or does the compiler really create an enumeration type with 35000 entries
with values from 1 to 35000, just to check if X is in there???

Jan




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

end of thread, other threads:[~2002-07-20  0:37 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-14 20:22 if X in 1..35000 versus Boolean Gautier direct_replies_not_read
2002-07-15 11:36 ` Jan Prazak
  -- strict thread matches above, loose matches on Subject: below --
2002-07-13 19:10 Jan Prazak
2002-07-13 16:27 ` Frank J. Lhota
2002-07-13 20:36   ` Jan Prazak
2002-07-13 18:05     ` Jeffrey Carter
2002-07-14 15:02       ` Jan Prazak
2002-07-13 22:10     ` Robert Dewar
2002-07-14 21:16       ` Jan Prazak
2002-07-14 20:47         ` Frank J. Lhota
2002-07-15  1:21         ` Jeffrey Carter
2002-07-16  8:18     ` Keith Thompson
2002-07-16 13:54       ` Jan Prazak
2002-07-16 11:13         ` Lutz Donnerhacke
2002-07-17 19:04           ` Jan Prazak
2002-07-17 20:00             ` Georg Bauhaus
2002-07-18  8:11             ` Lutz Donnerhacke
2002-07-18 14:39               ` Georg Bauhaus
2002-07-20  0:37               ` Robert Dewar
2002-07-16 20:25         ` Georg Bauhaus
2002-07-17 19:29           ` Jan Prazak
2002-07-16 19:24       ` Gautier
2002-07-17 19:04         ` Jan Prazak
2002-07-13 16:32 ` David C. Hoos, Sr.
2002-07-13 20:36   ` Jan Prazak
2002-07-13 18:02     ` David C. Hoos, Sr.
2002-07-13 18:17     ` sk
2002-07-13 20:02       ` Jeffrey Creem
     [not found]     ` <3D306ED5.33E80E09@myob.com>
2002-07-13 18:52       ` David C. Hoos, Sr.
     [not found]       ` <020a01c22a9f$2b50d6c0$6400000a@dhoos>
2002-07-13 19:02         ` sk
2002-07-14 15:02           ` Jan Prazak
2002-07-14 19:25             ` Darren New
2002-07-15 15:22               ` Steffen Huber
2002-07-13 16:44 ` Christopher Browne
2002-07-13 22:09   ` Robert Dewar
2002-07-13 17:17 ` tmoran
2002-07-13 19:44 ` Florian Weimer

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