# sv/:string  vs.  sv string/:

**URL:** https://forum.kx.com/t/sv-string-vs-sv-string/11497
**Category:** Community Support
**Tags:** kdb-and-q
**Created:** [February 18, 2017, 7:07am UTC](https://forum.kx.com/t/sv-string-vs-sv-string/11497 "2017-02-18T07:07:00Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![ag12](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@ag12](https://forum.kx.com/u/ag12)
#### Post date: [February 18, 2017, 7:07am UTC](https://forum.kx.com/t/sv-string-vs-sv-string/11497/1 "2017-02-18T07:07:00Z")

</div>

`q)a`a`b`c`d`e`f`g`h`i`j`kq)m:0N 3#aq)m`a`b`c`d`e`f`g`h`i`j`kq)q)"+" sv/:string each m"a+b+c""d+e+f""g+h+i""j+k"q)q)/ why doesn't this work?q)"+" sv string/:m'/: [0] "+" sv string/:m ^`

---

<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: [February 18, 2017, 10:48am UTC](https://forum.kx.com/t/sv-string-vs-sv-string/11497/2 "2017-02-18T10:48:00Z")

</div>

q has Noun, Adverb and Verb  
it seems that q allows NNA as in "+"sv/:  
but not NA as in string/:

it does allow NVA as in string@/:

N and V are terms, so it seems q allows NtA

---

<div class="post-metadata">

### Author: ![Davide\_Corti1](https://avatars.discourse-cdn.com/v4/letter/d/b5a626/32.png) [@Davide\_Corti1](https://forum.kx.com/u/Davide_Corti1)
#### Post date: [February 18, 2017, 12:00pm UTC](https://forum.kx.com/t/sv-string-vs-sv-string/11497/3 "2017-02-18T12:00:00Z")

</div>

It has to do with the arity of the verb or function.

Adverbs such as “each-both”, “each left” and “each right” are supposed to be applied to dyadic verbs or functions (e.g., sv).

The equivalent adverb for monadic verbs of functions (e.g., string) is “each”.

string@/:m works because “@” in this case is applied in its dyadic form to the arguments “string” and “m”.

HTH,

Davide Corti | KDB+ Engineer | **Kx** | +44-7926-223284 | dcorti@kx.com

---

<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: [February 18, 2017, 12:19pm UTC](https://forum.kx.com/t/sv-string-vs-sv-string/11497/4 "2017-02-18T12:19:00Z")

</div>

\>supposed to be applied to dyadic verbs or functions

q)+/1 2 3

'/

---

<div class="post-metadata">

### Author: ![Davide\_Corti1](https://avatars.discourse-cdn.com/v4/letter/d/b5a626/32.png) [@Davide\_Corti1](https://forum.kx.com/u/Davide_Corti1)
#### Post date: [February 20, 2017, 9:18pm UTC](https://forum.kx.com/t/sv-string-vs-sv-string/11497/5 "2017-02-20T21:18:00Z")

</div>

Hi Jack,

The adverb you are using in this case is “over”.

To apply it to your last example, you need brackets:

q)(+/)1 2 3

6

The adverb we were considering previously is “each-right”.  
You can use it with “+” for instance as follows:

q)1+/:1 2 3

2 3 4

q)1 2+/:4 3 2

5 6

4 5

3 4

Regards,

Davide Corti | KDB+ Engineer | **Kx** | +44-7926-223284 | dcorti@kx.com

---

<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: [February 20, 2017, 11:52pm UTC](https://forum.kx.com/t/sv-string-vs-sv-string/11497/6 "2017-02-20T23:52:00Z")

</div>

Thanks Davide,

It does appear that /: needs a dyad with an initial value to the left:

q)3 {x,y}/:(0 1;2 3;4 5)

3 0 1

3 2 3

3 4 5

[as the reference states]

it also appears to apply to other adverbs:

q)0+/1 2 3

6

so (NtAe) is a q expression:

q)0{y\*y}'til 4

0 1 4 9

jack
