Actions

EmSys

CCoding Style - Use active names for functions

From EdWiki

Use active names for functions

  • Function names should be based on active verbs, perhaps followed by nouns.
now = getTime(); , putchar(‘m’); , etc
  • Functions that return a Boolean (true/false) value should be named so that the return value is unambiguous.
if( checkOctal( c ) ) 

doesn’t indicate which value is true and which is false, while

if( isoctal( c ) )  

makes it clear that the function returns true if the argument is octal and false if not.