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-Thread: a07f3367d7,31af760e939556ef X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder.news-service.com!news2.euro.net!newsfeed.freenet.de!bolzen.all.de!newsfeed.ision.net!newsfeed2.easynews.net!ision!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Interpretation of extensions different from Unix/Linux? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <8a5f3b98-1c5a-4d47-aca7-e106d1223fa9@a26g2000yqn.googlegroups.com> <87skg7952j.fsf@jspa-nykredit.sparre-andersen.dk> <4a782233$0$30220$9b4e6d93@newsspool1.arcor-online.net> Date: Fri, 14 Aug 2009 09:37:22 +0200 Message-ID: <127c383p9fvl1.7m1qmq5jhrx2$.dlg@40tude.net> NNTP-Posting-Date: 14 Aug 2009 09:36:49 CEST NNTP-Posting-Host: aabc178d.newsspool1.arcor-online.net X-Trace: DXC=f0UlU?;7;OA=8m7nZkdN^@ic==]BZ:afN4Fo<]lROoRA^YC2XCjHcbI8`8E0EIZeUGDNcfSJ;bb[EFCTGGVUmh?DLK[5LiR>kgBa9F; On Thu, 13 Aug 2009 23:33:40 -0500, Randy Brukardt wrote: > "Dmitry A. Kazakov" wrote in message > news:b4dn28zky4qe$.mrr68avem08a$.dlg@40tude.net... > ... >> Surprising is that Ada.Directories uses plain String for file names, paths, >> extension and patterns. This is clearly not an "Ada way" to deal with such >> things. > > Why is that surprising? It has to be compatible with the file names accepted > by the various Open routines in Ada.Text_IO, Ada.Direct_IO, etc. > > You could argue that String is the wrong choice for all of those things, and > I think you'd be right, but it's irrelevant as we stuck with the Ada 83 > definitions of the file I/O routines. (Adding overloaded ones would be > unacceptibly incompatible, you wouldn't be able to use literals.) No, I don't see any problem here. There is no literals for private types, (unfortunately). But if the type Fully_Qualified_File_Name (or whatever we called it) should have literals, they would be record aggregates. So we would write something like: File : File_Type; begin Open ( File => File, Mode => In_File, Name => ( Volume => "C:", Directory => ("Documents and Settings", "me", "work"), Name => "test", Extension => "txt" ) ); the above is impossible due to language limitations, but we could: File : File_Type; begin Open ( File => File, Mode => In_File, Volume => "C:", Directory => ("Documents and Settings", "me", "work"), Name => "test", Extension => "txt" ); or / and File : File_Type; begin Open ( File => File, Mode => In_File, Name => Name ( Volume => "C:", Directory => ("Documents and Settings", "me", "work"), Name => "test", Extension => "txt" ) ); -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de