comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Operating System differences and Ada OS independent programming
Date: Thu, 24 Mar 2016 13:16:37 +0100
Date: 2016-03-24T13:16:37+01:00	[thread overview]
Message-ID: <nd0lrt$4jd$1@gioia.aioe.org> (raw)
In-Reply-To: nd0g2h$nfm$1@dont-email.me

On 2016-03-24 11:41, G.B. wrote:
> On 24.03.16 09:00, Dmitry A. Kazakov wrote:
>> The mapping is normally predefined. E.g. when you run MinGW, Windows
>> roots are already mapped:
>>
>>     E:\  -> /e/
>
> Enter a microcontroller with both a flash drive attached and
> some other storage connected via network. Not much of
> an operating system, yet a simple, single-threaded hierarchical
> file system for the flash drive.
>
> Then, when porting a prototype version of a program from
> Windows™ to the controller, I thought that the programmer,
> or "operator", should be able to instruct the run-time that
 >
> - "E:\" should be mapped to something that represents the "root"
> of the filesystem on the flash drive, and
>
> - %HOMEDRIVE% be mapped to the network attached thing,
>
> - %HOMEPATH% to below what %HOMEDRIVE% has become.

OS user (operator), yes, programmer, as Ada programmer, no. Configuring 
the system environment is not the objective of the program. An Ada 
program deals with the existing environment.

So basically it is not Ada standard library concern. It will have a 
"home directory" path generator function, implemented somehow. Thus the 
programmer will be able to express "hello_world Ada body file from home 
directory" in a system-independent way.

> If the program was developed without many features required
> of the file system, then the source text that names files
> would not need to be recompiled by any configurable implementation
> of Ada.

Yes, because file systems have similar properties expressed differently 
when paths are strings. That is why path must be a proper type instead.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

  parent reply	other threads:[~2016-03-24 12:16 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-21 13:18 Operating System differences and Ada OS independent programming ldries46
2016-03-21 15:07 ` gautier_niouzes
2016-03-21 17:24 ` Dennis Lee Bieber
2016-03-21 22:04   ` Randy Brukardt
2016-03-22  8:43     ` Dmitry A. Kazakov
2016-03-22 11:15       ` G.B.
2016-03-22 13:40         ` Dmitry A. Kazakov
2016-03-22 14:36           ` Stefan.Lucks
2016-03-22 15:08           ` G.B.
2016-03-22 19:06             ` Dmitry A. Kazakov
2016-03-23  8:13         ` gautier_niouzes
2016-03-23  8:38           ` Dmitry A. Kazakov
2016-03-23 15:08             ` G.B.
2016-03-24  8:00               ` Dmitry A. Kazakov
2016-03-24 10:41                 ` G.B.
2016-03-24 10:42                   ` G.B.
2016-03-24 12:16                   ` Dmitry A. Kazakov [this message]
2016-03-24  3:36             ` Shark8
2016-03-24  7:58               ` Dmitry A. Kazakov
2016-03-24 11:42                 ` Dennis Lee Bieber
2016-03-24  1:19 ` rieachus
replies disabled

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