Share via


TextIo.inRecordDelimiter Method

Gets or sets the character that is used for the record delimiter of an input file represented by a TextIO object.

Syntax

public str inRecordDelimiter([str value])

Run On

Called

Parameters

  • value
    Type: str
    The character to be used as the record delimiter; optional.

Return Value

Type: str
The character used as the record delimiter.

Remarks

To set the record delimiter for an output file, use the .

Examples

The following example sets the record delimiter to 128.

boolean openFile() 
{ 
    boolean ret = false; 
    int     recordLength = 128; 
    int     numOflastCharacter = 255; 
 
    textFile = new TextIo(filename, 'r'); 
 
    if (textFile) 
    { 
        if (textFile.status()) 
        { 
            throw error("@SYS52680"); 
        } 
        textFile.inFieldDelimiter(num2char(numOflastCharacter)); 
        textFile.inRecordDelimiter(num2char(numOflastCharacter)); 
        textFile.inRecordLength(recordLength); 
        ret = true; 
    } 
 
    return ret; 
}

See Also

TextIo Class

TextIo.inFieldDelimiter Method

TextIo.inRecordLength Method