From: gautier_niouzes@hotmail.com
Subject: Re: use Ada.Text_IO in main() or Package?
Date: Thu, 14 Sep 2017 02:49:42 -0700 (PDT)
Date: 2017-09-14T02:49:42-07:00 [thread overview]
Message-ID: <04ec7e7e-c37e-4fc1-a79d-5924754a07e4@googlegroups.com> (raw)
In-Reply-To: <81162546-cda1-4ea5-9455-78867693cd60@googlegroups.com>
Le jeudi 14 septembre 2017 11:37:41 UTC+2, Mace Ayres a écrit :
> Tks. It does make sense. I haven't been programming much in last decades, never really go into OOP much, but I can see this is going to avoid a lot of issues, and enforces some rigor.
Actually it is just a question of what is depending on what.
Instead of Structures, you can take Ada.Text_IO itself as an example.
In the guts of package Ada.Text_IO, the GNAT run-time library has a package body file: a-textio.adb) with the following lines:
with Ada.Streams; use Ada.Streams;
with Interfaces.C_Streams; use Interfaces.C_Streams;
with System.File_IO;
with System.CRTL;
with System.WCh_Cnv; use System.WCh_Cnv;
with System.WCh_Con; use System.WCh_Con;
with Ada.Unchecked_Conversion;
with Ada.Unchecked_Deallocation;
It makes sense they are there and not expected to be in any Main() or any other referencing Ada.Text_IO.
I've never used System.File_IO for instance and would not: it is GNAT only and unknown in other Ada systems. And there is no need for that.
G.
prev parent reply other threads:[~2017-09-14 9:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-14 5:09 use Ada.Text_IO in main() or Package? Mace Ayres
2017-09-14 5:12 ` Mace Ayres
2017-09-14 6:33 ` Petter Fryklund
2017-09-14 6:51 ` Mace Ayres
2017-09-15 5:22 ` Petter Fryklund
2017-09-14 6:21 ` gautier_niouzes
2017-09-14 6:47 ` Mace Ayres
2017-09-14 7:13 ` gautier_niouzes
2017-09-14 9:37 ` Mace Ayres
2017-09-14 9:49 ` gautier_niouzes [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox