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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham
autolearn_force=no version=3.4.4
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 103376,2d7ec12dd7db366
X-Google-Attributes: gid103376,public
X-Google-ArrivalTime: 2001-09-30 02:05:17 PST
Path:
archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!npeer.kpnqwest.net!news.edf.fr!not-for-mail
From: Pascal Obry
Newsgroups: comp.lang.ada
Subject: Re: How to rename a file?
Date: 30 Sep 2001 10:53:16 +0200
Organization: Home - http://perso.wanadoo.fr/pascal.obry
Sender: obry@PASCAL
Message-ID:
References:
NNTP-Posting-Host: 163.107.131.27
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: clnews.edf.fr 1001840089 9363 163.107.131.27 (30 Sep 2001 08:54:49
GMT)
X-Complaints-To: newsadm@news.edf.fr
NNTP-Posting-Date: 30 Sep 2001 08:54:49 GMT
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.106
Xref: archiver1.google.com comp.lang.ada:13540
Date: 2001-09-30T08:54:49+00:00
List-Id:
"David Botton" 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"