Contents Previous Next

Functions and Methods

All implementations of functions and methods must begin with a comment header describing what the function does, the possible input limits (if any), and the possible output values (if any), and any special information needed, as follows:

    /*
     * 'do_this()' - Compute y = this(x).
     *
     * Notes: none.
     */

    float            /* O - Inverse power value, 0.0 <= y <= 1.1 */
    do_this(float x) /* I - Power value (0.0 <= x <= 1.1) */
    {
      ...
      return (y);
    }

Return/output values are indicated using an "O" prefix, input values are indicated using the "I" prefix, and values that are both input and output use the "IO" prefix for the corresponding in-line comment.


Contents Previous Next