Sujet : Re: Accessing The Command Line
De : rosen (at) *nospam* adalog.fr (J-P. Rosen)
Groupes : comp.lang.adaDate : 05. Jul 2024, 09:58:00
Autres entêtes
Organisation : Adalog
Message-ID : <v68cih$36sd6$1@dont-email.me>
References : 1 2 3
User-Agent : Mozilla Thunderbird
Le 05/07/2024 à 01:54, Lawrence D'Oliveiro a écrit :
On Thu, 4 Jul 2024 13:27:05 +0200, Jeffrey R.Carter wrote:
On 2024-07-04 02:08, Lawrence D'Oliveiro wrote:
>
Remember that you can concatenate strings:
>
tio.put("my name: ");
tio.put(cli.Command_name);
tio.Put_Line("");
Tio.Put_Line (Item => "my name: " & Cli.Command_Name);
I’m sure I can, but I’m not sure what the point is. Let Ada collect the
pieces in its own buffers. That saves copying steps.
Agreed. I don't understand why people dislike printing piece by piece. In the old FORTRAN, you could write only line by line, but this time is long gone...
With the various Put procedures, you have individual formatting options that you don't have otherwise. Moreover, there is a nice property that few people noticed: if you have an algorithm writing data to a file, with loops and so on, you can keep the exact same structure replacing every Put with the matching Get, and you will read your data correctly. This feature goes away as soon as you have a 'Image.
-- J-P. RosenAdalog2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEXhttps://www.adalog.fr https://www.adacontrol.fr