AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de archivos externos
WINDEVJavaCódigo de Usuario (UMC) Closing an external file
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
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 25/08/2022

Señalar un error o enviar una sugerencia | Ayuda local