MVP 2014 Simon Posted August 18, 2010 MVP 2014 Report Share Posted August 18, 2010 In debugging some odd behaviour of the "Long Int" function in u90Ladder, I found that the use of constants as operands is a no-no. Even though SB82 is set prior to the function, if a constant is used as one of the operands, the result is only a 16-bit value. So, you must use MI values even if the value isn't gouing to change, and make sure that two MIs per value are allocated, even if the upper MI is zero. It would be handly if this could be fixed, so a 16-bit constant was automatically padded with zeros to become a 32-bit value; but knowing the workaround is OK. Link to comment Share on other sites More sharing options...
Emil Posted August 18, 2010 Report Share Posted August 18, 2010 Hello Simon, You're 100% right - Special function "Long integer" operates only on MI. It doesn't accept constant numberts. This is not a bug - this si the way the function is operating and will not (cannot) be changed. If I'm not wrong, this point is stated in Help topic. If not - it will... Link to comment Share on other sites More sharing options...
MVP 2014 Simon Posted August 18, 2010 Author MVP 2014 Report Share Posted August 18, 2010 Hello Emil, Hmm... looks like it does say that in the help. Someone must have put it there after I looked . Maybe put it on a new line or in bold, just for the real idiots? Link to comment Share on other sites More sharing options...
Cara Bereck Levy Posted August 19, 2010 Report Share Posted August 19, 2010 Simon, I'll bold it, just for you! 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