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? 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. 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) { } Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now