You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The mysterious value is most likely from "printf ("Hello World\n");" from the last time the C code was compiled but the new F# code was expecting a return value of type "int". So the value you got was a random number it decided to access in memory.
Exactly how this could happen, is that when you tried to compile your F# code, it passed, but when it tried to compile your C it failed; but, you had an old compiled C code with the same function names as the new one. Then, you tried to run your passed .NET DLL in FSI.
What should happen is that the .NET DLL shouldn't exist until the C code is compiled successfully; which doesn't happen currently. This can easily switched to do that. Or, we use a "tmp" place to do all the weaving and if it fails, it wont impact the previous build that was successful; that actually might be better.
Call from a script:
... returns mysterious values that are NOT necessarily 42.
The text was updated successfully, but these errors were encountered: