保函网

assignfile 是什么函数 delphi

发布时间:2025-08-21 | 来源:互联网转载和整理

参考实例:

var

f: textfile; // 声明文本文件类型变量

begin

assignfile(f, 'c:myfile.txt');

end;

// 将c:myfile.txt文件与f变量建立连接,后面可以使用f变量对文件进行操作。

将外部一个文件名 c:1.txt ,以变量的形式关联,如

const

cnsfilename='c:1.txt';

var

f:text;// 以文本的形式,也可以以其他形式。

方民十很任门共打白况究复院。

begin

是可多起从只长求基农己教花安千团称。

assignfile(f,cnsfilename);

try

if fileexists(cnsfilename) then

append(f)

else

rewrite(f);

writeln(f,'hellow world.');

finally

closefile(f);

end;

end;

链接一个文件,看帮助,写的那么清楚你不看

delphi(pascal) code var f: textfile; s: string;begin if opendialog1.execute then { display open dialog box } begin assignfile(f, opendialog1.filename); { file selected in dialog } reset(f); readln(f, s); { read first line of file } edit1.text := s; { put string in a tedit control } closefile(f); end;end;

assignfile

上一篇:兴趣爱好有什么 兴趣爱好有哪些

下一篇:152开头的号码属于移动还是联通?

其他文章

  • 剑灵职业排行(剑灵职业排行榜前十名)
  • 古代侯爷封号大全
  • 科目驾驶人培训在哪里培训
  • 如何知道wifi密码(苹果手机如何知道wifi密码)
  • 古代刑罚骑木驴视频(被后妈体罚骑木驴)
  • 纪念改革开放40周年有感
  • 苏州大学物理实验教学中心
  • 异地恋男朋友生病了,我该怎么安慰他
  • 关于爱情的成语大全 表达爱情的成语
  • 生平事迹是什么意思
  • mt6765是什么处理器
  • 孤独心痛的句子说说心情短语
  • 安然如风是什么意思
  • 剑三藏剑山庄怎么去
  • 小学生数学小论文怎么写
  • 法语各种等级考试介绍
  • 最能哄人开心的话
  • 最好的我们经典语录106句
  • tcs指示灯的作用
  • 郭沁个人资料简介郭沁的简介资料介绍