F flyerer1 Unregistered / Unconfirmed GUEST, unregistred user! 2007-07-04 #1 这是vc中的声明: unsigned int Para[3]={0x01FF,0x0a,0x1}; //共12个字节 在delphi中如何写这个声明?
W wr960204 Unregistered / Unconfirmed GUEST, unregistred user! 2007-07-04 #2 这哪里是动态数组啊. 如果是全局变量: var Para : array[0..2] of integer = ($10FF, $0a, $1); 如果是局部变量: var Para : array[0..2] of integer; begin ... Para[0] := $10FF; Para[1] := $0a; Para[2] := $1;
这哪里是动态数组啊. 如果是全局变量: var Para : array[0..2] of integer = ($10FF, $0a, $1); 如果是局部变量: var Para : array[0..2] of integer; begin ... Para[0] := $10FF; Para[1] := $0a; Para[2] := $1;
地 地质灾害 Unregistered / Unconfirmed GUEST, unregistred user! 2007-07-04 #3 var Para:array [0..2] of Cardinal; begin Para[0] := $10FF; Para[1] := $0a; Para[2] := $1; //other code here end;
var Para:array [0..2] of Cardinal; begin Para[0] := $10FF; Para[1] := $0a; Para[2] := $1; //other code here end;
D dbj Unregistered / Unconfirmed GUEST, unregistred user! 2007-07-04 #4 var darr : array of integer; 用setlength函数来增加数组元素
潴 潴才怪 Unregistered / Unconfirmed GUEST, unregistred user! 2007-07-04 #5 动态数组 var para: array of integer; begin SetLength(para,[动态长度]); Para[0] := $10FF; Para[1] := $0a; Para[2] := $1; ..........
动态数组 var para: array of integer; begin SetLength(para,[动态长度]); Para[0] := $10FF; Para[1] := $0a; Para[2] := $1; ..........
0 007vivi Unregistered / Unconfirmed GUEST, unregistred user! 2007-07-05 #6 楼上的OK, 动态的: var para: array of 类型; 用SETLENGTH进行长度设置 LZ的是枚举的,直接用下标就可以读取了 Para[0] := $10FF; Para[1] := $0a; Para[2] := $1; 只不过你上面的类型是无符号整型就OK
楼上的OK, 动态的: var para: array of 类型; 用SETLENGTH进行长度设置 LZ的是枚举的,直接用下标就可以读取了 Para[0] := $10FF; Para[1] := $0a; Para[2] := $1; 只不过你上面的类型是无符号整型就OK