www.delorie.com/gnu/docs/gcc/g77_109.html   search  
 
Buy the book!


Using and Porting GNU Fortran

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.11.9.34 BTest Intrinsic

 
BTest(I, Pos)

BTest: LOGICAL(KIND=1) function.

I: INTEGER; scalar; INTENT(IN).

Pos: INTEGER; scalar; INTENT(IN).

Intrinsic groups: mil, f90, vxt.

Description:

Returns .TRUE. if bit Pos in I is 1, .FALSE. otherwise.

(Bit 0 is the low-order (rightmost) bit, adding the value 2**0, or 1, to the number if set to 1; bit 1 is the next-higher-order bit, adding 2**1, or 2; bit 2 adds 2**2, or 4; and so on.)

See section 8.11.9.33 Bit_Size Intrinsic, for how to obtain the number of bits in a type. The leftmost bit of I is `BIT_SIZE(I-1)'.


  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003