Delphi 对象与组件帮助文档

王朝delphi·作者佚名  2006-01-29
窄屏简体版  字體: |||超大  

AssignFile 过程

使外部文件的名字与file变量关联

单元

System

种类

文件管理程序

Delphi 语法:

procedure AssignFile(var F; FileName: string);

详细内容:

Call AssignFile to initialize a file variable in Delphi code.

在delphi代码里调用AssignFile初始化一个file变量

F is a file variable of any file type. FileName is a string-type expression or an

expression of type PChar if extended syntax is enabled.

F是一个file类型的变量,FileName是string-type的表达式,如果扩展语法开关是开启的,那么PChar

类型也允许使用的

After calling AssignFile, F is associated with the external file until F is closed. All

further operations on the file variable F operate on the external file named by FileName.

在调用AssignFile后,在F没有关闭之前,变量F将一直与外部文件关联。所有更多对file变量F的操作都

将对应发生在文件名为FileName的外部文件上。

When the FileName parameter is empty, AssignFile associates F with the standard input or

standard output file. If assigned an empty name, after a call to Reset (F), F refers to

the standard input file, and after a call to Rewrite (F), F refers to the standard output

file.

假如FileName参数是空的,AssignFile将F与标准输入或者标准输出文件关联。假如赋值一个空的名字

,在调用Reset(F)之后,F将引用标准输入文件,而调用Rewrite(F)之后,F将引用标准输出文件。

Do not use AssignFile on a file variable that is already open.

不要将AssignFile用在已经打开的File变量上。

Note: To avoid scope conflicts, AssignFile replaces the Assign procedure that was

available in early versions of the Delphi product. However, for backward compatibility

Assign is still available.

注意:为了避免范围冲突,AssignFile将取代在delphi较早版本中的Assign存储过程,为了向后兼容As

sign仍然有效。

available in early versions of the Delphi product. However, for backward compatibility Assign is still available.

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航