This program DOES return 'BIT SET'. It would NOT for BTEST(2,0), and would for BTEST(1,0) The docs I found were a bit consufing for this intrinsic as to whether the LSB bit was 0 or 1

      Program Hello

      implicit none
      logical DONE

      IF (BTEST(2,1).EQV. .TRUE.) THEN
        write (*,*) "BIT SET!"
      ELSE
        write (*,*) "BIT not SET"
      ENDIF

      END

-- MattWalsh - 19 Dec 2003

Topic revision: r1 - 19 Dec 2003 - 18:24:23 - MattWalsh
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback