是否可以使用1 assign()来读写文件?是否可以读取和写入文件只打开一次?
我的意思是这样的:
assign(fl, 'file.txt');
reset(fl)
// I know, that when I use reset - I have only read permission,
// but is there any other option to read and write opening the file only once?
read(fl, variable);
write(fl, 'asdf);
close(fl);
您的问题不明确,因为您没有描述FL的类型。如果是文本(文件),则不存在这种方式。 –