next up previous contents index
Next: Predicates Up: Naming Conventions Previous: Types and Tags

 

Functions

 

The philosophy behind the choice of function names is that the name of a function should describe the result of the function as accurate as possible. This implies, that names for functions are in general not abbreviated.

We distinguish between two types of functions:

  1. functions that return a value and
  2. functions that return void, i.e. no value (such functions are frequently called ``procedures'').

We usually choose the noun(s), which describe(s) the result of the function as name of a function of type 1 (on rare occasions we also use a second participle) whereas for procedures we use the verb describing the action of the procedure.

Examples:
We call the function that multiplies two monomials product_mon (not multiply_mon), the function that interreduces a polynomial set inter_reduced_ps, and the procedure that prints a monomial print_mon.



windsteiger wolfgang
Thu Sep 3 14:50:07 MDT 1998