Comparisons involving index-names, index data items, or both conform to the following rules:
Because an integer function can be used wherever an arithmetic expression can be used, you can compare an index-name to an integer or numeric function.
Valid comparisons for index-names and index data items are shown in the following table.
| Operands compared | Index-name | Index data item | Data-name (numeric integer only) | Literal (numeric integer only) | Arithmetic Expression |
|---|---|---|---|---|---|
| Index-name | Compare occurrence number | Compare without conversion | Compare occurrence number with content of referenced data item | Compare occurrence number with literal | Compare occurrence number with arithmetic expression |
| Index data item | Compare without conversion | Compare without conversion | Invalid | Invalid | Invalid |