标签: nxc

NXC和F#中的结构

我有个问题:

在NXC中有这样的结构函数:

struct colorType
{
  int colorval;
  unsigned int rawRed;
  unsigned int rawGreen;
  unsigned int rawBlue;
  unsigned int normRed;
  unsigned int normGreen;
  unsigned int normBlue;
};

colorType cubeColor[6*9];
Run Code Online (Sandbox Code Playgroud)

我在F#中创建了相同的结构,如下所示:

type colorType =
    struct 
        val colorval: int
        val rawRed: uint16
        val rawGreen: uint16
        val rawBlue: uint16 
        val normRed: uint16
        val normGreen: uint16
        val normBlue: uint16
    end
Run Code Online (Sandbox Code Playgroud)

但我不知道如何调用colorType cubeColor [6*9]; 在F#中.

你可以帮我解决这个案子吗?

谢谢.

c c++ f# struct nxc

-3
推荐指数
1
解决办法
140
查看次数

标签 统计

c ×1

c++ ×1

f# ×1

nxc ×1

struct ×1