WinDev procedure parameters are passed by reference as a default and this is great but can also cause some strange issues in your code if you are not careful.
There are a few ways to pass an object by value and one of my favourite is using the LOCAL statement when defining your parameters.
Here’s an example:
If you don’t define anything as LOCAL then you can also tell WLanguage that you are passing by value just by adding brackets around the object you are passing:
CalculateWinnerPrizeTotals((nWinnerID), xCost)
So the example above shows how you can tell the method you are passing nWinnerID by value and not by reference.















Recent Comments