ANS85 

Intrinsic Functions

General Description

An intrinsic function is a temporary data item whose value is determined at the time the function is referenced during the execution of a statement. An intrinsic-function-name is a COBOL word that is one of a specified list of COBOL words which can be used in COBOL source programs. (For a list of all the available functions, see the topic Definitions of Functions .)

Function Definition and Returned Value

The definition of each function specifies:

Function Identifier

A function identifier is used to reference a function in the Procedure Division of a COBOL source program.

The value returned by a function is considered to be a data value. A mechanism is provided at run time to assign a data value to a function when it is referenced. In order to determine the function's value, the evaluation mechanism requires access to data values provided by the referencing program. These data values are provided by specifying parameters, known as arguments, when referencing the function. Specific functions can place constraints on these arguments, such as range, and so on. If, at the time a function is referenced, the arguments specified for that reference do not have values that comply with the specified constraints, then the returned value for the function is undefined.