From: Pascal Obry <p.obry@wanadoo.fr>
Subject: Re: How to rename a file?
Date: 30 Sep 2001 10:53:16 +0200
Date: 2001-09-30T08:54:49+00:00 [thread overview]
Message-ID: <ur8spxdoj.fsf@wanadoo.fr> (raw)
In-Reply-To: mailman.1001814684.4666.comp.lang.ada@ada.eu.org
"David Botton" <David@Botton.com> writes:
> That's not cool, but certainly an alternative.
;)
> The coolness is in that code was that you don't need any "special" bindings
> for accessing low level C calls. In fact I think far to much emphasis has
> been placed on the need of thin bindings. Concentration should rather be
David, really POSIX is *far* from being a thin binding.
Your cool example is way more thin than mine :)
<<
function Rename_File2 (Old_File, New_File : String) return Boolean
is
function MoveFile
(Old_Name : String := Old_File & Character'Val (0);
New_Name : String := New_File & Character'Val (0))
return Boolean;
pragma Import (StdCall, MoveFile, "MoveFileA");
begin
return MoveFile;
end Rename_File2;
>>
Character'Val (0), Stdcall, pragma Import...
> made on "frameworks" (which POSIX bindings may perhaps also be included, as
> cross platform was in mind) and tools that abstract the C interfaces and
> work in a more Ada like nature.
I won't call POSIX a framework since it is a _binding_ but yet not a
thin one. And yes in cross-platform environemnt it is definitly the
choice, this is why I do use it!
Pascal.
--
--|------------------------------------------------------
--| Pascal Obry Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--| http://perso.wanadoo.fr/pascal.obry
--|
--| "The best way to travel is by means of imagination"
next prev parent reply other threads:[~2001-09-30 8:53 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-27 19:43 How to rename a file? Pi
2001-09-27 23:09 ` tmoran
2001-09-27 23:36 ` Larry Kilgallen
2001-09-28 2:16 ` DuckE
2001-09-28 2:54 ` Pi
2001-09-28 3:41 ` David Botton
2001-09-28 7:39 ` Lutz Donnerhacke
2001-09-28 17:34 ` Pascal Obry
2001-09-28 18:39 ` Larry Kilgallen
2001-09-30 1:51 ` David Botton
2001-09-30 8:53 ` Pascal Obry [this message]
2001-09-30 10:21 ` Florian Weimer
2001-09-30 14:53 ` Pascal Obry
2001-09-29 5:02 ` DuckE
2001-09-28 3:16 ` David Botton
2001-09-28 16:03 ` Jeffrey Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox