Call By Value And Call By reference

hi Everyone

i am new in my problem is How to use Call by value and Call by Reference in Nav and Give Example of this

please Help me

Open any function and check if VAR boolean is set to true it is Pass be Reference…

if VAR is set to false it is Pass by value…

  • In the C/AL Locals window, click the Parameters tab and specify the calling method, name, and data type of each parameter. You can also specify a subtype and a length, but this is optional.

    The calling method can be specified as Var, which means that the parameter is passed by reference rather than by value. The value of a variable can only be changed by a function when it is passed to the function by reference. When the parameter is not specified as Var, only a copy of the variable is passed to the function. If the function changes that value, the change only affects the copy and not the variable itself.

    If the type that you select corresponds to an application object, you must also add a subtype, that is, the name of a specific object in the database. If you select text or code you have to define a length. The default length is 10 characters for code and 30 characters for text.