comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@gnat.com (Robert Dewar)
Subject: Re: Case statement and Integers.
Date: 24 Apr 2002 04:41:58 -0700
Date: 2002-04-24T11:41:58+00:00	[thread overview]
Message-ID: <5ee5b646.0204240341.52a04e5c@posting.google.com> (raw)
In-Reply-To: 3CC44130.6472A3C8@yahoo.com

Anatoly Chernyshev <rhezusfactor@yahoo.com> wrote in message news:<3CC44130.6472A3C8@yahoo.com>...
> Well, he was probably trying to say approximately the following:
> -------This is the compilable and working example---------------------
> with text_io;
> use text_io;
> procedure af is
> numbers: array (1..100) of integer;
> pivot:constant integer:=30;
> begin
> for j in 1..100 loop
> numbers(j):=j;
> case Numbers(J) is
>     when 1..Pivot - 1 =>
> put_line (integer'image (j) & " is smaller than " & integer'image(pivot));
>     when Pivot + 1 .. 100 =>
> put_line (integer'image (j) & " is larger than " & integer'image(pivot));
>     when others =>
> put_line (integer'image (j) & " is equal to " & integer'image(pivot));
>  end case;
>  end loop;
> end af;

Yes, of course this is compilable, but we perfectly well know that it is 100%
irrelevant to the original post, where obvviously the pivot was a dynamic value.



  parent reply	other threads:[~2002-04-24 11:41 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-20 16:42 Case statement and Integers Wannabe h4x0r
2002-04-20 17:04 ` Rhoady
2002-04-20 17:11 ` Alan Reynolds
2002-04-20 17:32   ` Wannabe h4x0r
2002-04-20 18:31     ` tmoran
2002-04-21  3:59       ` Wannabe h4x0r
2002-04-22  3:01       ` Robert Dewar
2002-04-22  5:14       ` Anders Wirzenius
2002-04-20 21:26     ` Ted Dennison
2002-04-20 19:14 ` Vadim Godunko
2002-04-22  3:05   ` Robert Dewar
2002-04-22  8:41     ` Vadim Godunko
2002-04-22 13:16       ` Robert Dewar
2002-04-23  6:38     ` Wannabe h4x0r
2002-04-22 16:58 ` Anatoly Chernyshev
2002-04-22 17:55   ` tmoran
2002-04-22 19:51     ` Anatoly Chernyshev
2002-04-24 11:41   ` Robert Dewar [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-04-22  9:11 Grein, Christoph
replies disabled

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