Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Harbour Version 0.37 (c) reference Guid - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

HB_OSNEWLINE()

Returns the newline character(s) to use with the current OS
---------------------------------------------------------------------------------

 Syntax

        HB_OSNewLine() --> 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. The string will hold
                  either CHR(10) or CHR(13) + CHR(10).

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

 Examples

      // Get the newline character(s) for the current OS using defaults.
      STATIC s_cNewLine
      ...
      s_cNewLine := HB_OSNewLine()
      ...
      OutStd( "Hello World!" + s_cNewLine )
      ...

 Tests

      
      valtype( HB_OSNewLine() ) == "C"
      LEN( HB_OSNewLine() ) == 1
      

Status

      Ready

 Compliance

      This is an add-on Operating System Tool function.

 Platforms

      Under OS_UNIX_COMPATIBLE operating system the return value is the
       Line-Feed (0x0a) character CHR(10), with other operating systems
      (like DOS) the return value is the Carriage-Return plus Line-Feed
      (0x0d 0x0a) characters CHR(13)+CHR(10).

 Files

      Library is rtl



See Also: OS() OUTSTD() OUTERR()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson