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,GAPPY_SUBJECT, INVALID_DATE,MSGID_SHORT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!titan!gardner From: gardner@titan.tsd.arlut.utexas.edu (Don Gardner) Newsgroups: comp.lang.ada Subject: Types defining h/w r/o or w/o registers Message-ID: <3949@titan.tsd.arlut.utexas.edu> Date: 30 May 91 13:03:52 GMT Reply-To: gardner@titan.tsd.arlut.utexas.edu (Donald Gardner) Organization: Applied Research Labs, The University of Texas at Austin List-Id: Is there some way to define a type such that all variables of that type can be only read or only written? For instance, I have a type that defines the status register of some peripheral which can only be read. It would be best if the compiler could flag any assignments to variables of such a type as errors. Is there some other means for commonly handling this problem? The compiler being used is VADSWorks, if an implementation-defined solution is required.