PCL Reference Manual > Introduction > Function Description Organization
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
Function Description Organization
The function descriptions that follow this chapter all use a common organization scheme for the information that they contain. The information layout is designed to place the most useful information about the function towards the front of the description so that it is easy to find. The details are placed towards the end of the description so that they can be found quickly but are separated out so that they do not serve as a distraction to the user.
Each description is composed of seven sections: the function name and argument list, the “Description”, the “Input” section, the “Output” section, the “Error Conditions” section, the “Remarks” section, and the “Example” section.
 
The Function Name and Argument List:
This heading, which starts the description of the function, identifies the name of the function and provides a list of arguments passed to the function. The argument list identifies the order in which they are passed to the function and by the names used for the arguments provide some information about how the arguments are used.
The Description Section:
This section provides a short description of what the function does and is to be used for.
The Input Section:
This section lists the values from the argument list at the top of the function description that are used for passing input information to the function being called. Each entry in this section will list the data type for that argument, the name of the argument, a description of the use of each argument, and an enumeration of the values or the range of values that can be used with each argument. The data types allowed in this section are REAL, INTEGER, LOGICAL, STRING, and WIDGET. Each argument listing will make use of square brackets “[]”, parenthesis “()” and the VIRTUAL keyword to identify the lengths of strings and the sizes of arrays when it is appropriate to do so. If the enumerated list of values that can be used with an argument is longer than about five entries, the list of allowed argument values will be listed as part of the remarks for the section.
The Output Section:
This section lists the values from the argument list at the top of the function description that are used for passing output information to the calling function. Each entry in this section will list the data type for that argument, the name of the argument, a description of the use of each argument, and an enumeration of the values or the range of values that can be used with each argument. The data types allowed in this section are REAL, INTEGER, LOGICAL, STRING, and WIDGET. Each argument listing will make use of square brackets “[]”, parenthesis “()” and the VIRTUAL keyword to identify the lengths of strings and the sizes of arrays when it is appropriate to do so. If the enumerated list of values that can be used with an argument is longer than about five entries, the list of allowed argument values will be listed as part of the remarks for the section.
This section will also list the <return value> for the function, if the function has one.
Error Conditions:
This section is used to enumerate the list of numbers that can be returned to report the status of a function through the <return value> of a function and the messages from the status message database that can be associated with each number. Every attempt has been made to make these lists as complete as possible but it is often impractical or impossible to do so. This section will contain a statement marking an error condition list as being incomplete when possible.
The Remarks Section:
This section is used to do several things: provide enumerated lists of values that can be used with inputs or are expected to be returned by outputs if they are too long for the “Input” and “Output” sections, list the messages that can be displayed in a popup form, and list any other details or information about the function that may be useful to a user.
Many times the information in the “Remarks” section of a function description will seem redundant as it will duplicate much of the information listed in the “Error Conditions” section. The information is listed twice because it is being used to do two separate jobs: present information through a popup form and it is being used as a return value for program execution flow control.
The Examples Section:
This section of the function description contain a reference to a .pcl source file listing that makes use of the function being described.