From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!husc6!panda!genrad!decvax!ucbvax!ti-eg.CSNET"!"SVDSD::PETCHER From: "SVDSD::PETCHER@ti-eg.CSNET".UUCP Newsgroups: comp.lang.ada Subject: single valued variables Message-ID: <8704031535.AA26545@ucbvax.Berkeley.EDU> Date: Fri, 3-Apr-87 07:14:00 EST Article-I.D.: ucbvax.8704031535.AA26545 Posted: Fri Apr 3 07:14:00 1987 Date-Received: Sun, 5-Apr-87 03:40:16 EST Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet List-Id: 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