# dot form of amend

**URL:** <https://forum.kx.com/t/dot-form-of-amend/6719>\
**Category:** Community Support\
**Tags:** kdb-and-q\
**Created:** [September 10, 2010, 1:38pm UTC](https://forum.kx.com/t/dot-form-of-amend/6719 "2010-09-10T13:38:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![z0mz0m](https://avatars.discourse-cdn.com/v4/letter/z/a587f6/32.png) [@z0mz0m](https://forum.kx.com/u/z0mz0m)\
**Post date:** [September 10, 2010, 1:38pm UTC](https://forum.kx.com/t/dot-form-of-amend/6719/1 "2010-09-10T13:38:00Z")

</div>

Hi,  
i did this :  
?  
b:(10 20 30;40 50 60)

.[b;enlist( (0;0) (1;1));\*;10]  
/(1000 2000 3000;40 50 60)/

.[b;( (0;0) (1;1));\*;10]  
/(100 20 30;40 50 60)/

.[b;((0;0);(1;1));\*;10]  
/(10 200000 30;40 50 60)/

i do not understand the results … i mean there is a way of passing a list of changes to be made to a hierarchical structure  
?  
?  
for the @ version i can see how setting a list of indices works, but for dot format is not obvious for me …  
?  
Thank you,  
Best regards,  
Eugen

–  
Eugen

---

<div class="post-metadata">

**Author:** ![Aaron\_Davies](https://avatars.discourse-cdn.com/v4/letter/a/8e7dd6/32.png) [@Aaron\_Davies](https://forum.kx.com/u/Aaron_Davies)\
**Post date:** [September 10, 2010, 2:57pm UTC](https://forum.kx.com/t/dot-form-of-amend/6719/2 "2010-09-10T14:57:00Z")

</div>

Most of those aren’t doing what you think they are–(0;0)(1;1) is an  
application of one list to another, same as 0 0@1 1.

This seems to work, not sure if there’s a better way

q)./[b;;\*;10](0 0;1 1)  
100 20 30  
40 500 60

---

<div class="post-metadata">

**Author:** ![Attila](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@Attila](https://forum.kx.com/u/Attila)\
**Post date:** [September 10, 2010, 3:04pm UTC](https://forum.kx.com/t/dot-form-of-amend/6719/3 "2010-09-10T15:04:00Z")

</div>

normal indexing:  
q)0N!b(0 0;1 1);  
((10 20 30;10 20 30);(40 50 60;40 50 60))  
q)0N!b . enlist(0 0;1 1)  
((10 20 30;10 20 30);(40 50 60;40 50 60))

cross-sectional indexing  
q)b[0 0;1 1]  
20 20  
20 20  
q)b .(0 0;1 1)  
20 20  
20 20  
q)b[0 0][;1 1]  
20 20  
20 20

so in your last amend you multiply four times

what you are looking for i think  
q)./[b;(0 0;1 1);\*;10]  
100 20? 30  
40? 500 60  
? Attila

---

<div class="post-metadata">

**Author:** ![z0mz0m](https://avatars.discourse-cdn.com/v4/letter/z/a587f6/32.png) [@z0mz0m](https://forum.kx.com/u/z0mz0m)\
**Post date:** [September 10, 2010, 3:13pm UTC](https://forum.kx.com/t/dot-form-of-amend/6719/4 "2010-09-10T15:13:00Z")

</div>

understood . thx !!!
