Next: Constants Up: The Language Previous: Defaults for Parameters

### Functions

The system distinguishes between number functions, co-ordinate functions and text functions.

The system offers programmed default functions. In addition, the user may also put in user defined functions.

1. User defined functions

   The command

              CREATE FUNCTION N ( = Number )
                              C ( = Coordinate )
                              T ( = Text )

   serves to create a function for the respective type of result. A function is an object like a point or a line etc. Thus a self-defined function is filed under the active part and can only be used as formula there.

   In the function the parameters to be used will be defined with the special character '@' and the number of the parameter.

   e.g.:

              CREATE FUNCTION T
                 TCAT( @1 ; CONVN2T( @2 ; @4 ) ; "," ; CONVN2T( @3 ; @4 ) ) !

   In this example a function is defined with four input parameters. The position of the wildcards also determines the setting of the respective parameter. Parameter 1 has to be set with text. Parameters 2 and 3 are real numbers. Parameter 4 is a real number, too. This parameter is used twice in the function. The result of the function is a text string which is consists of the concatenation of the four individual strings.

2. Number functions

   The default number functions of the system are to be seen under appendix B.

3. Co-ordinate functions

   The default co-ordinate functions of the system are to be seen under appendix B.

4. Text functions

   The default text functions of the system are to be seen under appendix B.

5. Functions with selectable result types

   Some functions determine their type during their use. If such a function is used when setting a number parameter, a number is resulting, with a