Version()

Version()

Returns the HARBOUR Version or the Harbour/Compiler Version.

Syntax

      Version()  --> <cReturn>

Arguments

None

Returns

<cReturn> String containing the Harbour Version

Description

This function returns the current Harbour Version.

Examples

      ? Version() // "Harbour Terminal: Standard stream console"

Compliance

Clipper

Platforms

All

Files

Library is core

Seealso

OS()

Advertisements

Tone()

Tone()

Sound a tone with a specified frequency and duration.

Syntax

      Tone( <nFrequency>,  <nDuration> ) --> NIL

Arguments

<nFrequency> A non-negative numeric value that specifies the frequency of the tone in hertz.

<nDuration> A positive numeric value which specifies the duration of the tone in 1/18 of a second units.

Returns

Tone() always returns NIL.

Description

Tone() is a sound function that could be used to irritate the end user, his or her dog, and the surrounding neighborhood. The frequency is limited to the range 0 to 32767 Hz.

Examples

      IF lOk   // Good Sound
         Tone(  500,  1 )
         Tone( 4000,  1 )
         Tone( 2500,  1 )
      ELSE     // Bad Sound
         Tone(  300,  1 )
         Tone(  499,  5 )
         Tone(  700,  5 )
      ENDIF
      //
      Tone( 800,  1 )                         // same as ? Chr( 7 )
      Tone( 32000,  200 )                     // any dogs around yet?
      Tone( 130.80,  1 )                      // musical note - C
      Tone( 400,  0 )                         // short beep
      Tone( 700 )                            // short beep
      Tone( 10,  18.2 )                       // 1 second delay
      Tone( -1 )                             // 1/18.2 second delay
      Tone()                                 // 1/18.2 second delay

Compliance

Clipper

Platforms

All

Files

Library is core

Seealso

Chr(), SET BELL

RUN

RUN

Run an external program.

Syntax

      RUN <cCommand>

Arguments

<cCommand> Command to execute.

Description

This command runs an external program. Please make sure that you have enough free memory to be able to run the external program. Do not use it to run Terminate and Stay Resident programs (in case of DOS) since that causes several problems.

Examples

      RUN ( "edit " + cMyTextFile )  // Runs an external editor
      RUN command                    // Gives a DOS shell (DOS only)

Compliance

Clipper

Platforms

All

Files

src/rtl/run.c Library is rtl

Seealso

RUN

OS()

OS()

Return the current operating system.

Syntax

      OS() --> <cOperatingSystem>

Returns

<cOperatinSystem> The current operating system.

Description

This function will return the current operating system.

Examples

      ? OS()

Compliance

Clipper

Platforms

All

Files

src/rtl/version.c

hb_GetEnv()

HB_GETENV()

Obtains a system environmental setting.

Syntax

      HB_GETENV(<cEnviroment>, [<cDefaultValue>], [<lApplyCodepage>] )
                   --> <cReturn>

Arguments

<cEnviroment> Enviromental variable to obtain.

<cDefaultValue> Optional value to return if <cEnvironment> is not found.

<lApplyCodepage> optional logical parameter specifing whether to apply automatic codepage conversion (to the codepage specified by Set( _SET_OSCODEPAGE ) on the obtained value. The default is .T. Note that if the default value is passed and the environment value is not found, this codepage conversion is not performed against the returned default value

Returns

<cReturn> Value of the environment variable or <cDefaultValue> or an empty string.

Description

This function yields a string that is the value of the environment variable <cEnviroment>, which is stored at the system level.

If no environment variable can be found, the value of the function will be <cDefaultValue> if it is passed, else an empty string.

Examples

      ? HB_GETENV( "PATH" )
      ? HB_GETENV( "CONFIG" )
      ? HB_GETENV( "HARBOURCMD", "-n -l -es2" )

Compliance

Harbour

Platforms

All

Files

src/rtl/gete.c Library is rtl

Seealso

GETENV, GETE

GetEnv()

Template

Function

Name

GetEnv()

Category

API

Subcategory

Environment

Oneliner

Obtains a system environmental setting.

Syntax

      GetEnv( <cEnviroment> )  --> <cReturn>

Arguments

<cEnviroment> Enviromental variable to obtain.

Returns

<cReturn> Value of the Environment Variable.

Description

This function yields a string that is the value of the environment variable <cEnviroment>, which is stored at the system level.

If no environment variable is found, an empty string is returned.

Examples

      ? GetEnv( "PATH" )
      ? GetEnv( "CONFIG" )
      ? GetEnv( "HARBOURCMD",  "-n -l -es2" )

Compliance

Clipper

Platforms

All

Files

Library is core

Seealso

GetE()

GetE()

GETE()

Obtains a system environmental setting.

Syntax

      GETE(<cEnviroment> )  --> <cReturn>

Arguments

<cEnviroment> Enviromental variable to obtain.

Returns

<cReturn> Value of the Environment Variable.

Description

This function yields a string that is the value of the environment variable <cEnviroment>, which is stored at the system level.

If no environment variable is found, an empty string is returned.

Examples

      ? GETE( "PATH" )
      ? GETE( "CONFIG" )
      ? GETE( "HARBOURCMD", "-n -l -es2" )

Compliance

This is CA-Cl*pper compliant.

The <cDefaultValue> parameter is a Harbour extension.

Platforms

All

Files

src/rtl/gete.c Library is rtl

Seealso

GETENV