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

One response to “HB_IsByRef()

  1. Pingback: Harbour All Functions – H | 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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.