runningTotal = this.runningTotal + myCustomer.customerBalance;Here the local runningTotal variable is initialized with the value of the runningTotal variable from main(), then the balance from the current customer is added to the local total.
In rare cases, you can use the this keyword to override a behavior of a set-value block in an assignment statement. Here this establishes the scope as being the declaration in which the set-value block resides. For details, see Set-value blocks.
program myProgramA type BasicProgram varX STRING = "program"; function main() varX STRING = "main"; myFunctionB(); end function myFunctionB() varX STRING = "Function B"; writeStdErr(this.varX); end end
The variable this.varX displays the value "program" on the console, because the program is the generatable logic part that holds myFunctionB().