This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: need help on gfortran and C++


Hi Tobias,

2012/1/11 Tobias Burnus <burnus@net-b.de>:
>
>
> There is a reason that I wrote C99, _Bool and talked about ".not." ("!").
> C99 does make a difference between _Bool and int.
>

I suspected as much, but if I use "if ( (_Bool) i )" in my small program,
the result is the same.

I also added:

        if ( ! ((_Bool) i) ) {
            printf( "(2) %d: true\n", i );
        } else {
            printf( "(2) %d: false\n", i );
        }

to check the effect of the negation operation - nothing unexpected happened.
That is: everything was false, except for !0.

Regards,

Arjen


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]