PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Closing an external file
  • Closing an external file (WINDEV Mobile)
Closing an external file
WINDEVJavaUser code (UMC) The following code is used to close an external file. The file is opened in read/write mode. The opened file can be freely accessed by the other applications.
// Declare the variables
FileNameAndPath is string
FileID is int
ResCloseFile is int
 
// Select the file name and path
FileNameAndPath = "C:\MyDirectories\File.txt"
 
// Open file
FileID = fOpen(FileNameAndPath, foReadWrite)
 
// Display an error message if the opening was not performed
IF FileID = -1 THEN
Error(ErrorInfo(errMessage))
ELSE
// Processes in the external file
...
// End of processes in the external file
// Close the file
ResCloseFile = fClose(FileID)
IF ResCloseFile = -1 THEN
// Display an error message if the closing was not performed
Error(ErrorInfo(errMessage))
END
END
Closing an external file (WINDEV Mobile)
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment