Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!mailrus!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!purdue!i.cc.purdue.edu!h.cc.purdue.edu!s.cc.purdue.edu!ags From: ags@s.cc.purdue.edu (Dave Seaman) Newsgroups: comp.lang.fortran Subject: Re: CDC FORTRAN trivia questions Keywords: arithmetic if logical Message-ID: <3624@s.cc.purdue.edu> Date: 1 Nov 88 19:27:14 GMT References: <1196@helios.ee.lbl.gov> <3616@s.cc.purdue.edu> <7691@boring.cwi.nl> Reply-To: ags@s.cc.purdue.edu.UUCP (Dave Seaman) Organization: Purdue University Lines: 22 In article <7691@boring.cwi.nl> dik@cwi.nl (Dik T. Winter) writes: >Beware, .FALSE. is +0; truth values returned by expressions could have any >arithmetic value with negative for .TRUE. and positive for .FALSE.. >So -0 is .TRUE. (yes, it is a 1-s complement machine). I still have access to a CDC 6500. Just a few minutes ago I ran the following program: print 10, .true., .false. 10 format(2(1x,o20)) end for which the output was: 77777777777777777776 00000000000000000000 which shows that .true. is -1 and .false. is 0, just as I said. The older compilers (such as RUN) used a different convention, something like -0 for .true. and +0 for .false. -- Dave Seaman ags@j.cc.purdue.edu