Faced a strange problem that I can't figure out. The transported application (from VO to XSharp) exited without any error message. This happened during certain actions in the application interface, so in debug mode I was able to find the exact place in the code where the application stopped working. It was a parameter passing through @, which is described in the function as OUT. After I replaced @ with OUT, the application started working without problems.
The history of the problem is such that in VO it was not possible to set the link type as OUT. VO only has REF. Therefore, after transporting the application from VO to XSharp, in those places in the code where, logically, there should be OUT instead of REF (only return value), I made such replacements. But in calls of such functions and methods I did not replace @ with OUT everywhere. The point is that the compiler does not issue any errors or warnings in this case. Therefore, I just did not see a few places where it was necessary to perform such a replacement.
Having decided to dig deeper into the problem, I wrote a small test:
Code: Select all
FUNCTION OutFunc(num AS INT, str OUT STRING) AS VOID
str := num:ToString()
RETURN
FUNCTION Start() AS VOID
LOCAL str AS STRING
OutFunc(1, @str)
RETURN
So I just have to ask the XSharp developers: @ for OUT might cause any problems? Or is this a valid statement?
Best regards,
Leonid