Next: Functions and Arrays Up: Functions Previous: Functions

void functions

The void function provides a way of emulating PASCAL type procedures.

If you do not want to return a value you must use the return type void and miss out the return statement:

void squares()

This void function would be called such as:

main()

NOTE: We must have () even for no parameters unlike some languages.


drago@scri.fsu.edu
Jan. 1997