cancel
Showing results for 
Search instead for 
Did you mean: 

Issues with Outputs of Strings and Symbols

MN_12
New Contributor III

Hi,

 

I intended to write this as well in my previous post but decided to do so in a new post here as it concerns another subject.

 

While I was working through both the Tables and Tables Exercises notebooks, I noticed some peculiarities with the outputs of strings and symbols in the console whenever lists are involved. In some instances, the ` for a symbol and the " " for a string do not appear but in others, they do.

 

1.

 

(`a`g;1 2) results in 

a g
1 2

and ("ag";1 2) also results in 

a g
1 2

 However, flip (`a`g;1 2) results in

`a 1
`g 2

and flip ("ag";1 2) results in

1 ACCEPTED SOLUTION

rocuinneagain
Valued Contributor
Valued Contributor

q makes a balance when displaying about levels of detail. 

Always giving full exact information would make all output very messy and more like code rather than nicely displayed information for human to view.

 

There are some tools and tips you can use to inspect items in more detail during development and debugging.

Using .Q.s1 is most useful I find to drill down. (Along with usual type, count etc)

https://code.kx.com/q/ref/dotq/#s1-string-representation

 

 

-1 .Q.s1 itemToInspect

 

 

 

A script designed to display items in detail nicely:

https://github.com/LeslieGoldsmith/dpy

 

View solution in original post

2 REPLIES 2

rocuinneagain
Valued Contributor
Valued Contributor

q makes a balance when displaying about levels of detail. 

Always giving full exact information would make all output very messy and more like code rather than nicely displayed information for human to view.

 

There are some tools and tips you can use to inspect items in more detail during development and debugging.

Using .Q.s1 is most useful I find to drill down. (Along with usual type, count etc)

https://code.kx.com/q/ref/dotq/#s1-string-representation

 

 

-1 .Q.s1 itemToInspect

 

 

 

A script designed to display items in detail nicely:

https://github.com/LeslieGoldsmith/dpy

 

MN_12
New Contributor III

Hi,

 

Thanks for the clarification! I get it now. I will check out the links and try them out.