HB_EOL()
Returns the newline character(s) to use with the current OS
Syntax
hb_eol() --> cString
Returns
<cString> A character string containing the character or characters required to move the screen cursor or print head to the start of a new line.
Description
Returns a character string containing the character or characters required to move the screen cursor or print head to the start of a new line for the operating system that the program is running on (or thinks it is running on, if an OS emulator is being used).
Under HB_OS_UNIX operating system the return value is the Line-Feed character (0x0a, CHR(10)); with other operating systems (like DOS) the return value is the Carriage-Return plus Line-Feed characters (0x0d 0x0a, CHR(13)+CHR(10)).
Examples
// Get the newline character(s) for the current OS. // Get the newline character(s) for the current OS. STATIC s_cNewLine ... s_cNewLine := hb_eol() ... OutStd( "Hello World!" + s_cNewLine )
Tests
? ValType( hb_eol() ) == "C" ? Len( hb_eol() ) == 1
Compliance
Harbour
Platforms
All
Files
Library is rtl
Seealso
OS(), OUTSTD(), OUTERR()