Re: [CHALLENGE] finding rightmost zero bit - C programmer's take



On 2005-08-30, Dr Ivan D. Reid <Ivan.Reid@xxxxxxxxxxxx> wrote:
>
> Why not
> x=y
> do i=0,31
> if(iand(x,1).eq.0) exit
> x=ishft(x,-1)
> enddo
> ...
> ? Despite my grounding in older FORTRAN I find some of the newer constructs
> more readable.

And next to that, the above is legal F-syntax :-)

Regards,
Bart

--
"Share what you know. Learn what you don't."
.



Relevant Pages

  • Re: [CHALLENGE] finding rightmost zero bit - C programmers take
    ... Despite my grounding in older FORTRAN I find some of the newer constructs ... The forward GOTO to a CONTINUE ending a DO-loop appears to be legal ... Prev by Date: ...
    (comp.lang.fortran)
  • Re: [CHALLENGE] finding rightmost zero bit - C programmers take
    ... > N. Shamsundar wrote: ... Despite my grounding in older FORTRAN I find some of the newer constructs ... Prev by Date: ...
    (comp.lang.fortran)
  • Re: reading an external text file
    ... end program harper8 ... <Fortran programmers are becoming rare, ... <learn and appreciate the language. ... <Bart Vandewoestyne schrieb: ...
    (comp.lang.fortran)
  • Re: complex arithmetics
    ... |> Your statement was true in some previous version of Fortran. ... |> can specify the KIND argument optionally, ... |REAL and CMPLX when no optional KIND argument is present. ... Prev by Date: ...
    (comp.lang.fortran)
  • Chopping off spaces at both ends
    ... trimintrinsic in fortran 95. ... and that is complicating string matching tests in one of my functions. ... Prev by Date: ...
    (comp.lang.python)