Missing return type for method 'ISR'

If you do any event-driven programming, you have to use callbacks. On a form, for example, you define a button, and register a function to be called when the button is pressed.

attachInterrupt() is a mechanism for registering a callback. The second argument is the function to be called when the conditions are right (i.e. when the interrupt occurs).

Typically, ISR's do not return values, but there are other cases where a callback function IS supposed to return a value.

I could post an example of a callback function, callback registration function, and callback invocation code that I wrote recently, but it has nothing to do with Arduino (more like a paycheck), so I won't. The whole purpose was to let one class define the color of a cell in a table while the other class managed the display and other properties of the table. Since the table class was designed to be used in many places, the using application needed to have control over the cell color which is based on a property of the cell. Some applications might want cells with the error set to be red, while others might want the cell to be purple. Having the table class define the color would have prevented that from happening. Having the class that instantiated the table register a function to be called when the cell color was needed made it possible.