[chbot] return value or status from function

Col colp42 at gmail.com
Fri Feb 5 06:09:06 GMT 2016


>
> 3) function returns status, the value is stored in an argument variable:
> ...
> unint8_t readSomePin(uint8_t *returnedValue);
>

Return TRUE or FALSE to make code more structured and readable

eg

if( readSomePIN(...) )
	//process result
else
	//deal with error


Col.



More information about the Chchrobotics mailing list