Function Arguments
- Last UpdatedNov 10, 2025
- 1 minute read
A function argument is a PML reference to a value or object outside the function. In effect the argument is another name for the original PML Variable.
If we define a PML Function such as the following:
define function !!ChangeIt ( !Argument is STRING)
!Argument = 'New Value'
$P !Argument
$P !!Global Var
endfunction
Then invoke the function like this:
!!GlobalVar = ‘Old Value’
!!ChangeIt (!!GlobalVar)
The values printed for !Argument and !!GlobalVar will both be 'NewValue'.
Warning: Be very careful about changing function arguments. It is a powerful feature capable of causing unexpected results.