A function that contains a return is prefixed with a type name. If the function has parameters to be passed in, the parameters will be contained in parenthesis and suffix the function name. For example, a function that returns an integer and has a char parameter would look like this:
The Example in the video was created for the ButtonPress library.
int functionName(char variableThatIsChar)
{
some code
...
return anIntegerValue;
}
The integer return value is created from the code within the function.
Comments and Additional Information
Have some code to share? Or additional information? Respond here:
You need to be logged in to save a response on this page. The response must be constructive, helpful, supplimentary or to correct the existing video, code or narrative content.