# DLL functions -- 2: only supports functions with rank &gt;= 1?

**URL:** <https://forum.kx.com/t/dll-functions-2-only-supports-functions-with-rank-gt-1/9483>\
**Category:** Community Support\
**Tags:** kdb-and-q\
**Created:** [February 11, 2015, 11:56am UTC](https://forum.kx.com/t/dll-functions-2-only-supports-functions-with-rank-gt-1/9483 "2015-02-11T11:56:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Flying1](https://avatars.discourse-cdn.com/v4/letter/f/f4b2a3/32.png) [@Flying1](https://forum.kx.com/u/Flying1)\
**Post date:** [February 11, 2015, 11:56am UTC](https://forum.kx.com/t/dll-functions-2-only-supports-functions-with-rank-gt-1/9483/1 "2015-02-11T11:56:00Z")

</div>

Hi,

I’d like to confirm if 2: supports only functions with rank \>= 1. If so, what’s the rationale to disallow 0-argument functions from being called through to DLLs?

Thanks,

Freddie

---

<div class="post-metadata">

**Author:** ![mark\_rooney](https://avatars.discourse-cdn.com/v4/letter/m/278dde/32.png) [@mark\_rooney](https://forum.kx.com/u/mark_rooney)\
**Post date:** [February 11, 2015, 12:21pm UTC](https://forum.kx.com/t/dll-functions-2-only-supports-functions-with-rank-gt-1/9483/2 "2015-02-11T12:21:00Z")

</div>

Hi Freddie,

I believe this restriction is due to the fact that all functions in kdb are technically 1+ argument  
functions (even if they appear to take none). Calling a function f with no arguments (e.g f) just passes  
in a dummy argument to the function that is not used. So if you want to have a zero argument function in  
your C code, you just define it with one argument and don't use the argument.

## Thanks

Mark Rooney  
Financial Software Developer  
AQUAQ Analytics

---

<div class="post-metadata">

**Author:** ![charlie1](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@charlie1](https://forum.kx.com/u/charlie1)\
**Post date:** [February 11, 2015, 12:24pm UTC](https://forum.kx.com/t/dll-functions-2-only-supports-functions-with-rank-gt-1/9483/3 "2015-02-11T12:24:00Z")

</div>

confirmed. kdb+ functions, whether in q/k or c, always take at least one argument. If unspecificied, it is identity (::)

---

<div class="post-metadata">

**Author:** ![Flying1](https://avatars.discourse-cdn.com/v4/letter/f/f4b2a3/32.png) [@Flying1](https://forum.kx.com/u/Flying1)\
**Post date:** [February 11, 2015, 12:36pm UTC](https://forum.kx.com/t/dll-functions-2-only-supports-functions-with-rank-gt-1/9483/4 "2015-02-11T12:36:00Z")

</div>

Thanks for the confirmation. Yes, that’s my observation so far and my “work-around” as well.

---

<div class="post-metadata">

**Author:** ![Flying1](https://avatars.discourse-cdn.com/v4/letter/f/f4b2a3/32.png) [@Flying1](https://forum.kx.com/u/Flying1)\
**Post date:** [February 11, 2015, 12:36pm UTC](https://forum.kx.com/t/dll-functions-2-only-supports-functions-with-rank-gt-1/9483/5 "2015-02-11T12:36:00Z")

</div>

Thanks for the confirmation. Yes, that’s my observation so far and my “work-around” as well.
