From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3727f1245650af64 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-17 02:26:24 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!adsl-213-200-246-247.cybernet.CH!not-for-mail From: Vinzent 'Gadget' Hoefler Newsgroups: comp.lang.ada Subject: Re: Pascal to ADA Date: Mon, 17 Nov 2003 11:24:46 +0100 Organization: JeLlyFish software Message-ID: References: Reply-To: v.hoefler@acm.org NNTP-Posting-Host: adsl-213-200-246-247.cybernet.ch (213.200.246.247) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de 1069064783 57205661 213.200.246.247 (16 [175126]) X-Newsreader: Forte Agent 1.8/32.548 Xref: archiver1.google.com comp.lang.ada:2561 Date: 2003-11-17T11:24:46+01:00 List-Id: 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 :=3D 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 :=3D N + M; |end Add32; Vinzent.