logical ops on bit fields

Tim Prince n8tm@aol.com
Wed Jan 13 13:56:00 GMT 2010


David Carr wrote:
> On my vax port of zork to windows:
> 
> uses:
>  if((iflag.and.64).ne.0)
> and
>  if((iflag.and.64).eq.0)
> to test a bit in iflag.
> 
> Won't compile, tried tricking it with EQUIVALANCES between LOGICALs
> and INTEGERs, but ".and." doesn't seem to do bitwise and but rather
> sees if each operand is non-zero.
> I am going to be able test bits in a var?
The IAND intrinsic was standardized 2 decades ago.



More information about the Fortran mailing list