why is -': [1 2 4] different from {x-y}': [1 2 4]

Hi there,

I’m wondering why the code below returns different results.

q)-': [1 2 4]

1 1 2


q){x-y}': [1 2 4]

0N 1 2

Actually is there a way to interrupt the execution and track the calculation step by step? I Almost know nothing about debugging in q …


Any help is greatly appreciated!


Thanks,


Xinyu

I *think* q special-cases ': when you’re using built-in operators like -.


Ryan
[ERROR]: Your autotools build scripts are 200 lines longer than your program. Something’s wrong.
http://kirbyfan64.github.io/

http://code.kx.com/wiki/Reference/ApostropheColon

Hi thank you all for the reply. Good to know this!

Xinyu