Hi,
I'm still working on the translation of some Fortran code peaces into Visual Basic 2010 and tripped over an expression which doesn't make sense to me:
For my understaning "LODD" is a boolean which will be true if "IWINDO" is not equal to "(IWINDO/2)*2. That doesn't make sense to divide by 2 an then multiply by 2 again, or does it?
Or is there some Fortran typical consideration I'm missing?
The code is from an official agancy and a simple mathematical mistake like that shouldn't be there.
Thanks, Tobias
I'm still working on the translation of some Fortran code peaces into Visual Basic 2010 and tripped over an expression which doesn't make sense to me:
Code:
PARAMETER(IWINDO=4)
LOGICAL LODD
LODD=(IWINDO/2)*2.NE.IWINDO
If(LODD) THEN
...
ENDIF
For my understaning "LODD" is a boolean which will be true if "IWINDO" is not equal to "(IWINDO/2)*2. That doesn't make sense to divide by 2 an then multiply by 2 again, or does it?
Or is there some Fortran typical consideration I'm missing?
The code is from an official agancy and a simple mathematical mistake like that shouldn't be there.
Thanks, Tobias