Keywords: gildas-prog

Next: SIC Callable Routines Up: SIC Programming Manual - Previous: Deleting Variables Contents Index

# Using Functions

It is possible to define user callable functions which are recognized in the mathematical formulae evaluations, using subroutine `SIC_DEF_FUNC` as follows

        CALL SIC_DEF_FUNC(NAME,SF,DF,NARG,ERROR,HLPFILE)
    where
        NAME    is the function name
        SF      is the address of the single precision implementation of
                the function
        DF      is the address of the double precision implementation of
                the function
        NARG    is the number of arguments of the function.
        ERROR   is an error flag
        HLPFILE is a file name or SIC logical value where function help
                can be found (optional argument)

Both single and Double precision routines will be called like as (e.g. for two arguments)

        S = SF(arg1,arg2)      and      D = DF(arg1,arg2)