Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ames!oliveb!pyramid!mikel From: mikel@pyramid.pyramid.com (Mike Lipsie) Newsgroups: comp.lang.fortran Subject: Re: extensions to logical variables Keywords: vax,logicals Message-ID: <67924@pyramid.pyramid.com> Date: 27 Apr 89 16:13:20 GMT References: <31660@stellar.UUCP> Reply-To: mikel@pyramid.pyramid.com (Mike Lipsie) Organization: Pyramid Technology Corp., Mountain View, CA Lines: 20 In article <31660@stellar.UUCP> keith@stellar.UUCP (Keith Crews @stellar) writes: >I have some questions about common fortran extensions to logical variables. > >The basic problem I have with the vax implementation is that I think that >a logical variable should always be true or false. You can do this by >forcing a conversion to 0 or -1 when assigning to them (although this can >be defeated by using equivalences) or you can treat all non-zero logicals >as being true and only 0 as being false. Not answering Keith's question but rather pointing out an erroneous assumption. People who come from the C world seem to have internalized false-true as zero-nonzero; those from Pascal as zero-one. Other implementations are possible. A relatively common method is even-odd because some machines had a fast low-order bit test; likewise, there is positive-negative because of a fast sign bit test. -- ----------- Mike Lipsie mikel@pyramid.com Pyramid Technology Corp, Mountain View, CA +1 415 965 7200 ext. 4980