写入:
fileid := filecreate('aaa.dat');
filewrite(fileid, arr[0], (high(arr)+1)*sizeof(integer));
fileclose(fileid);
读取:
fileid := fileopen('aaa.dat', fmOpenRead);
l := fileseek(fileid, 0, 2);
setlength(arr, l div sizeof(integer));
fileseek(fileid, 0, 0);
fileread(fileid, arr[0], l * sizeof(integer));
fileclose(fileid);