Home > Archive > Fortran > December 2005 > Re: Kind of NOT integer constant
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: Kind of NOT integer constant
|
|
|
| I was not trying to set -1 value in a clever way but setting all bits
of the integer to 1.
In any case, doing
A = 0
A = NOT(A)
avoids any processor independent behaviour and gives the expected
result.
Thank you,
| |
| Richard Maine 2005-12-17, 7:01 pm |
| rofi <rofi@ya.com> wrote:
> A = 0
> A = NOT(A)
If A is of default integer kind and that gives a result any different
from
A = NOT(0)
then the processor is violating the standard... which I had more or less
concluded already. The result of NOT deepnds only on the kind and value
of its argument. It is not allowed to depend onwhether its argument is a
variabel or literal. Nor is the kind of the literal 0 allowed to depend
on context.
--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain
|
|
|
|
|