AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

¡Nueva funcionalidad de WINDEV, WEBDEV y WINDEV Mobile 2024!
Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de archivos externos / Procedimientos WLanguage
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Otros
Procedimientos almacenados
Parámetros de la Procedure utilizada por fReadLine
WLanguage Procedure ("Callback") llamado por fReadLine para cada Line leído en el fichero. Este procedimiento puede ser local, global o interno.
Ejemplo
// Declare the variables
FileNameAndPath is string
FileID is int
NumberLinesRead is int = 0

// Declaration of the WLanguage procedure
INTERNAL PROCÉDURE AnsiCallback(LineRead is ANSI string)
Trace("Callback | Line read: " + LineRead)
END

// Select the file name and path
FileNameAndPath = "C:\Directory\AnsiFile.txt"

// Open file
FileID = fOpen(FileNameAndPath, foAnsi)
// Display an error message if no file was opened
IF FileID = -1 THEN
Error(ErrorInfo(errMessage))
ELSE
// Read the lines of the file
NumberLinesRead = fReadLine(FileID, AnsiCallback)
IF ErrorOccurred THEN
Error(ErrorInfo())
END
Trace("Number of lines read: " + NumberLinesRead)
// Close the file
fClose(FileID)
Trace("Read operation completed")
END
Sintaxis
<Result> = fReadLine_Callback(<Row read>)
<Result>: booleano
  • True si se leyó el Line ,
  • False en caso contrario.
<Row read>: Cadena de caracteres
Contenido de la Line leída en el fichero.
Componente: wd290std.dll
Versión mínima requerida
  • Versión 2024
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 03/10/2023

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