I saw (in .Q.fpn
) the following technique to parse and show the bt
object passed to .Q.trp
function:
q)f:{x+1}
q).Q.trp[f;`a;{'(x;y)}]
'type
[4] f:{x+1}
^
[3] (.Q.trp)
[2] .Q.trp[f;`a;{'(x;y)}]
^
[0] .Q.trp[f;`a;{'(x;y)}]
^
'(x;y)
seems like an exception building construction, - but Kx documentation says that there are only two ways of exception building: from symbol and from string. It is looks like we can built an exception from a list of (symbol; bt object)
.
So what the construction '(x;y)
stands for?
Can we build something different than exception with '(x;y)
?
My guess is that this is a specific signal recently allowed along with the addition of the .Q.trp/.Q.bt functionality. It looks like it works only for
(symbol;bt object)
or(string;bt object)
, anything else is unrecognized.The output can be stored if returned without the signal:
and this type of signal seems to work in any context, not just within .Q.trp:
I suspect the
last r
has a very specific format/shape that one could fabricate but it seems like an unnecessary use-case.Bonus oddities:
This works:
but other things I've tried show up weird errors: