Passing a Value Through a Variable

Siebel CRM can pass a value to a function through a variable. After processing is complete, the variable retains the value that it contained before Siebel CRM passed it, even though the subroutine or function might modify the passed value.

If you configure Siebel CRM to pass a variable to a method that modifies the corresponding argument, and if you must retain the value that this variable contains, then you must enclose the variable in parentheses in the Call Subroutine statement. This format instructs Siebel VB to pass a copy of the variable. This technique is known as passing a value through a variable. For more information, see Call Subroutine Method.

If Siebel CRM passes a variable to a function, and if an argument for this function expects to receive a value through a reference, then this variable must match the exact type of the argument. This requirement does not apply to an expression or a variant.

If you configure Siebel CRM to call an external DLL, then you can configure the ByVal keyword to pass an argument through a value. You specify this configuration in the Declare Procedure statement or in the Call Subroutine statement. If you specify the ByVal keyword in the declaration, then the ByVal keyword is optional in the call. If you use the ByVal keyword, then it must precede the value. If you do not specify the ByVal keyword in the declaration, and if you specify the data type in the declaration, then you cannot use the ByVal keyword in the call.

For more information, see Declare Procedure Method.