From: "SVDSD::PETCHER@ti-eg.CSNET".UUCP
Subject: single valued variables
Date: Fri, 3-Apr-87 07:14:00 EST [thread overview]
Date: Fri Apr 3 07:14:00 1987
Message-ID: <8704031535.AA26545@ucbvax.Berkeley.EDU> (raw)
I am not an Ada expert, so correct me if I'm wrong, but...
When one declares a variable range to be (true..true) is that not in itself a
contradiction? A variable that can have only one value is, by definition, not
a variable, but a constant. In that context, it seems a compiler should
create a constant, issue a diagnostic for any subsequent code that attempts to
change the constant, and generate no executeable code for same. I realize the
most likely place for a single-valued variable to occur would be in
instantiation of a generic, but if a generic so instantiated does not treat
single-valued variables as constants then the program is basically in error.
Malcolm
next reply other threads:[~1987-04-03 12:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1987-04-03 12:14 SVDSD::PETCHER@ti-eg.CSNET [this message]
1987-04-06 13:44 ` single valued variables firth
1987-04-08 19:29 ` gore
-- strict thread matches above, loose matches on Subject: below --
1987-04-07 5:26 drw
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox