The function module manages all functions used in IDDL. Functions can be used within expressions and are therefore called when variables are evaluated which contain them. The type of a function depends on the place of its definition. Three different types are available:
Built-in functions are implemented within the function module. They are either mathematical or supplementary functions. Mathematical functions comprise, e.g., trigonometric functions, exponent, or logarithms and are defined for real and complex numbers. Supplementary functions are conversion functions and special functions. Conversion functions convert the result of an expression to a certain value type. Special functions are used, e.g., to extract the unit of a quantity, to extract the real or imaginary part of a complex number, or to get the value of an environment variable. The if() function can be used for conditional evaluations.
Application specific functions are used to extend the functionality of the Input Deck database for a certain application. Application specific functions are coded inside the application. The application has to register each new function to the Input Deck database. An arbitrary number of functions can be registered. The functions are only called by the evaluation module when an expression containing them is evaluated. This behavior is similar to that of call-back functions whereas the event is triggered by the application.
With IDDL user-defined functions can be defined very easily. Thus, the functionality of the description language can simply be enlarged and customized.
Robert Klima 2003-02-06