This
_nAddrBytes = deviceCapacity > kbits_16 ? 2 : 1;
Thanks.
This
_nAddrBytes = deviceCapacity > kbits_16 ? 2 : 1;
Thanks.
if deviceCapacity is greater than kbits_16 it sets _nAddrBytes to 2 else it sets it to 1
if (deviceCapacity > kbits_16)
{
_nAddrBytes = 2;
}
else
{
_nAddrBytes = 1;
}
Is it a C or C++ standard? If it is not C, can C do the same thing? Also, under what topic is this code(conditional statements, loops, etc?)
cyberjupiter:
Is it a C or C++ standard? If it is not C, can C do the same thing? Also, under what topic is this code(conditional statements, loops, etc?)
Yes, ternary conditional operator.
Alright. I posted #3 without reviewing #2 first. That really clears me up.
Thanks @aarg and UKHeliBob.