From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Accessing The Command Line
Date: Thu, 4 Jul 2024 15:01:05 +0200 [thread overview]
Message-ID: <v666eg$2p4gi$1@dont-email.me> (raw)
In-Reply-To: <v64p6n$2dviq$1@dont-email.me>
On 2024-07-04 02:08, Lawrence D'Oliveiro wrote:
> with Ada.Command_Line;
> with Ada.Text_IO;
[...]
A general advice processing strings, any strings: messages, commands,
payload etc.
Always read a complete string into a fixed size buffer (safety). Never
use streams. Process the whole string consequently. Never tokenize.
Never copy anything. Ada has slices.
The same is true for the output. Build a complete substring in a buffer.
Consequently. Flush the complete substring to the output.
Do not use Unbounded_String.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
next prev parent reply other threads:[~2024-07-04 13:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-04 0:08 Accessing The Command Line Lawrence D'Oliveiro
2024-07-04 1:16 ` Paul Rubin
2024-07-04 1:50 ` Lawrence D'Oliveiro
2024-07-04 15:13 ` Rod Kay
2024-07-04 16:15 ` Dmitry A. Kazakov
2024-07-04 11:27 ` Jeffrey R.Carter
2024-07-04 23:54 ` Lawrence D'Oliveiro
2024-07-05 8:58 ` J-P. Rosen
2024-07-04 13:01 ` Dmitry A. Kazakov [this message]
2024-07-04 19:42 ` Ben Bacarisse
2024-07-04 22:06 ` Paul Rubin
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox