L lunyx Unregistered / Unconfirmed GUEST, unregistred user! 2009-08-10 #1 如:sbuf:array [0..2] of byte;preCMD: array of byte; sbuf[0]:= byte($01); sbuf[1]:= byte($06);有没有简单的命令把sbuf中值拷贝进preCMD..而当sbuf改变时,又不能影响 preCMD的值
如:sbuf:array [0..2] of byte;preCMD: array of byte; sbuf[0]:= byte($01); sbuf[1]:= byte($06);有没有简单的命令把sbuf中值拷贝进preCMD..而当sbuf改变时,又不能影响 preCMD的值
W wangdonghai Unregistered / Unconfirmed GUEST, unregistred user! 2009-08-10 #2 var sbuf:array [0..2] of byte; preCMD: array of byte;begin sbuf[0]:= byte($01); sbuf[1]:= byte($06); SetLength(preCMD,sizeof(sbuf)); Move(sbuf[0],preCMD[0],sizeof(sbuf));end;
var sbuf:array [0..2] of byte; preCMD: array of byte;begin sbuf[0]:= byte($01); sbuf[1]:= byte($06); SetLength(preCMD,sizeof(sbuf)); Move(sbuf[0],preCMD[0],sizeof(sbuf));end;