From: "J-P. Rosen" <rosen@adalog.fr>
Subject: Re: Possible to recover default value of scalar type?
Date: Tue, 15 Dec 2020 07:47:32 +0100 [thread overview]
Message-ID: <rr9m63$ufd$1@dont-email.me> (raw)
In-Reply-To: <rr8cav$9bv$1@gioia.aioe.org>
Le 14/12/2020 à 19:53, Dmitry A. Kazakov a écrit :
> I think Robert Dewar argued that variables must be declared in the
> narrowest possible scope. Which would imply that at the beginning of
> that scope you should know the value, because it would be the first use
> of the variable.
Not applicable if your variable is used in a loop:
V : Integer;
begin
loop
Get (V);
exit when V =0;
-- do something with V
end loop;
Clearly, initializing V makes no sense.
--
J-P. Rosen
Adalog
2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00
http://www.adalog.fr
next prev parent reply other threads:[~2020-12-15 6:47 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-13 9:54 Possible to recover default value of scalar type? reinert
2020-12-14 0:08 ` Stephen Leake
2020-12-14 6:09 ` reinert
2020-12-14 9:01 ` AdaMagica
2020-12-14 9:38 ` Dmitry A. Kazakov
2020-12-14 15:56 ` AdaMagica
2020-12-14 16:31 ` Dmitry A. Kazakov
2020-12-14 18:24 ` Simon Wright
2020-12-14 18:53 ` Dmitry A. Kazakov
2020-12-15 6:47 ` J-P. Rosen [this message]
2020-12-15 7:23 ` Dmitry A. Kazakov
2020-12-15 9:07 ` J-P. Rosen
2020-12-15 16:53 ` Simon Wright
2020-12-15 18:14 ` AdaMagica
2020-12-17 0:53 ` Randy Brukardt
2020-12-17 0:48 ` Randy Brukardt
2020-12-15 1:27 ` Randy Brukardt
2020-12-15 9:30 ` Niklas Holsti
2020-12-17 0:45 ` Randy Brukardt
2020-12-15 1:26 ` Randy Brukardt
2020-12-15 7:35 ` Dmitry A. Kazakov
2020-12-17 0:43 ` Randy Brukardt
2020-12-15 1:21 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox