# bloomberg feeder : Bloomberg.c , kdb+ Update function

**URL:** <https://forum.kx.com/t/bloomberg-feeder-bloomberg-c-kdb-update-function/11607>\
**Category:** Community Support\
**Tags:** kdb-and-q\
**Created:** [September 4, 2017, 6:47pm UTC](https://forum.kx.com/t/bloomberg-feeder-bloomberg-c-kdb-update-function/11607 "2017-09-04T18:47:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eric2](https://avatars.discourse-cdn.com/v4/letter/e/8c91f0/32.png) [@Eric2](https://forum.kx.com/u/Eric2)\
**Post date:** [September 4, 2017, 6:47pm UTC](https://forum.kx.com/t/bloomberg-feeder-bloomberg-c-kdb-update-function/11607/1 "2017-09-04T18:47:00Z")

</div>

Hi,&nbsp;

In the c code bloomberg.c, this line call q function Update:&nbsp;

K ret = k(0, “Update”, u, (K)0); and u is a created by K u = knk(3, ks(ss((S)blpapi\_Message\_typeString(m))), ki(c.value.intValue), sequence\_to\_dictionary(e));

According to [http://code.kx.com/q/interfaces/q-client-for-bloomberg/](http://code.kx.com/q/interfaces/q-client-for-bloomberg/), The q Update function is defined like:

Update:{@[value;x;-1Update: ',string[x 0]," ",]}

Really don’t understand how above line of Update function works

Thanks for your help.

Eric

---

<div class="post-metadata">

**Author:** ![effbiae](https://avatars.discourse-cdn.com/v4/letter/e/ecae2f/32.png) [@effbiae](https://forum.kx.com/u/effbiae)\
**Post date:** [September 5, 2017, 5:03am UTC](https://forum.kx.com/t/bloomberg-feeder-bloomberg-c-kdb-update-function/11607/2 "2017-09-05T05:03:00Z")

</div>

hi eric,

Update should be:

&nbsp;Update:{@[value;x;-1"Update: '“,string[x 0],” ",]}

?it might be more apparent now that it finds value and traps any error, printing to stdout.?

---

<div class="post-metadata">

**Author:** ![SJT1](https://avatars.discourse-cdn.com/v4/letter/s/eb8c5e/32.png) [@SJT1](https://forum.kx.com/u/SJT1)\
**Post date:** [September 5, 2017, 11:20am UTC](https://forum.kx.com/t/bloomberg-feeder-bloomberg-c-kdb-update-function/11607/3 "2017-09-05T11:20:00Z")

</div>

Apologies for the superfluous escape characters in the code block  now removed.&nbsp;

Thanks for the catch!

Stephen Taylor | Librarian | **Kx** | +44 7713 400852 | stephen@kx.com
