C programming style question

Discussion of chess software programming and technical issues.

Moderator: Ras

ZirconiumX
Posts: 1361
Joined: Sun Jul 17, 2011 11:14 am
Full name: Hannah Ravensloft

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
tu ne cede malis, sed contra audentior ito