George,
VO is very "forgiving" (sloppy) in this area. If a function expects a parameter by reference and you pass it a reference then it assumes that you know what you are doing and it does not complain.
In your original example it will assume that the the nVar variable in the function points to a Real8 and will simply write the new value (8 bytes) at that location. Since you are passing an integer by reference this is more data then you expected, so
this may corrupt the stack of the calling code.
There is no way you can solve this in VO. And their will be no update to VO to fix this.
The only way to solve this is by switching from VO to a new language, such as X#. X# will migrate that code from VO to .Net and the X# compiler WILL complain if you are mixing types.
You do not have to run the code from X#, but you could use the migration to help diagnose your VO code and make the changes in VO.
You can download X# at the site www.xsharp.info.
Robert
Thank you for the answer Jamal,
Warnings are set on All and Warnings as Errors is checked on each application.
However, I found an error with calling by reference.
The compiler does not give an error if you have a variable of type int, for example, and call it by reference in a function in which it is described as real8.
Any idea about that?
Merry Christmas,
George
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)