comp.lang.ada
 help / color / mirror / Atom feed
From: Jean-Baptiste CAMPESATO <camje_lemon@a2lf.org>
Subject: Translate from C
Date: Sat, 09 Apr 2005 21:30:30 +0200
Date: 2005-04-09T21:28:17+02:00	[thread overview]
Message-ID: <pan.2005.04.09.19.30.30.254343@a2lf.org> (raw)

Hello,
I've this code in C : http://www.a2lf.org/util.c
and i want to translate it in Ada; 
A friend tried :
   procedure Copy
     (Source      : Address;
      Destination : Address;
      Bytes       : Natural)
   is
      S : String (1 .. Bytes);
      D : String (1 .. Bytes);
      for S'Address use Source;
      for D'Address use Destination;
   begin
      for I in S'Range loop
         D (I) := S (I);
      end loop;
   end Copy;

Do you think it's Ok ?

Thanks.



             reply	other threads:[~2005-04-09 19:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-09 19:30 Jean-Baptiste CAMPESATO [this message]
2005-04-09 20:54 ` Translate from C tmoran
     [not found] ` <gkvg51de5t83scllh0sp7go8nmcfe3ede9@4ax.com>
2005-04-10  7:47   ` Jean-Baptiste CAMPESATO
2005-04-11 13:39 ` Steve
replies disabled

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