84554577 发表于 2006-10-26 18:56:11

file_open(file1,FO_MODE_READ);

我在很多人的代码中都看到file_open(file1,FO_MODE_READ);其中我非常不明白FO_MODE_READ是怎么得来的?是手动写的吗?还是自动生成的?
如果是手动写的,我每次执行到FO_MODE_READ这里就通不过!望高手指点!

tianyu124 发表于 2006-10-27 09:37:48

opens a file or creates a new file.

file_open ( file_name, mode );

file_name                 The name of the file to open or create.
mode                 The file mode:
                FO_MODE_READ, or 0 (read only);
                        FO_MODE_WRITE, or 1 (write only);
                        FO_MODE_APPEND, or 2 (write only, to the end of the file).

Note that if the file does not exist in the specified path, then if the file mode is FO_MODE_WRITES, WinRunner creates the file. If the specified path does not exist, the file is not created and the command fails.

WinRunner, Mercury Interactive and the Mercury Interactive logo are registered trademarks or trademarks of Mercury Interactive Corporation in the United States and/or other countries.

[ 本帖最后由 tianyu124 于 2006-10-27 09:38 编辑 ]

84554577 发表于 2006-10-27 10:05:50

谢谢!tianyu124
页: [1]
查看完整版本: file_open(file1,FO_MODE_READ);