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