pivot table

I dont get how k:k generates a dictionary on the page here http://code.kx.com/wiki/Pivot

It doesn’t create a dictionary, it only gives a name to the keyed column so that you get

q)exec P#(p!v) by k:k from tk| xx yy zz-| --------1| 102| 40 203| 50 30

Instead of

q)exec P#(p!v) by k from t | xx yy zz-| --------1| 102| 40 203| 50 30

Zak

alternate syntax

q)exec P#p!v by([]k)from t
k| xx yy zz
-| --------
1| 10
2| 40 20
3| 50 30