Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!snorkelwacker!mit-eddie!uw-beaver!ubc-cs!cheddar.ucs.ubc.ca!buckland From: buckland@cheddar.ucs.ubc.ca (Tony Buckland) Newsgroups: comp.lang.fortran Subject: Re: What is the FORTRAN for ? Message-ID: <9317@ubc-cs.UUCP> Date: 28 Aug 90 21:07:23 GMT References: <13293@mentor.cc.purdue.edu> <61279@lanl.gov> <13393@mentor.cc.purdue.edu> Sender: news@cs.ubc.ca Reply-To: buckland@cheddar.ucs.ubc.ca (Tony Buckland) Organization: UBC Computing Centre, Vancouver, B.C., Canada Lines: 17 In article <13393@mentor.cc.purdue.edu> ags@seaman.cc.purdue.edu (Dave Seaman) writes: > ... Beyond the requirement that LOGICAL variables take the >same amount of storage as INTEGER and REAL variables, the standard >places no restrictions on the internal representation and there is >no single "best" way to implement the type. For example, one >implementation may focus on the least significant bit, using 0 for >.FALSE. and 1 for .TRUE. Another may focus instead on the sign >bit, using +1 for .FALSE. and -1 for .TRUE. ... The universal convention, so far as I know, is that .FALSE. is always represented by all bits zero, while *any* bit on must be recognized as .TRUE. and detected by the code generated by a conforming compiler. Switching must always be done by moving a full word (or whatever) of zero bits into a variable to set it .FALSE., or a full word or whatever containing at least one one bit to set it .TRUE., never by clever bit flipping.