First, define the purpose of the function group, and create an outline of the tasks to be performed. The following example shows an outline for a group of functions that change the threshold values of analog alarms during run time. The outline describes the workings of the function group, and is written in pseudocode (also called Program Design Language).
/*
This file contains functions to allow the operator to make runtime changes to Analog Alarm thresholds.
This file has 4 functions. The master function calls the other functions.
ChangeAnalogAlarmThresholds ( )
This calls in turn:
1:GetVariableTag ( )
Argument: cursor position
Return: name of variable tag at cursor
2:GetAlarmThresholds ( )
Argument: tag name
Return: threshold value of alarm
3:DisplayAlarmThresholds ( )
Argument: threshold value of alarm
Displays threshold values in prompt line
Return: success or error code
*/