Имя пользователя:
Пароль:  
Помощь | Регистрация | Забыли пароль?  

Показать сообщение отдельно

Пользователь


Сообщения: 48
Благодарности: 0

Профиль | Отправить PM | Цитировать


Может быть мы о разном говорим. Вот цитата из help Power Builder:
"FileOpen PowerScript function

<Examples> <See also>

Description

Opens the specified file for reading or writing and assigns it a unique integer file number. You use this integer to identify the file when you read, write, or close the file. The optional arguments filemode, fileaccess, filelock, and *writemode determine the mode in which the file is opened. If the file doesn't exist, a new file is created.

Syntax

FileOpen ( filename {, filemode {, fileaccess {, filelock {, writemode{ creator, filetype }}}}} )
ArgumentDescription
filenameA string whose value is the name of the file you want to open. If *filename is not on the operating system's search path, you must enter the fully qualified name
filemode (optional)A value of the FileMode enumerated type that specifies how the end of a FileRead or FileWrite is determined. Values are:ЁLineMode! — (Default) Read or write the file a line at a timeЁStreamMode! — Read the file in 32K chunksFor more information, see Usage below
fileaccess (optional)A value of the FileAccess enumerated type that specifies whether the file is opened for reading or writing. Values are:ЁRead! — (Default) Read-only accessЁWrite! — Write-only access
filelock (optional)A value of the FileLock enumerated type specifying whether others have access to the opened file. Values are:ЁLockReadWrite! — (Default) Only the user who opened the file has accessЁLockRead! — Only the user who opened the file can read it, but everyone has write accessЁLockWrite! — Only the user who opened the file can write to it, but everyone has read accessЁShared! — All users have read and write access
writemode (optional)A value of the WriteMode enumerated data type. When *fileaccess is Write!, specifies whether existing data in the file is overwritten. Values are:ЁAppend! — (Default) Write data to the end of the fileЁReplace! — Replace all existing data in the fileWritemode is ignored if the fileaccess argument is Read!
creator (optional)On Macintosh, a 4-character string specifying the creator of the file. If you specify creator, you must also specify filetype. On Macintosh, the file's creator string is case-sensitive—PWRS is different from pwrs or Pwrs.If the named file is not found and FileOpen creates a new file, creator becomes the file's creator. If you don't specify creator and FileOpen creates a new Macintosh file, the file's creator is set to ttxt (for TeachText or SimpleText).If creator is not a 4-character string, an execution error occurs. Otherwise, creator is ignored if the named file exists. Creator has no significance on other platforms
filetype (optional)On Macintosh, a 4-character string specify the file's type. The filetype is case-sensitive.If the named file is not found and FileOpen creates a new file, *filetype becomes the file's type. If you don't specify filetype and FileOpen creates a new Macintosh file, the file's type is set to TEXT.If filetype is not a 4-character string, an execution error occurs. Otherwise, filetype is ignored if the named file exists. Filetype has no significance on other platforms


Return value
Integer. Returns the file number assigned to filenameif it succeeds and -1 if an error occurs. If any argument's value is NULL, FileOpen returns NULL.
Usage
When a file has been opened in line mode, each call to the FileRead function reads until it encounters a carriage return (CR), linefeed (LF), or end-of-file mark (EOF). Each call to FileWrite adds a CR and LF at the end of each string it writes.
When a file has been opened in stream mode, a call to FileRead reads the whole file (until it encounters an EOF) or 32,765 bytes, whichever is less. FileWrite writes a maximum of 32,765 bytes in a single call and does not add CR and LF characters.

File not found *If PowerBuilder doesn't find the file, it creates a new file, giving it the specified name."

А теперь по твоей ссылке: OpenFile.

[s]Исправлено: Octagon, 23:10 19-07-2002[/s]

Отправлено: 21:49, 19-07-2002 | #5