www.lucersoft.com

   
       Home  |   News  |   Downloads  |   Order  |   Contacts

 

 

Main

Home

Site map

Products

LC Backup

LC Copier

HTML Batch Editor

HTML Batch Editor PRO

Tennis 2001

Freeware

Documentation

HTML Batch Editor PRO

LC Basic

Information

Order

Update Policy

Support

Contacts

Links

 
 
 
 

 
 
 
 
 
 
 
 
 

OpenFile

File IO functions


Syntax

 

result = OpenFile (NumberOfFile, Filename, Mode)


Description:

 

Open a file for reading or writing.


Arguments:

 

NumberOfFile - A number of the file. This parameter can be in the range 1 to 10. The parameter is used for identification of the file in the other functions (CloseFile, Read, Write and others). Only one file in the same time can hold an unique number. If the function OpenFile is used with engaged number, previous file with this number is closed. Ten files only can be opened at the same time.

Filename - A name of file. 

Mode - This parameter determine if the file will be opened for reading or writing. This parameter can have two values - "R" or "W"

R - Opens for reading. If the file does not exist or cannot be found, the OpenFile call fails.

W - Opens for writing or appending to end of file. Creates the file first if it doesn’t exist. If a file exist and writing from a begin of the file is needed, you must call DeleteFile first.


Examples:

res = OpenFile (1,"C:\\SomeDir\\SomeFile.ext","w")

 

If Escape Sequence is enabled you must use double backslash.

 

Return value:

 

If the function succeeds, the return value is True. If the function fails, the return value is False

 

 


See also:

 

CloseFile, Write, Put, Read


A OpenFile function is included in the lcbase.dll

 
Last updated: November 2, 2003
Copyright © 2002 Lucersoft

Add to favorites

Back