HB_IsByRef()

HB_ISBYREF()

Determine if a variable is passed by reference.

Syntax

      HB_ISBYREF( @<Var> ) --> <lVarIsByRef>

Arguments

@<Var> is the variable to test; it must be passed by reference.

Returns

<lVarIsByRef> a logical value indicating if the variable is passed by reference to actual function or procedure.

Description

This function return a logical value indicating if the variable is passed by reference to actual function or procedure.

ATTENTION: The variable to test must be passed by reference. If the variable is not passed by reference, the function return NIL. This function is based on the form that Harbour manages to the variables for reference. When a variable is passed by reference, what receives the function or procedure is, a pointer to the previous variable, be this the container variable of the data or a pointer to another variable. The function observes if the variable passed points to a common variable or to a variable passed by reference.

Examples

      See Tests

Tests

      PROCEDURE Main()
         LOCAL cVar := "Test local"
         PRIVATE nVar := 0

         Test( @cVar, @nVar, cVar, nVar )
         RETURN

      PROCEDURE Test( Arg1, Arg2, Arg3, Arg4 )
         ? hb_isbyref( @Arg1 )        // .T.
         ? hb_isbyref( @Arg2 )        // .T.
         ? hb_isbyref( @Arg3 )        // .F.
         ? hb_isbyref( @Arg4 )        // .F.
         RETURN

Compliance

Harbour

Files

Library is rtl

Seealso

VALTYPE()

HB_INETACCEPT()

HB_INETACCEPT()

Wait until a socket is ready

Syntax

      HB_INETACCEPT( <socket> ) -> SOCKET

Arguments

An INET socket

Returns

<socket> a socket previously created / opened

Description

Waits until a connection is available on a socket created with hb_InetServer, returns a socket that can be used to communicate with the incoming client.

On error, NIL is returned and error code sets in the passed SOCKET.

This error can be accessed using hb_InetErrorCode() function.

Compliance

Harbour

HB_HSETCASEMATCH()

HB_HSETCASEMATCH()

Sets the ‘case match’ flag for the hash table

Syntax

      HB_HSETCASEMATCH( <hsTable>, [<lFlag>] ) -> <hsTable>

Arguments

<hsTable> a hash table, created by HB_HASH()

<lFlag> a logical value indicating to turn on or off the ‘case match’ flag of the hash table

Returns

The hash table

Description

This function is equivalent to HB_HCASEMATCH() but it returns the passed hash table rather than the old flag value

Examples

      LOCAL hsTable
      // turn 'case match' on for a new hash table
      hsTable := hb_HSetCaseMatch( { "one" => 1, "two" => 2 }, .T. )

Compliance

Harbour

Seealso

HB_HCASEMATCH(), HB_HSETAUTOADD(), HB_HSETBINARY

HB_HSETBINARY()

HB_HSETBINARY()

Sets the ‘binary’ flag for the hash table

Syntax

      HB_HSETBINARY( <hsTable>, [<lFlag>] ) -> <hsTable>

Arguments

<hsTable> a hash table, created by HB_HASH()

<lFlag> a logical value indicating to turn on or off the ‘binary’ flag of the hash table

Returns

The hash table

Description

This function is equivalent to HB_HBINARY() but it returns the passed hash table rather than the old flag value

Examples

      LOCAL hsTable
      // turn 'binary' on for a new hash table
      hsTable := hb_HSetBinary( { "one" => 1, "two" => 2 }, .T. )

Compliance

Harbour

Seealso

HB_HBINARY(), HB_HSETAUTOADD(), HB_HSETCASEMATCH

HB_HSETAUTOADD()

HB_HSETAUTOADD()

Sets the ‘auto add’ flag for the hash table

Syntax

      HB_HSETAUTOADD( <hsTable>, [<lFlag>] ) -> <hsTable>

Arguments

<hsTable> a hash table, created by HB_HASH()

<lFlag> a logical value indicating to turn on or off the ‘auto add’ flag of the hash table

Returns

The hash table

Description

This function is equivalent to HB_HAUTOADD() but it returns the passed hash table rather than the old flag value

Examples

      LOCAL hsTable
      // turn 'auto add' on for a new hash table
      hsTable := hb_HSetAutoAdd( { "one" => 1, "two" => 2 }, .T. )

Compliance

Harbour

Seealso

HB_HAUTOADD(), HB_HSETBINARY(), HB_HSETCASEMATCH()

HB_ANSITOOEM()

HB_ANSITOOEM()

Convert a windows Character to a Dos based character

Syntax

      HB_ANSITOOEM( <cString> ) --> cDosString

Arguments

<cString> Windows ansi string to convert to DOS oem String

Returns

<cDosString> Dos based string

Description

This function converts each character in <cString> to the corresponding character in the MS-DOS (OEM) character set. The character expression <cString> should contain characters from the ANSI character set. If a character in <cString> doesn’t have a MS-DOS equivalent, the character is converted to a similar MS-DOS character.

Examples

      ? HB_OEMTOANSI( "Harbour" )

Compliance

Harbour

Platforms

Win

Files

Library is rtl

Seealso

HB_OEMTOANSI()