$FILEPUTLN (output CRLF to file)
$FILEPUTLN outputs a character string to a file, and adds a CRLF at the end.
Syntax
$FILEPUTLN(file-object,character-string)
Values
-
file-object
Specifies the file object of the file into which the CRLF is to be output. Specify the variable name of the file object requested by the $FILEOPEN embedded function.
-
character-string
Specifies a character string to be output to a file, either as a constant or a variable. A constant must be enclosed in single quotation marks ('').
Status
The following table lists and describes the possible statuses:
|
Status |
Description |
|---|---|
|
NORMAL |
Normal end |
|
NODATA |
— |
|
ERROR |
— |
|
Script execution interrupted |
Indicates one of the following:
|
- Legend:
-
—: Not applicable
Example
The following example creates the file output.csv, and outputs ABC, DEF, and GHI on three separate lines:
[SET_VALUE]
FH = $FILEOPEN('output.csv', RENEW)
$FILEPUTLN(FH, 'ABC')
$FILEPUTLN(FH, 'DEF')
$FILEPUTLN(FH, 'GHI')
$FILECLOSE(FH)- Execution result:
-
The following is output to output.csv:
ABC
DEF
GHI