AYUDA EN LÍNEA WINDEV, WEBDEV Y WINDEV MOBILE
Versión: 242526272820242025
// Declare and initialize the variables FileNameAndPath is string FileID is int ResWrite is boolean = True 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 no file was opened IF FileID = -1 THEN Error(ErrorInfo(errMessage)) ELSE // Read the first record HReadFirst(Customer, CustomerID) // More records to read? Write error? WHILE HOut = False AND ResWrite = True // Write the records line by line into the text file ResWrite = fWriteLine(FileID, ... Customer.CustomerLastName + TAB + ... Customer.CustomerFirstName + TAB + Customer.CustomerAge) // Read the next records HReadNext(Customer, CustomerID) END // Display an error message if the writing was not performed IF ResWrite = False THEN Error(ErrorInfo(errMessage)) // 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
Última modificación: 27/03/2025
Señalar un error o enviar una sugerencia | Ayuda local
Buscando...
Acepto los términos de la licencia
Debe configurar el producto de la siguiente manera: