Hi, KDB Folks
Could you help me understand this indexing:
d:((1 2 3;4 5 6 7);(8 9;10;11 12);(13 14;15 16 17 18;19 20))
d@enlist 1
why d@enlist 1 gives a simple list: 8 9 10 11 12?
Thanks,
YE LIU
–
Submitted via Google Groups
Hi, KDB Folks
Could you help me understand this indexing:
d:((1 2 3;4 5 6 7);(8 9;10;11 12);(13 14;15 16 17 18;19 20))
d@enlist 1
why d@enlist 1 gives a simple list: 8 9 10 11 12?
Thanks,
YE LIU
–
Submitted via Google Groups
it is not a simple list.
type d@(enlist 1)
0h
it is the same as enlist d@1
it doesn’t, show is hiding the structure from you. use k or define a
function to show the real details. (actually just define a function.
even k hides ::.)
q)type d@enlist 1
0h
q)\
d@,1
,(8 9;10;11 12)
q)unshow
{-1@-3!x;}
q)unshow d@enlist 1
,(8 9;10;11 12)
Thanks, Aaron and Chen Xi. I see: it is a compsite list.dbOn May 11, 12:03?pm, Aaron Davies <aaron.dav…> wrote:> it doesn’t, show is hiding the structure from you. use k or define a> function to show the real details. (actually just define a function.> even k hides ::.)>> q)type d@enlist 1> 0h> q)> ?d@,1> ,(8 9;10;11 12)> q)unshow> {-1@-3!x;}> q)unshow d@enlist 1> ,(8 9;10;11 12)>>>>>> On Tuesday, May 11, 2010, dbtouch <dbto…> wrote:> > Hi, KDB Folks>> > Could you help me understand this indexing:>> > d:((1 2 3;4 5 6 7);(8 9;10;11 12);(13 14;15 16 17 18;19 20))> > d@enlist 1>> > why d@enlist 1 gives a simple list: 8 9 10 11 12?>> > Thanks,>> > YE LIU>> > –> >
Submitted via Google Groups</dbto…></aaron.dav…>
One may also use 0N! to see the underlying structure:0N!d@enlist 1;(This used to be the default display mode)
X-Mailer: Apple Mail (2.936)On May 27, 2010, at 2:54 PM, Lindqvist wrote:> One may also use 0N! to see the underlying structure:>> 0N!d@enlist 1;>> (This used to be the default display mode)unfortunately not fully reliable, as it still suppresses (::):KDB+ 2.6 2010.04.26 Copyright (C) 1993-2010 Kx Systemsl64/ 4()core 16035MBq)0N!(::)q)i put the following in my q.q:unshow:{-1@-3!x;}which guarantees (afiak) unmodified output:q)unshow(::)::(btw, what’s going on here?q)0N!::'limit)-- Aaron Daviesaaron.davies@gmail.com
q)parse"0N!::"
!:
0N
ie
til 0N
Attila