C programming style question

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

ZirconiumX
Posts: 1334
Joined: Sun Jul 17, 2011 11:14 am

Re: C programming style question

Post by ZirconiumX »

Code: Select all

if ((i & 0x88 ? false : true))
I'd suggest you use this instead, because C defines true to be anything other than zero.

Code: Select all

if (!(i & 0x88))
And really, you should update your compiler. The raw MSVC++ 2015 toolchain is available for free as part of the Windows SDK.

Matthew:out
Some believe in the almighty dollar.

I believe in the almighty printf statement.