# Functions

An IDC function always returns a value. There are 2 kinds of functions:

* [built-in](https://docs.hex-rays.com/9.0/developer-guide/idc/idc-api-reference/alphabetical-list-of-idc-functions) functions
* user-defined functions A user-defined function is declared this way: static func(arg1,arg2,arg3) { [statements](https://docs.hex-rays.com/9.0/developer-guide/idc/core-concepts/statements) ... } It is not necessary to specify the parameter types because all necessary type conversions are performed automatically.

By default all function arguments are passed by value, except:

```
  - objects are always passed by reference
  - functions are always passed by reference
  - it is possible to pass a variable by reference using the & operator
```

If the function to call does not exist, IDA tries to resolve the name using the debugged program labels. If it succeeds, an [dbg\_appcall](https://docs.hex-rays.com/9.0/developer-guide/idc/idc-api-reference/alphabetical-list-of-idc-functions/1572) is performed.
