HB_EOL()

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()

Advertisements

3 responses to “HB_EOL()

  1. Pingback: Harbour All Functions – H | Viva Clipper !

  2. Pingback: Harbour Terminal Functions | Viva Clipper !

  3. Pingback: Harbour Reference Guide Summary | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s