datarray:数组结构样式数据结构,可模拟结构数组访问

时间:2021-04-02 06:33:26
【文件属性】:
文件名称:datarray:数组结构样式数据结构,可模拟结构数组访问
文件大小:5KB
文件格式:ZIP
更新时间:2021-04-02 06:33:26
Nim 达特里 面向数据的设计变得容易。 Datarray是一种数组结构数据结构,它会尽力模拟面向对象样式的结构数组。 type Ant = object name: string color: string isWarrior: bool age: int32 var antColony = default Datarray [ 1000 , Ant ] # multiple styles of iteration: # a) use the fields directly for i in 0 ..<antColony. len : antColony. ith (i, name) = "joe" if antColony. ith (i, isWarrior) : inc numberOfWarriors # b.1) use Elem
【文件预览】:
datarray-master
----datarray.nimble(220B)
----src()
--------datarray.nim(10KB)
----README.md(1KB)

网友评论