我在C++中轻松实现的问题,为什么在Delphi中总是编译出错,如下:
BufIn: Array[0..2000] of Byte;
BufIn:=($FF,$D8,$FF,$E0,0,$10,$4A,$46,$49,$46,0,1,1,1,0,$64);
各位大侠请指教!Thanks,
BufIn: Array[0..2000] of Byte;
BufIn:=($FF,$D8,$FF,$E0,0,$10,$4A,$46,$49,$46,0,1,1,1,0,$64);
各位大侠请指教!Thanks,
要注意保持元素个数一致。
var // (全局)
b : Boolean ;
BufIn: Array[0..20] of Byte ;
i : Integer ; FormCreate : b := False ;
i := -1 ; 逐一录入 : b := True ;
while b do
begin
Inc(i) ;
BufIn[i] := StrToInt(Edit1.Text) ;
Application.ProcessMessages ;
b := False ;
end ;
BufIn: Array[0..2000] of Byte; // 声明有2001个元素
BufIn:=($FF,$D8,$FF,$E0,0,$10,$4A,$46,$49,$46,0,1,1,1,0,$64);
// 但是,这赋值却只有十来个
这样在DELPHI中行不通.