comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: [ANN] List_Image v0.2.0
Date: Wed, 31 Jan 2018 18:27:21 -0600
Date: 2018-01-31T18:27:21-06:00	[thread overview]
Message-ID: <p4tmt9$p48$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: da6805ff-8429-4ca0-bbb5-f5462040989d@googlegroups.com

<briot.emmanuel@gmail.com> wrote in message 
news:da6805ff-8429-4ca0-bbb5-f5462040989d@googlegroups.com...
...
>  * EOL should be defined different when on Windows. I used to test
> whether the GNAT.OS_Lib.Directory_Separator is '\', perhaps there's
> a better way nowadays. For sure, a "Is_Windows" constant would be
> useful somewhere.
>
>     EOL : constant String := (if Is_Windows then ASCII.CR & ASCII.LF else 
> ASCII.LF);

Ada defined System.System_Name for this sort of purpose, but since it is a 
constant and it is implementation-defined, it is is of limited use for this 
purpose.

For Janus/Ada, you could use:

     Is_Windows : constant Boolean := (System.System_Name = System.Win32);

...but for the moment, "Win32" is the only constant defined, so you could 
use "True" as well. If we ever resurrected the Linux compiler, then there 
will be another constant again. (There used to be DOS_Ext and MS_DOS 
constants, but we got rid of those years ago.)

Dunno if GNAT does anything useful with this constant or not.

                               Randy. 


  parent reply	other threads:[~2018-02-01  0:27 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-31  0:44 [ANN] List_Image v0.2.0 Lionel Draghi
2018-01-31  7:27 ` briot.emmanuel
2018-01-31 21:11   ` Lionel Draghi
2018-02-01  8:05     ` briot.emmanuel
2018-02-01  9:48     ` J-P. Rosen
2018-02-01 15:48       ` Lionel Draghi
2018-02-01 17:20         ` bozovic.bojan
2018-02-01 18:31           ` Lionel Draghi
2018-02-01 18:45             ` bozovic.bojan
2018-02-01 20:26               ` Dennis Lee Bieber
2018-02-02  5:25                 ` J-P. Rosen
2018-02-02  0:02             ` Randy Brukardt
2018-02-02  0:31               ` Simon Clubley
2018-02-02 18:34               ` Lionel Draghi
2018-02-02 22:40                 ` Randy Brukardt
2018-02-11 23:27                   ` Lionel Draghi
2018-02-12  6:55                     ` J-P. Rosen
2018-02-12 20:44                       ` Lionel Draghi
2018-02-12 10:57                     ` Stefan.Lucks
2018-02-12 21:41                       ` Lionel Draghi
2018-03-07 10:17                     ` Semantic versioning (Was: [ANN] List_Image v0.2.0) Jacob Sparre Andersen
2018-02-01 20:11         ` [ANN] List_Image v0.2.0 J-P. Rosen
2018-02-01 21:08           ` Simon Wright
2018-02-01  0:27   ` Randy Brukardt [this message]
2018-02-01  7:55     ` briot.emmanuel
2018-02-01 23:56       ` Randy Brukardt
2018-02-02 15:48         ` Simon Wright
2018-02-02 22:54           ` Randy Brukardt
2018-02-01  8:08     ` Simon Wright
2018-02-01  8:24       ` Dmitry A. Kazakov
replies disabled

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