comp.lang.ada
 help / color / mirror / Atom feed
From: "Yannick Duchêne Hibou57" <yannick_duchene@yahoo.fr>
Subject: Re: Ada.Directories.Base_Name and dot files
Date: Wed, 7 Oct 2009 07:46:45 -0700 (PDT)
Date: 2009-10-07T07:46:45-07:00	[thread overview]
Message-ID: <cc2a0223-0be0-4c9c-9576-3426ce7d66fb@r36g2000vbn.googlegroups.com> (raw)
In-Reply-To: 4acc8c20$0$284$14726298@news.sunsite.dk

Hi Thomas,

There was somewhat similar discuss some times ago :
http://groups.google.com/group/comp.lang.ada/browse_thread/thread/31af760e939556ef?hl=fr#

It seems that your Ada implementation (the behavior is left as
implementation defined in some areas) defines base file name as
everything before the last dot (and the extension is then every thing
after the last dot).

This is something with which I fully agree.

But what about (another question) a full file name like “ my-
page.fr.html ” ? What is the base name ? Can you guess ?

Well, the UNIX basename command will give you something, the Windows
OS will tell you it is “ my-page.fr ” and a web server (not its host
OS) may tell you it is “ my-page ”, because with some convention, fr
and html are both extensions and separated unordered extensions (ex. “
my-page.html.fr ” would be interpreted as the same as“ my-page.fr.html
”). You see how it may be legitimately variable depending on
legitimate conventions ?

Did you run your tests on Windows ? I suppose most of Ada
implementation defined behavior are inspired from that of the host OS
(possibly).

I would like to say : when in any particular area, you need a
particular specification which is not of concerns with the
fundamentals of the language design, don't hesitate to design your own
dedicated package.

You have some strong requirements about what the interpretation of
file names should, and probably can't expect Ada always agree with
this kind of level of details : the best is to design your own
interpretation function.

You known, it appears that a lot of peoples do that (especially with
files by the way), and Ada designed programs are far from only made up
of Ada's standard packages



  reply	other threads:[~2009-10-07 14:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-07 12:40 Ada.Directories.Base_Name and dot files 
2009-10-07 14:46 ` Yannick Duchêne Hibou57 [this message]
2009-10-07 17:06   ` 
2009-10-07 14:52 ` Adam Beneschan
2009-10-07 17:06   ` 
2009-10-07 15:10 ` Adam Beneschan
2009-10-07 15:37   ` Yannick Duchêne Hibou57
2009-10-11  2:39     ` Randy Brukardt
2009-10-07 20:11   ` 
2009-10-08  9:39 ` Stephen Leake
2009-10-08  9:58   ` 
2009-10-26 19:26     ` Type casting Bruno
2009-10-26 20:02       ` Jeffrey R. Carter
2009-10-26 20:09       ` Adam Beneschan
2009-10-26 19:27     ` Conversions Bruno
2009-10-26 20:09       ` Conversions Jeffrey R. Carter
2009-10-26 20:19       ` Conversions Adam Beneschan
replies disabled

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