Merle Posted May 2 Report Share Posted May 2 I am trying to use C function to do some calculations, but the compiler is choking on the following line: if ( IF_GT(1, RemainingCableLength, CurrentCablePosition) ) {} If I replace this line with a simple "if(1)", the function compiles just fine. I'm using the macros for all float manipulation and like I said it compiles without this line above. The error messages from the compiler is cryptic at best and not very helpful. Can anyone give me a hint as to what might be wrong? Quote Link to comment Share on other sites More sharing options...
AlexUT Posted May 5 Report Share Posted May 5 Send your request and C-function to support@unitronics.com with all descriptions. Do not just refer to post. Quote Link to comment Share on other sites More sharing options...
Saragani Posted May 5 Report Share Posted May 5 The RLO that is being sent to IF_GT is being set to the value of the result of the IF_GT, so if you just pass 1, then it will try to set the return value into a const. The IF_GT also doesn't return a boolean. You should rather do: int rlo = 1; IF_GT(rlo, RemainingCableLength, CurrentCablePosition); if (rlo == 1) { } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.