hex

语法

hex(X, [reverse=false])

参数

X 是一个整型标量或向量。

reverse 是一个布尔值,表示高低位是否互换。默认值是 false。

详情

把如下数据类型转换为十六进制数据显示。返回的结果是 STRING 类型。数据类型如下:

  • INTERGRAL
  • FLOAT
  • COMPLEX
  • BINARY

有关数据类型详细信息,参考:数据类型

例子

hex(16 25);

返回:["00000010","00000019"]

hex(16 25,true);

返回:["10000000","19000000"]

hex(compress(1 2 3));

返回:["00","05","ff","01","04","04","00","00","ff","ff","ff","ff","03","00","00","00","ff","ff","ff","ff","0d","00","00","80","c0","01","00","00","00","02","00","00","00","03","00","00","00"]