comp.lang.ada
 help / color / mirror / Atom feed
From: adaworks@netcom.com (AdaWorks)
Subject: Re: Correction to previous post
Date: 1996/04/03
Date: 1996-04-03T00:00:00+00:00	[thread overview]
Message-ID: <adaworksDpB8CE.4F0@netcom.com> (raw)
In-Reply-To: dewar.828527000@schonberg

Robert Dewar (dewar@cs.nyu.edu) wrote:

: Here is the example I meant to post:

: with Text_IO; use Text_IO;

: procedure S is
:    Sum : Integer;
: begin
:    for J in 1 .. 10 loop
:       Sum := Sum + J;
:    end loop;

:    Put_Line (Integer'Image (Sum));
: end;

  Or howabout the equivalent,

      with Text_IO;
      procedure S is
         J : Integer := 10;
      begin
       Text_IO.Put_Line(Integer'Image( (J * (J + 1)) / 2 ); 
      end S;

  Surely that is provable.  :-)    :-)  :-)

  Richard Riehle
  adaworks@netcom.com
-- 

richard@adaworks.com
AdaWorks Software Engineering
Suite 27
2555 Park Boulevard
Palo Alto, CA 94306
(415) 328-1815
FAX  328-1112




  reply	other threads:[~1996-04-03  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-04-03  0:00 Correction to previous post Robert Dewar
1996-04-03  0:00 ` AdaWorks [this message]
1996-04-05  0:00   ` Robert Dewar
1996-04-03  0:00 ` Cordes MJ
1996-04-04  0:00   ` Robert Dewar
replies disabled

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