Cicode Programming Reference > Using Cicode Programming Standards > Function Naming Standards > Function headers

Function headers

Functions should have a descriptive header, formatted as follows:

//**	FUNCTION :	<name of function>
//**
//** DESCRIPTION : <suggests the operation, application source and
//** multi-tasking issues>
//** REVISION DATE BY COMMENTS
//** <revision number> <date> <author> <comments about the change>
//**
//** ARGUMENTS: <argument description>
//**
//** RETURNED VALUE: < description of possible return values>
//**
//** NOTES:

The order of functions in a file is important for efficient operation.

Initialization and shutdown functions should be placed at the top of the file. Command functions should be next. Local utility functions should be at the bottom of the file.

For example:

//**	FUNCTION :	OpenRecipeDatabase
//**
//** DESCRIPTION : Opens the specified database.
//**
//** REVISION DATE BY COMMENTS
//** 1 28/09/97 BS Original
//** 2 05/10/97 SFA Added INI checking
//**
//** ARGUMENTS:
//**
//** STRING sName Name of the recipe database.
//**
//** INT dwMode Mode to open the recipe database.
//** 0 for read only, 1 for read/write.
//**
//** RETURNED VALUE: Handle if successful, otherwise -1.
//**
//** NOTES:
INT
FUNCTION
OpenRecipeDatabase(STRING sName, INT dwMode)
...
END