you are putting the result of your function into a local variable that is never used -> it is probably optimized out. Try to use a global variable, it should work. Regards, Luca (Cosmic)
... does get a returned value in usResult since it is referenced after the call to func(). So, compilers are getting that clever - even on a debug build with no optimization.
Always a new lesson to learn in this business - thank you for your response.
>> So, compilers are getting that clever - even on a debug build with no optimization
Actually optimizations are done in different compiler passes: the parser, the code generator and the optimizer itself: when you ''turn off the optimizations'' you justr disable the last component.