2个回答
2016-01-21
展开全部
var
Mem: TMemoryStream;
buf:array[0..3285] of <a class="baidu-highlight" href="https://www.baidu.com/s?wd=Byte&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1dbP17Wnv7bn1TvPju-nHc0IAYqnWm3PW64rj0d0AP8IA3qPjfsn1bkrjKxmLKz0ZNzUjdCIZwsrBtEXh9GuA7EQhF9pywdQhPEUiqkIyN1IA-EUBtkn1f1nHm1njD1Pjm4rjRvPjR" target="_blank">Byte</a>; // 下界为0所以减1
begin
Mem := TMemoryStream.Create;
Mem.LoadFromFile('abc.dat');
// 读入处理
FillChar(buf, SizeOf(buf), 0);
Mem.Position := 0;
Mem.Read(buf, SizeOf(buf));
// 写入
Mem.Clear;
Mem.Position := 0;
Mem.Write(buf, SizeOf(buf));
Mem.SaveToFile('abc.dat');
Mem.free;
Mem: TMemoryStream;
buf:array[0..3285] of <a class="baidu-highlight" href="https://www.baidu.com/s?wd=Byte&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1dbP17Wnv7bn1TvPju-nHc0IAYqnWm3PW64rj0d0AP8IA3qPjfsn1bkrjKxmLKz0ZNzUjdCIZwsrBtEXh9GuA7EQhF9pywdQhPEUiqkIyN1IA-EUBtkn1f1nHm1njD1Pjm4rjRvPjR" target="_blank">Byte</a>; // 下界为0所以减1
begin
Mem := TMemoryStream.Create;
Mem.LoadFromFile('abc.dat');
// 读入处理
FillChar(buf, SizeOf(buf), 0);
Mem.Position := 0;
Mem.Read(buf, SizeOf(buf));
// 写入
Mem.Clear;
Mem.Position := 0;
Mem.Write(buf, SizeOf(buf));
Mem.SaveToFile('abc.dat');
Mem.free;
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2016-01-29
展开全部
const
a:array[1..10] of integer=(1,2,3,4,5,6,7,8,9,10);
b:array[1..5] of real=(1.1,2.2,3.3,4.4,5.5);
c:array[1..3] of char=('A','B','C');
var
f:text;
i,j,k:integer;
begin
assign(f,'数组文件.dat'); rewrite(f);
for i:=1 to 10 do write(f,a[i]:3); writeln(f);
for i:=1 to 5 do write(f,b[i]:8:2); writeln(f);
for i:=1 to 3 do write(f,c[i]:3); writeln(f);
close(f);
end.
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询