【发布时间】:2018-11-21 17:33:04
【问题描述】:
我学习 KDB 已经有一段时间了,现在需要您的帮助。 我们可以使用以下语法创建空列表: 我的列表名称:0#
例子:
q)myEmptySymbolList:0#`
q)myEmptySymbolList
`symbol$()
q)type myEmptySymbolList
11h
q)myEmptyFloatList:0#0n
q)myEmptyFloatList
`float$()
q)type myEmptyFloatList
9h
q)myEmptyDateList:0#0Nd
q)myEmptyDateList
`date$()
q)type myEmptyDateList
14h
但是当我们不指定 dataType 时,它会创建如下投影函数类型列表。
q)myEmptyTypeList:0#
q)myEmptyTypeList
#[0]
q)type myEmptyTypeList
104h
我有点困惑,为什么它会创建投影函数类型列表? 如果我想创建其他函数类型的列表,我们该怎么做(如 https://code.kx.com/wiki/Reference/Datatypes#Function_Types)以及在开发中我们可以在哪里使用函数列表?
谢谢, 瓦金达。
【问题讨论】: