Next: , Previous: Function Result, Up: Documenting Your Code


3.9 References

When writing the documentation of an element you often need to refer to another element. For example, in the Max function, we could add a link to the Min function.

The format of a link is ‘<<Target>>’ or ‘<<Text Target>>’ (see Links).

     Example: Links in descriptions  
      1  Function: Max -- Return largest of two values.
      2
      3    Max returns the maximum of A and B.
      4
      5    See <<Min>>.
      6
      7    Parameters:
      8      - A -- first value
      9      - B -- second value
     10
     11  Function: Min -- Return smallest of two values.
     12
     13    Min returns the minimum of A and B.
     14
     15    <<Click Here Max>>.
     16
     17    Parameters:
     18      - A -- first value
     19      - B -- second value

But often it is better that these links are grouped in a special section. For this we can use the See Also header.

     Example: Using a See Also header  
      1  Function: Max -- Return largest of two values.
      2
      3    Max returns the maximum of A and B.
      4
      5    Parameters:
      6      - A -- first value
      7      - B -- second value
      8
      9    See Also: <<Min>>
     10
     11  Function: Min -- Return smallest of two values.
     12
     13    Min returns the minimum of A and B.
     14
     15    Parameters:
     16      - A -- first value
     17      - B -- second value
     18
     19    See Also: <<Max>>

A See Also header can only appear once per element.