comp.lang.ada
 help / color / mirror / Atom feed
From: Vinzent 'Gadget' Hoefler <ada.rocks@jlfencey.com>
Subject: Re: Pascal to ADA
Date: Mon, 17 Nov 2003 11:24:46 +0100
Date: 2003-11-17T11:24:46+01:00	[thread overview]
Message-ID: <bpa7of$1mhost$1@ID-175126.news.uni-berlin.de> (raw)
In-Reply-To: bpa46j$o0l$1@news1.kornet.net

Tilman Gloetzner wrote:

>Hello,
>
>1) what is a effecient way of rewriting the following code fragement in ADA
[...]

It's called Ada. Just like Pascal.

>----------------------------------------------------------------
>PROCEDURE Add32(N:LONGINT;M:LONGINT;VAR R:LONGINT) ;

The most simple way I see would be:

|R := N + M;

or if you insist on using a procedure:

|type LongInt is range -2**31 .. 2**31 - 1;
|
|procedure Add32 (N : in  LongInt;
|	          M : in  LongInt;
|                 R : out LongInt) is
|begin
|   R := N + M;
|end Add32;


Vinzent.



  reply	other threads:[~2003-11-17 10:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-17 10:12 Pascal to ADA Tilman Gloetzner
2003-11-17 10:24 ` Vinzent 'Gadget' Hoefler [this message]
2003-11-17 10:44 ` Marius Amado Alves
2003-11-17 11:41 ` Ole-Hjalmar Kristensen
     [not found] ` <1069065860.2826.11.camel@localhost.localdomain>
2003-11-17 13:17   ` Marius Amado Alves
2003-11-17 14:42 ` Steve
2003-11-17 23:14   ` tmoran
2003-11-20 12:24 ` Lutz Donnerhacke
  -- strict thread matches above, loose matches on Subject: below --
2001-02-14 19:29 pascal to Ada Munir Albeelbisi
2001-02-14 21:30 ` Pascal Obry
2001-02-15 12:22   ` Marc A. Criley
2001-02-15 17:31     ` Pascal Obry
2001-02-15 10:43 ` David C. Hoos, Sr.
2001-02-15 17:21 ` Randy Brukardt
replies disabled

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