val = Pm.FileTextRead(sFile, nType)
|sFile||(String) The file name with the path. If a full path is not entered, then it is completed relatively according to the application file folder. |
It is recommended to use the PROMOTIC path syntax - see PROMOTIC path to files and folders.
|nType||(Long) Value of the parameter|
0 - Returns String of the content of the entire file
1 - Returns the 1-dimensional array of the String type where each item of the array contains just one line from the file.
2 - Returns String of the first line of the file.
3 - Returns String of the last line of the file.
Caution: If the text file contains the "end of line sign", then this option returns an empty string corresponding to the last empty row.
data = Pm.FileTextRead("#app:file.txt", 1)
If Pm.IsValid(data) Then