Good Morning!
I’m taking advantage of the weekend to study q.
Right now I’m at:
https://code.kx.com/phrases/shape/#conform-table-x-rows-to-list-y
When executing the line below …
q) x: 3 3#1+!9
'!
[0] x: 3 3#1+!9
^
I did not understand.
Best Regards
Geraldo
Thank you very much Jason Fealy.
k -> !9
q -> til 9
Em sábado, 17 de outubro de 2020 às 12:04:27 UTC-3, Jason Fealy escreveu:
That example is k
q)3 3#1+til 9
1 2 3
4 5 6
7 8 9
q)\
3 3#1+!9
(1 2 3;4 5 6;7 8 9)
technically, ! in k is equivalent to key in Q, but for the above use case til (a wrapper around key) is more commonly used
q)3 3#1+key 9
1 2 3
4 5 6
7 8 9
SJT1
5
Jason is correct: !9 was an untranslated k fragment now corrected to til 9. Apologies for the typo.
Knowledge of k can be useful for reading parse trees; but generally k is exposed infrastructure.
Stephen Taylor | Librarian | Kx | +44 7713 400852 | stephen@kx.com