hex
语法
hex(X, [reverse=false])
详情
把如下数据类型转换为十六进制数据显示。返回的结果是 STRING 类型。数据类型如下:
- INTEGRAL
- FLOAT
- COMPLEX
- BINARY
参数
X 是一个整型标量或向量。
reverse 是一个布尔值,表示高低位是否互换。默认值是 false。
例子
hex(16 25);
//output: ["00000010","00000019"]
hex(16 25,true);
//output: ["10000000","19000000"]
hex(compress(1 2 3));
//output: ["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"]
a = hex(123.456 3.1415926)
print a
//output: ["405edd2f1a9fbe77","400921fb4d12d84a"]