-
Issues with Outputs of Strings and Symbols
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
"a" 1 "g" 2
I am uncertain and wondering if there is a way to have a ` for each of a and g in the output of (`a`g;1 2) and a ” ” for each of a and g in the output of (“ag”;1 2).2.I am also uncertain and wondering if there is any rule as to when the ` for a symbol and the ” ” for a string will appear whenever lists are involved. Based on all my observations in 1. as well as below, my guess is that it has something to do with a general list, the number of items of all the lists in the general list being the same, the general list having more than one list and the general list having at least a list of symbols. In such an instance, the ` for a symbol and the ” ” for a string will not appear. However, I am uncertain if I am right as I am still new to q/kdb+.` do not appear but ” ” appear:enlist `a`g results in
a g
but enlist “ag” results in"ag"
(`a`g;`b`h) results in
a g b h
but (“ag”;”bh”) results in
"ag" "bh"
` and ” ” appear:
(`a`g;(),1) results in
`a`g ,1
and (“ag”;(),1) results in
"ag" ,1
` appear:
(),`MSFT results in
,`MSFT
and (),`T results in
,`T
(`MSFT;`T) results in
`MSFT`T
` do not appear:
However, ((),`MSFT;(),`T) results in
MSFT T
Once again, I really appreciate any help with these issues.
Thank you very much.
Log in to reply.